MDL-29794 Initial support for re-using a shared grading form
[moodle.git] / grade / edit / letter / tabs.php
CommitLineData
e060e33d 1<?php
2
3// This file is part of Moodle - http://moodle.org/
4//
5// Moodle is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Moodle is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
8ad36f4c 17
284abb09 18 $row = $tabs = array();
19
20 $row[] = new tabobject('lettersview',
21 $CFG->wwwroot.'/grade/edit/letter/index.php?id='.$COURSE->id,
22 get_string('letters', 'grades'));
23
24 if (has_capability('moodle/grade:manageletters', $context)) {
25 $row[] = new tabobject('lettersedit',
26 $CFG->wwwroot.'/grade/edit/letter/edit.php?id='.$context->id,
27 get_string('edit'));
28 }
29
30 $tabs[] = $row;
31
32 echo '<div class="letterdisplay">';
33 print_tabs($tabs, $currenttab);
34 echo '</div>';
35
6c3ef410 36