|
By dservos:
CONTRIB-496
* Added checking of capabilities for each statistic.
* Accounted for moodle/grade:viewhidden capability when gathering grades.
* Added more documenation.
* Cleaned up code a bit.
|
| 33 |
$CFG->wwwroot.'/grade/report/stats/index.php?id='.$courseid, |
$CFG->wwwroot.'/grade/report/stats/index.php?id='.$courseid, |
| 34 |
get_string('modulename', 'gradereport_stats')); |
get_string('modulename', 'gradereport_stats')); |
| 35 |
|
|
|
if (has_capability('moodle/grade:manage',$tabcontext ) || |
|
|
has_capability('moodle/grade:edit', $tabcontext) || |
|
|
has_capability('gradereport/stats:view', $tabcontext)) { |
|
| 36 |
$row[] = new tabobject('preferences', |
$row[] = new tabobject('preferences', |
| 37 |
$CFG->wwwroot.'/grade/report/stats/preferences.php?id='.$courseid, |
$CFG->wwwroot.'/grade/report/stats/preferences.php?id='.$courseid, |
| 38 |
get_string('myreportpreferences', 'grades')); |
get_string('myreportpreferences', 'grades')); |
|
} |
|
| 39 |
|
|
| 40 |
/// A bit of a hack to make the printable tab open a new window. |
/// A bit of a hack to make the printable tab open a new window. |
| 41 |
$row[] = new tabobject('printable', |
$row[] = new tabobject('printable', |