moodle/grade/report/grader/tabs.php
nicolasconnault a5b8be622c MDL-11275 added (submissions). Also fixed :
Issue:
    Teachers can edit grader report preferences (including switches for quickgrading and
    quickfeedback), but do not have access to the "Turn editing on/off" button, so they
    can't do quickgrading.
Solutions:
    1.Decouple the quickgrading and quickfeedback modes from the editing mode,
        and turn them on/off through the preferences page. New capability: moodle/grade:edit
        * preferences: don't show quickgrading if no capability grade:edit
        * If quickgrading is switched off as a preference and user doesn't have manage cap, show edit icons around grades when in editing mode
2007-09-17 17:31:48 +00:00

19 lines
836 B
PHP

<?php // $Id$
$row = $tabs = array();
$tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
$row[] = new tabobject('graderreport',
$CFG->wwwroot.'/grade/report/grader/index.php?id='.$courseid,
get_string('modulename', 'gradereport_grader'));
if (has_capability('moodle/grade:manage',$tabcontext ) ||
has_capability('moodle/grade:edit', $tabcontext) ||
has_capability('gradereport/grader:view', $tabcontext)) {
$row[] = new tabobject('preferences',
$CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid,
get_string('preferences'));
}
$tabs[] = $row;
echo '<div class="gradedisplay">';
print_tabs($tabs, $currenttab);
echo '</div>';
?>