Fixed a notice

This commit is contained in:
moodler 2006-03-29 18:00:58 +00:00
parent f07fa64418
commit 01fe47f640

View file

@ -39,7 +39,7 @@
$row[] = new tabobject('single', $CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&mode=single', get_string('detail','data'), '', true); $row[] = new tabobject('single', $CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&mode=single', get_string('detail','data'), '', true);
} }
if (isteacher($course->id) or ($data->participants == DATA_STUDENTS_ONLY) or ($data->participants == DATA_TEACHERS_AND_STUDENTS)){ if (isteacher($course->id) or ($data->participants == DATA_STUDENTS_ONLY) or ($data->participants == DATA_TEACHERS_AND_STUDENTS)){
$addstring = ($rid) ? get_string('editentry', 'data') : get_string('add', 'data'); $addstring = empty($rid) ? get_string('add', 'data') : get_string('editentry', 'data');
$row[] = new tabobject('add', $CFG->wwwroot.'/mod/data/add.php?d='.$data->id, $addstring, '', true); $row[] = new tabobject('add', $CFG->wwwroot.'/mod/data/add.php?d='.$data->id, $addstring, '', true);
} }
if (isteacher($course->id)) { if (isteacher($course->id)) {
@ -65,13 +65,13 @@
*****************************/ *****************************/
if ($currenttab == 'templates' and isset($mode)) { if ($currenttab == 'templates' and isset($mode)) {
$inactive[] = 'templates'; $inactive[] = 'templates';
$templatelist = array ('singletemplate', 'listtemplate', 'addtemplate', 'rsstemplate'); // Standard reports we want to show first $templatelist = array ('singletemplate', 'listtemplate', 'addtemplate', 'rsstemplate', 'csstemplate');
$row = array(); $row = array();
$currenttab =''; $currenttab ='';
foreach ($templatelist as $template) { foreach ($templatelist as $template) {
$row[] = new tabobject($template, "templates.php?d=$data->id&mode=$template", $row[] = new tabobject($template, "templates.php?d=$data->id&mode=$template",
get_string("$template", "data")); get_string($template, 'data'));
if ($template == $mode) { if ($template == $mode) {
$currenttab = $template; $currenttab = $template;
} }