Temporarily disabling ajax for module/resource deletions. Related to MDL-8287.
This commit is contained in:
@@ -100,7 +100,7 @@ class jsportal {
|
||||
* Prints the JavaScript code needed to set up AJAX for the course.
|
||||
*/
|
||||
function print_javascript($courseid, $return=false) {
|
||||
global $CFG;
|
||||
global $CFG, $USER;
|
||||
|
||||
$blocksoutput = $output = '';
|
||||
for ($i=0; $i<count($this->blocks); $i++) {
|
||||
@@ -128,6 +128,7 @@ class jsportal {
|
||||
$output .= " main.portal.strings['deletecheck']='".get_string('deletecheck','','_var_')."';\n";
|
||||
$output .= " main.portal.strings['resource']='".get_string('resource')."';\n";
|
||||
$output .= " main.portal.strings['activity']='".get_string('activity')."';\n";
|
||||
$output .= " main.portal.strings['sesskey']='".$USER->sesskey."';\n";
|
||||
$output .= " onloadobj.load();\n";
|
||||
$output .= " main.process_blocks();\n";
|
||||
$output .= "</script>";
|
||||
|
||||
@@ -403,7 +403,7 @@ section_class.prototype.remove_resource = function(el) {
|
||||
|
||||
this.write_sequence_list();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
section_class.prototype.insert_resource = function(el, targetel) {
|
||||
@@ -766,17 +766,23 @@ resource_class.prototype.toggle_groupmode = function() {
|
||||
|
||||
|
||||
resource_class.prototype.delete_button = function() {
|
||||
/*
|
||||
if (this.debug) {
|
||||
YAHOO.log("Deleting "+this.getEl().id+" from parent "+this.parentObj.getEl().id);
|
||||
}
|
||||
if (!confirm(main.getString('deletecheck', main.getString(this.is)+" "+this.id))) {
|
||||
return false;
|
||||
}
|
||||
//this.getEl().parentNode.removeChild(this.getEl());
|
||||
this.parentObj.remove_resource(this);
|
||||
|
||||
main.connect('DELETE', 'class=resource&id='+this.id);
|
||||
}
|
||||
*/
|
||||
|
||||
// Not currently doing deletion by ajax because of unsolved problem in
|
||||
// resource_class.remove_resource()
|
||||
self.location = main.portal.strings['wwwroot']+"/course/mod.php?delete="
|
||||
+this.id+"&sesskey="+main.portal.strings['sesskey']+
|
||||
"&sr=" + this.parentObj.sectionId;
|
||||
}
|
||||
|
||||
|
||||
resource_class.prototype.update_index = function(index) {
|
||||
|
||||
Reference in New Issue
Block a user