mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merged from 1.7.
This commit is contained in:
parent
ebe82e08ec
commit
15c331b2e8
3 changed files with 28 additions and 15 deletions
|
@ -244,6 +244,12 @@ function php_portal_class() {
|
||||||
//flag for week fomat
|
//flag for week fomat
|
||||||
this.isWeek = false;
|
this.isWeek = false;
|
||||||
|
|
||||||
|
//client browser
|
||||||
|
this.clientIsIE = null;
|
||||||
|
|
||||||
|
//session key
|
||||||
|
this.sesskey = null;
|
||||||
|
|
||||||
//strings
|
//strings
|
||||||
this.strings = [];
|
this.strings = [];
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,12 @@ class jsportal {
|
||||||
$output .= "<script type=\"text/javascript\">\n";
|
$output .= "<script type=\"text/javascript\">\n";
|
||||||
$output .= " main.portal.id = ".$courseid.";\n";
|
$output .= " main.portal.id = ".$courseid.";\n";
|
||||||
$output .= " main.portal.blocks = new Array(".$blocksoutput.");\n";
|
$output .= " main.portal.blocks = new Array(".$blocksoutput.");\n";
|
||||||
|
$output .= " main.portal.sesskey = \"".$USER->sesskey."\";\n";
|
||||||
|
if (check_browser_version('MSIE')) {
|
||||||
|
$output .= " main.portal.clientIsIE = true;\n";
|
||||||
|
} else {
|
||||||
|
$output .= " main.portal.clientIsIE = false;\n";
|
||||||
|
}
|
||||||
$output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
|
$output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
|
||||||
$output .= " main.portal.strings['pixpath']='".$CFG->pixpath."';\n";
|
$output .= " main.portal.strings['pixpath']='".$CFG->pixpath."';\n";
|
||||||
$output .= " main.portal.strings['move']='".get_string('move')."';\n";
|
$output .= " main.portal.strings['move']='".get_string('move')."';\n";
|
||||||
|
|
|
@ -766,7 +766,8 @@ resource_class.prototype.toggle_groupmode = function() {
|
||||||
|
|
||||||
|
|
||||||
resource_class.prototype.delete_button = function() {
|
resource_class.prototype.delete_button = function() {
|
||||||
/*
|
|
||||||
|
if (!main.portal.clientIsIE) {
|
||||||
if (this.debug) {
|
if (this.debug) {
|
||||||
YAHOO.log("Deleting "+this.getEl().id+" from parent "+this.parentObj.getEl().id);
|
YAHOO.log("Deleting "+this.getEl().id+" from parent "+this.parentObj.getEl().id);
|
||||||
}
|
}
|
||||||
|
@ -775,14 +776,14 @@ resource_class.prototype.delete_button = function() {
|
||||||
}
|
}
|
||||||
this.parentObj.remove_resource(this);
|
this.parentObj.remove_resource(this);
|
||||||
main.connect('DELETE', 'class=resource&id='+this.id);
|
main.connect('DELETE', 'class=resource&id='+this.id);
|
||||||
*/
|
} else {
|
||||||
|
|
||||||
// Not currently doing deletion by ajax because of unsolved problem in
|
// Not currently doing deletion by ajax because of unsolved problem in
|
||||||
// resource_class.remove_resource()
|
// resource_class.remove_resource()
|
||||||
self.location = main.portal.strings['wwwroot']+"/course/mod.php?delete="
|
self.location = main.portal.strings['wwwroot']+"/course/mod.php?delete="
|
||||||
+this.id+"&sesskey="+main.portal.strings['sesskey']+
|
+this.id+"&sesskey="+main.portal.sesskey+
|
||||||
"&sr=" + this.parentObj.sectionId;
|
"&sr=" + this.parentObj.sectionId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
resource_class.prototype.update_index = function(index) {
|
resource_class.prototype.update_index = function(index) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue