Use AJAX for weekly formats too. HOWEVER, there are some remaining

bugs with it so for now it only works in DEBUG_DEVELOPER mode
This commit is contained in:
moodler
2006-09-23 14:38:01 +00:00
parent 354e11303e
commit 3febabd888
+22
View File
@@ -3,6 +3,7 @@
// Included from "view.php"
require_once("$CFG->dirroot/mod/forum/lib.php");
require_once($CFG->libdir.'/ajax/ajaxlib.php');
$week = optional_param('week', -1, PARAM_INT);
@@ -46,6 +47,22 @@
$strweekshow = get_string('weekshow', '', $strstudents);
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
if (!empty($USER->ajax) && debugging('', DEBUG_DEVELOPER)) { /// XXX TODO Debugging only temporary until fixed
// If user doesnt want AJAX, then they wont get it,
// from here everything detects $COURSE->javascriptportal
$COURSE->javascriptportal = new jsportal();
print_require_js(array('yui_yahoo','yui_dom','yui_event','yui_dragdrop', 'yui_connection',
'ajaxcourse_blocks','ajaxcourse_sections','ajaxcourse'));
//javascript logging facilities
if (debugging()) {
print_require_js(Array('yui_logger'));
}
}
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
@@ -254,4 +271,9 @@
echo '</tr></table>';
//create javascript portal code
if (!empty($COURSE->javascriptportal)) {
$COURSE->javascriptportal->print_javascript($course->id);
}
?>