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

Annotation of /contrib/plugins/grade/report/visual/tabs.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (view) (download)

1 : dservos 1.1 <?php
2 : dservos 1.2 ///////////////////////////////////////////////////////////////////////////
3 :     // //
4 :     // NOTICE OF COPYRIGHT //
5 :     // //
6 :     // Moodle - Modular Object-Oriented Dynamic Learning Environment //
7 :     // http://moodle.org //
8 :     // //
9 :     // Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
10 :     // //
11 :     // This program is free software; you can redistribute it and/or modify //
12 :     // it under the terms of the GNU General Public License as published by //
13 :     // the Free Software Foundation; either version 2 of the License, or //
14 :     // (at your option) any later version. //
15 :     // //
16 :     // This program is distributed in the hope that it will be useful, //
17 :     // but WITHOUT ANY WARRANTY; without even the implied warranty of //
18 :     // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
19 :     // GNU General Public License for more details: //
20 :     // //
21 :     // http://www.gnu.org/copyleft/gpl.html //
22 :     // //
23 :     ///////////////////////////////////////////////////////////////////////////
24 :    
25 : dservos 1.1
26 :     $row = $tabs = array();
27 :     $tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
28 : dservos 1.4
29 :    
30 :     if(!isset($visid)){
31 :     $visid = optional_param('visid');
32 :     }
33 :    
34 :    
35 : dservos 1.1 $row[] = new tabobject('visualreport',
36 : dservos 1.4 $CFG->wwwroot.'/grade/report/visual/index.php?id='.$courseid.'&visid='.$visid,
37 : dservos 1.1 get_string('modulename', 'gradereport_visual'));
38 :    
39 :     if (has_capability('moodle/grade:manage',$tabcontext ) ||
40 :     has_capability('moodle/grade:edit', $tabcontext) ||
41 :     has_capability('gradereport/visual:view', $tabcontext)) {
42 :     $row[] = new tabobject('preferences',
43 : dservos 1.4 $CFG->wwwroot.'/grade/report/visual/preferences.php?id='.$courseid.'&visid='.$visid,
44 : dservos 1.1 get_string('myreportpreferences', 'grades'));
45 :     }
46 :    
47 : dservos 1.3 /// A bit of a hack to make the printable tab open a new window.
48 :     $row[] = new tabobject('printable',
49 :     '#" onClick="javascript:window.open(\'' . $CFG->wwwroot. '/grade/report/visual/print.php?id=' . $courseid . '&visid=' . $visid . '\')',
50 :     get_string('printable', 'gradereport_visual'));
51 :    
52 : dservos 1.1 $tabs[] = $row;
53 :     echo '<div class="gradedisplay">';
54 :     print_tabs($tabs, $currenttab);
55 :     echo '</div>';
56 :     ?>

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7