mirror of
https://github.com/moodle/moodle.git
synced 2025-05-01 22:18:03 +02:00
course/view MDL-10142 AJAX move functionality on section content
This commit is contained in:
parent
dc01eb84f2
commit
b1b4c2d75f
@ -63,6 +63,7 @@ function main_class() {
|
||||
this.icons = [];
|
||||
this.courseformat = null;
|
||||
this.marker = null;
|
||||
this.numsections = null;
|
||||
|
||||
//things to process onload
|
||||
onloadobj.add('main.process_document();');
|
||||
@ -117,17 +118,22 @@ main_class.prototype.process_document = function() {
|
||||
this.rightcolumn = new column_class('right-column', "blocks", null, 'r');
|
||||
|
||||
//process sections
|
||||
var ct = 0;
|
||||
while (document.getElementById('section-'+ct) != null) {
|
||||
this.sections[ct] = new section_class('section-'+ct, "sections", null, ct!=0?true:false);
|
||||
this.sections[ct].addToGroup('resources');
|
||||
if (ct > 0) {
|
||||
var sectiontitle = YAHOO.util.Selector.query('#section-'+ct+' h3.weekdates')[0];
|
||||
if (undefined !== sectiontitle) { // Only save date for weekly format
|
||||
this.sectiondates[ct] = sectiontitle.innerHTML;
|
||||
//var ct = 0;
|
||||
//while (document.getElementById('section-'+ct) != null) {
|
||||
var maxct = this.portal.numsections;
|
||||
this.courseformat = this.portal.courseformat;
|
||||
for(var ct=0; ct <= maxct; ct++){
|
||||
if(document.getElementById('section-'+ct) != null) {
|
||||
this.sections[ct] = new section_class('section-'+ct, "sections", null, ct!=0?true:false);
|
||||
this.sections[ct].addToGroup('resources');
|
||||
if (ct > 0) {
|
||||
var sectiontitle = YAHOO.util.Selector.query('#section-'+ct+' h3.weekdates')[0];
|
||||
if (undefined !== sectiontitle) { // Only save date for weekly format
|
||||
this.sectiondates[ct] = sectiontitle.innerHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
ct++;
|
||||
//ct++;
|
||||
}
|
||||
if (this.debug) {
|
||||
YAHOO.log("Processed "+ct+" sections");
|
||||
|
@ -1398,6 +1398,7 @@ class jsportal {
|
||||
$output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
|
||||
$output .= " main.portal.strings['marker']='".get_string('markthistopic', '', '_var_')."';\n";
|
||||
$output .= " main.portal.strings['marked']='".get_string('markedthistopic', '', '_var_')."';\n";
|
||||
$output .= " main.portal.numsections = ".$COURSE->numsections.";\n";
|
||||
$output .= " main.portal.strings['hide']='".get_string('hide')."';\n";
|
||||
$output .= " main.portal.strings['hidesection']='".get_string('hidesection', '', '_var_')."';\n";
|
||||
$output .= " main.portal.strings['show']='".get_string('show')."';\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user