// Get course
$course=$DB->get_record('course',array('id'=>required_param('course',PARAM_INT)));
if(!$course) {
- print_error('invalidcourseid');
+ print_error('invalidcourseid');
}
// Sort (default lastname, optionally firstname)
$start=optional_param('start',0,PARAM_INT);
// Whether to show idnumber
-// TODO: This should really not be using a config option 'intended' for
+// TODO: This should really not be using a config option 'intended' for
// gradebook, but that option is also used in quiz reports as well. There ought
// to be a generic option somewhere.
$idnumbers=$CFG->grade_report_showuseridnumber;
header('Content-Type: text/csv; charset=UTF-16LE');
print chr(0xFF).chr(0xFE);
$sep="\t".chr(0);
- $line="\n".chr(0);
+ $line="\n".chr(0);
} else {
header('Content-Type: text/csv; charset=UTF-8');
$sep=",";
}
} else {
// Use SVG to draw sideways text if supported
- $svgcleverness=ajaxenabled(array('Firefox'=>2.0)) && !$USER->screenreader;
+ $svgcleverness=ajaxenabled(array('Firefox'=>2.0)) && !$USER->screenreader;
// Navigation and header
$strreports = get_string("reports");
'&start='.($start+COMPLETION_REPORT_PAGE),false,'completion_next');
}
- $pagingbar.='</div>';
+ $pagingbar.='</div>';
} else {
$pagingbar='';
}
// Okay, let's draw the table of progress info,
-// Start of table
+// Start of table
if(!$csv) {
print '<br class="clearer"/>'; // ugh
if(count($progress->users)==0) {
// User heading / sort option
print '<th scope="col" class="completion-sortchoice">';
if($firstnamesort) {
- print
+ print
get_string('firstname').' / <a href="./?course='.$course->id.'">'.
get_string('lastname').'</a>';
} else {
get_string('lastname');
}
print '</th>';
-
+
if($idnumbers) {
- print '<th>'.get_string('idnumber').'</th>';
+ print '<th>'.get_string('idnumber').'</th>';
}
-
+
} else {
if($idnumbers) {
print $sep;
} else {
$datetext='';
}
-
+
// Some names (labels) come URL-encoded and can be very long, so shorten them
$activity->name=shorten_text(urldecode($activity->name));
case COMPLETION_COMPLETE : $completiontype='y'; break;
case COMPLETION_COMPLETE_PASS : $completiontype='pass'; break;
case COMPLETION_COMPLETE_FAIL : $completiontype='fail'; break;
- }
+ }
$completionicon='completion-'.
($activity->completion==COMPLETION_TRACKING_AUTOMATIC ? 'auto' : 'manual').
'-'.$completiontype;
-
+
$describe=get_string('completion-alt-auto-'.$completiontype,'completion');
$a=new StdClass;
$a->state=$describe;