~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to grade/report/grader/tabs.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php  // $Id: tabs.php,v 1.11 2007/10/10 06:34:21 nicolasconnault Exp $
 
2
 
 
3
///////////////////////////////////////////////////////////////////////////
 
4
//                                                                       //
 
5
// NOTICE OF COPYRIGHT                                                   //
 
6
//                                                                       //
 
7
// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
 
8
//          http://moodle.com                                            //
 
9
//                                                                       //
 
10
// Copyright (C) 1999 onwards  Martin Dougiamas  http://moodle.com       //
 
11
//                                                                       //
 
12
// This program is free software; you can redistribute it and/or modify  //
 
13
// it under the terms of the GNU General Public License as published by  //
 
14
// the Free Software Foundation; either version 2 of the License, or     //
 
15
// (at your option) any later version.                                   //
 
16
//                                                                       //
 
17
// This program is distributed in the hope that it will be useful,       //
 
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
 
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
 
20
// GNU General Public License for more details:                          //
 
21
//                                                                       //
 
22
//          http://www.gnu.org/copyleft/gpl.html                         //
 
23
//                                                                       //
 
24
///////////////////////////////////////////////////////////////////////////
 
25
    $row = $tabs = array();
 
26
    $tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
 
27
    $row[] = new tabobject('graderreport',
 
28
                           $CFG->wwwroot.'/grade/report/grader/index.php?id='.$courseid,
 
29
                           get_string('modulename', 'gradereport_grader'));
 
30
    if (has_capability('moodle/grade:manage',$tabcontext ) ||
 
31
        has_capability('moodle/grade:edit', $tabcontext) ||
 
32
        has_capability('gradereport/grader:view', $tabcontext)) {
 
33
        $row[] = new tabobject('preferences',
 
34
                               $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid,
 
35
                               get_string('myreportpreferences', 'grades'));
 
36
    }
 
37
 
 
38
    $tabs[] = $row;
 
39
    echo '<div class="gradedisplay">';
 
40
    print_tabs($tabs, $currenttab);
 
41
    echo '</div>';
 
42
?>