]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a notice
authormoodler <moodler>
Wed, 29 Mar 2006 18:00:58 +0000 (18:00 +0000)
committermoodler <moodler>
Wed, 29 Mar 2006 18:00:58 +0000 (18:00 +0000)
mod/data/tabs.php

index 2883604c593c8f4eb9292821581319ad108d7f51..494e9504dc8ad072958dc0d718600eccb2e8b385 100755 (executable)
@@ -39,7 +39,7 @@
         $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)){
-        $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);
     }
     if (isteacher($course->id)) {
     *****************************/
     if ($currenttab == 'templates' and isset($mode)) {
         $inactive[] = 'templates';
-        $templatelist = array ('singletemplate', 'listtemplate', 'addtemplate', 'rsstemplate');   // Standard reports we want to show first
+        $templatelist = array ('singletemplate', 'listtemplate', 'addtemplate', 'rsstemplate', 'csstemplate');
 
         $row  = array();
         $currenttab ='';
         foreach ($templatelist as $template) {
             $row[] = new tabobject($template, "templates.php?d=$data->id&amp;mode=$template",
-                                    get_string("$template", "data"));
+                                    get_string($template, 'data'));
             if ($template == $mode) {
                 $currenttab = $template;
             }