--- report-moodle.php 2008-07-19 12:31:00.000000000 +0300 +++ report.php 2008-07-22 16:00:00.000000000 +0300 @@ -17,7 +17,7 @@ * Display the report. */ function display($quiz, $cm, $course) { - global $CFG, $db; + global $CFG, $USER, $db; // Define some strings $strreallydel = addslashes(get_string('deleteattemptcheck','quiz')); $strtimeformat = get_string('strftimedatetime'); @@ -27,7 +27,7 @@ // Only print headers if not asked to download data if (!$download = optional_param('download', NULL)) { - $this->print_header_and_tabs($cm, $course, $quiz, "overview"); + $this->print_header_and_tabs($cm, $course, $quiz, "overviewmsg"); } if($attemptids = optional_param('attemptid', array(), PARAM_INT)) { @@ -55,7 +55,7 @@ $pageoptions = array(); $pageoptions['id'] = $cm->id; $pageoptions['q'] = $quiz->id; - $pageoptions['mode'] = 'overview'; + $pageoptions['mode'] = 'overviewmsg'; /// find out current groups mode $currentgroup = groups_get_activity_group($cm, true); @@ -446,7 +446,8 @@ $row = array(); if (in_array('checkbox', $columns)){ if ($attempt->attempt){ - $row[] = ''; + //note: got next line from user/index.php + $row[] = ''; } else { $row[] = ''; } @@ -594,28 +595,33 @@ if (!$download) { // Start form echo '
'; - echo '
'; + //note: got these lines from user/index.php + // please see that nothing important is missing ! + echo ''; + echo '
'; + echo ''; + //echo ''; + echo ''; echo '
'; + // note: next line (alone) breaks course-id + // so i had to reassign it after this line again echo $reporturlwithdisplayoptions->hidden_params_out(); + echo ''; echo '
'; echo '
'; // Print table $table->print_html(); - // Print "Select all" etc. - if (!empty($attempts) && $candelete) { - echo ''; - echo '
'; - echo ''. - get_string('selectall', 'quiz').' / '; - echo ''. - get_string('selectnone', 'quiz').' '; - echo '  '; - echo ''; - echo '
'; - } + $displaylist = array(); + $displaylist['messageselect.php'] = get_string('messageselectadd'); + if (has_capability('moodle/notes:manage', $context) && $context->id != $frontpagectx->id) { + $displaylist['addnote.php'] = get_string('addnewnote', 'notes'); + $displaylist['groupaddnote.php'] = get_string('groupaddnewnote', 'notes'); + } + + helpbutton("participantswithselectedusers", get_string("withselectedusers")); + choose_from_menu ($displaylist, "formaction", "", get_string("withselectedusers"), "this.form.submit();", ""); // Close form echo '
'; echo '
';