mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
c70ad9f736
I made a number of small tidy-ups to the contrib version before adding this here: - fixed some language string names - renamed a capability from deletecompleteds to deletesubmissions (can we use "submissions" everywhere?) - got rid of language packs (moved english to correct location) - deleted 'pics' type (it needs to be rewritten to use user files in moodledata) - moved changelog into README.txt - moved captcha font out of subdir - bumped version to today Thanks very much to Andreas Grabs for all your work on this module so far, and congratulations! :-)
48 lines
1.9 KiB
PHP
48 lines
1.9 KiB
PHP
<?php // $Id$
|
|
/**
|
|
* prints the tabbed bar
|
|
*
|
|
* @version $Id$
|
|
* @author Andreas Grabs
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
|
* @package feedback
|
|
*/
|
|
defined('FEEDBACK_INCLUDE_TEST') OR die('not allowed');
|
|
|
|
$tabs = array();
|
|
$row = array();
|
|
$inactive = array();
|
|
$activated = array();
|
|
|
|
$courseid = optional_param('courseid', false, PARAM_INT);
|
|
// $current_tab = $SESSION->feedback->current_tab;
|
|
if (!isset($current_tab)) {
|
|
$current_tab = '';
|
|
}
|
|
|
|
$row[] = new tabobject('view', $CFG->wwwroot.htmlspecialchars('/mod/feedback/view.php?id='.$id.'&do_show=view'), get_string('overview', 'feedback'));
|
|
|
|
if($capabilities->edititems) {
|
|
$row[] = new tabobject('edit', $CFG->wwwroot.htmlspecialchars('/mod/feedback/edit.php?id='.$id.'&do_show=edit'), get_string('edit_items', 'feedback'));
|
|
$row[] = new tabobject('templates', $CFG->wwwroot.htmlspecialchars('/mod/feedback/edit.php?id='.$id.'&do_show=templates'), get_string('templates', 'feedback'));
|
|
}
|
|
|
|
if($capabilities->viewreports) {
|
|
if($feedback->course == SITEID){
|
|
$row[] = new tabobject('analysis', $CFG->wwwroot.htmlspecialchars('/mod/feedback/analysis_course.php?id='.$id.'&courseid='.$courseid.'&do_show=analysis'), get_string('analysis', 'feedback'));
|
|
}else {
|
|
$row[] = new tabobject('analysis', $CFG->wwwroot.htmlspecialchars('/mod/feedback/analysis.php?id='.$id.'&courseid='.$courseid.'&do_show=analysis'), get_string('analysis', 'feedback'));
|
|
}
|
|
}
|
|
|
|
if($capabilities->viewreports) {
|
|
$row[] = new tabobject('showentries', $CFG->wwwroot.htmlspecialchars('/mod/feedback/show_entries.php?id='.$id.'&do_show=showentries'), get_string('show_entries', 'feedback'));
|
|
}
|
|
|
|
if(count($row) > 1) {
|
|
$tabs[] = $row;
|
|
|
|
print_tabs($tabs, $current_tab, $inactive, $activated);
|
|
}
|
|
?>
|