Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/grade/report/grader/tabs.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018     $row = $tabs = array();
00019     $tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
00020     $row[] = new tabobject('graderreport',
00021                            $CFG->wwwroot.'/grade/report/grader/index.php?id='.$courseid,
00022                            get_string('pluginname', 'gradereport_grader'));
00023     if (has_capability('moodle/grade:manage',$tabcontext ) ||
00024         has_capability('moodle/grade:edit', $tabcontext) ||
00025         has_capability('gradereport/grader:view', $tabcontext)) {
00026         $row[] = new tabobject('preferences',
00027                                $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid,
00028                                get_string('myreportpreferences', 'grades'));
00029     }
00030 
00031     $tabs[] = $row;
00032     echo '<div class="gradedisplay">';
00033     print_tabs($tabs, $currenttab);
00034     echo '</div>';
00035 
 All Data Structures Namespaces Files Functions Variables Enumerations