[Xerte] Re: JS question in template_management.js
knowledgeware at kccsoft.com
Fri Dec 27 23:40:41 GMT 2013
I’m in toolkits V1.7 (trying to move to 2 – this is part of the process) in websitecode/scripts/template_management.js down around line 1030. This is the section where courses are deleted. Since my customizations use a SQL Server dbase to also store info on the courses, I want run a script to make sure that the course(s) to be deleted are not assigned to students.
First I need to get the ‘templateID’ of the course, but not sure how to do that, I’m not good with js. Does anyone know if I can pull the ‘templateID’ of the course(s) that have been clicked in the workspace delete window at this point? I’m wondering if the document object contains the templateID(s) at this point and if so what syntax I’d use to get them.
Next, any suggestion on what is socially acceptable to js in terms of running a query on my SQL Server database to see if students are currently assigned?
Thanks for any suggestions
//RGM if workspace folder selected and delete clicked:
alert("You cannot delete the Workspace folder");
//RGM if more than one workspace course is selected and delete clicked:
var response = confirm("Are you sure you with to delete these items?");
//RGM if a single workspace course is selected and delete clicked:
var response = confirm("Are you sure you with to delete this item?");
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xerte