// 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);
$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);
echo '</tr></table>';
+ //create javascript portal code
+ if (!empty($COURSE->javascriptportal)) {
+ $COURSE->javascriptportal->print_javascript($course->id);
+ }
+
?>