Exemplo n.º 1
0
if (count($ngrades)) {
    if ($CFG->fullnamedisplay == 'lastname firstname') {
        // for better view (dlnsk)
        $namehead = get_string('lastname') . ' / ' . get_string('firstname');
    } else {
        $namehead = get_string('firstname') . ' / ' . get_string('lastname');
    }
    $tablegraders = new html_table();
    $tablegraders->head = array('#', $namehead, get_string('grade'));
    $tablegraders->align = array('right', 'left', 'center');
    $tablegraders->wrap = array('nowrap', 'nowrap', 'nowrap');
    $tablegraders->data = array();
    $gradernumber = 0;
    foreach ($ngrades as $graderid => $marks) {
        $gradernumber++;
        $grader = mod_vpl_submission::get_grader($graderid);
        $picture = '';
        if ($graderid > 0) {
            //No automatic grading
            $picture = $OUTPUT->user_picture($grader, array('popup' => true));
        }
        $tablegraders->data[] = array($gradernumber, $picture . ' ' . fullname($grader), sprintf('%d/%d  (%5.2f%%)', $marks, $usernumber, (double) 100.0 * $marks / $usernumber));
    }
}
//Menu for groups
if ($groupmode) {
    groups_print_activity_menu($cm, $groups_url);
}
//Print user selection by submission state
$url_base = $CFG->wwwroot . "/mod/vpl/views/submissionslist.php?id={$id}&sort={$sort}&group={$group}&selection=";
$urlindex = vpl_select_index($url_base, array('all', 'allsubmissions', 'notgraded', 'graded', 'gradedbyuser'));