[moodle] / contrib / plugins / grade / report / stats / tabs.php Repository:

Diff of /contrib/plugins/grade/report/stats/tabs.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Fri Jun 20 17:28:35 2008 WST revision 1.5, Thu Aug 14 11:10:09 2008 WST

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.

# Line 33  Line 33 
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',

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7