$strlivelogs = get_string("livelogs");
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
- print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
- '<meta http-equiv="Refresh" content="'.COURSE_LIVELOG_REFRESH.'; url=live.php?id='.$course->id.'" />');
+ $PAGE->set_url('/course/report/log/live.php', Array('id'=>$course->id));
+ $PAGE->set_generaltype('popup');
+ $PAGE->set_title("$strlivelogs ($strupdatesevery)");
+ $PAGE->set_periodic_refresh_delay(COURSE_LIVELOG_REFRESH);
+ $PAGE->set_heading($strlivelogs);
+ echo $OUTPUT->header();
$user=0;
$date=time() - 3600;
print_log($course, $user, $date, "l.time DESC", $page, 500,
"live.php?id=$course->id&user=$user&date=$date");
- print_footer('none');
+ echo $OUTPUT->footer();
exit;
}
echo '<h2>'.get_string('counteditems', '', $a).'</h2>'."\n";
- echo '
-<script type="text/javascript">
-//<![CDATA[
-function checksubmit(form) {
- var destination = form.formaction.options[form.formaction.selectedIndex].value;
- if (destination == "" || !checkchecked(form)) {
- form.formaction.selectedIndex = 0;
- return false;
- } else {
- return true;
- }
-}
-
-function checkchecked(form) {
- var inputs = document.getElementsByTagName(\'INPUT\');
- var checked = false;
- inputs = filterByParent(inputs, function() {return form;});
- for(var i = 0; i < inputs.length; ++i) {
- if(inputs[i].type == \'checkbox\' && inputs[i].checked) {
- checked = true;
- }
- }
- return checked;
-}
-
-function checknos() {
- void(d=document);
- void(el=d.getElementsByTagName(\'INPUT\'));
- for(i=0;i<el.length;i++) {
- if (el[i].value == 0) {
- void(el[i].checked=1)
- }
- }
-}
-//]]>
-</script>
-';
+ echo $PAGE->requires->js('course/report/participation/participation.js')->asap();
+
echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" id="studentsform" onsubmit="return checksubmit(this);">'."\n";
echo '<div>'."\n";
echo '<input type="hidden" name="id" value="'.$id.'" />'."\n";
--- /dev/null
+function checksubmit(form) {
+ var destination = form.formaction.options[form.formaction.selectedIndex].value;
+ if (destination == "" || !checkchecked(form)) {
+ form.formaction.selectedIndex = 0;
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function checkchecked(form) {
+ var inputs = document.getElementsByTagName('INPUT');
+ var checked = false;
+ inputs = filterByParent(inputs, function() {return form;});
+ for(var i = 0; i < inputs.length; ++i) {
+ if(inputs[i].type == 'checkbox' && inputs[i].checked) {
+ checked = true;
+ }
+ }
+ return checked;
+}
+
+function checknos() {
+ void(d=document);
+ void(el=d.getElementsByTagName('INPUT'));
+ for(i=0;i<el.length;i++) {
+ if (el[i].value == 0) {
+ void(el[i].checked=1)
+ }
+ }
+}
\ No newline at end of file