]> git.mjollnir.org Git - moodle.git/commitdiff
Renamed fields.php to field.php
authormoodler <moodler>
Fri, 24 Mar 2006 02:44:05 +0000 (02:44 +0000)
committermoodler <moodler>
Fri, 24 Mar 2006 02:44:05 +0000 (02:44 +0000)
mod/data/add.php
mod/data/field.php [moved from mod/data/fields.php with 91% similarity]
mod/data/import.php
mod/data/lib.php
mod/data/tabs.php
mod/data/templates.php
mod/data/view.php

index 5ff4f92a36f3a2465d3c5ca0e597892c124e00d8..e71eeae7f4cabf59a36014d5a1007ad4b53aae84 100755 (executable)
@@ -59,7 +59,7 @@
     
     if (isteacher($course->id)) {
         if (!record_exists('data_fields','dataid',$data->id)) {      // Brand new database!
-            redirect($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id);  // Redirect to field entry
+            redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id);  // Redirect to field entry
         }
     }
 
similarity index 91%
rename from mod/data/fields.php
rename to mod/data/field.php
index dff4227c3ffec757ce499bc40b9a4230572f66c0..60b9046b56164bd100a587980a2451c528b70ed9 100755 (executable)
@@ -68,7 +68,7 @@
     switch ($mode) {
 
         case 'add':    ///add a new field
-            if (confirm_sesskey() and $fieldinput = data_submitted($CFG->wwwroot.'/mod/data/fields.php')){
+            if (confirm_sesskey() and $fieldinput = data_submitted($CFG->wwwroot.'/mod/data/field.php')){
 
             /// Only store this new field if it doesn't already exist.
                 if (data_fieldname_exists($fieldinput->name, $data->id)) {
@@ -91,7 +91,7 @@
                     data_append_new_field_to_templates($data, $field->field->name);
 
                     add_to_log($course->id, 'data', 'fields add', 
-                               "fields.php?d=$data->id&amp;mode=display&amp;fid=$fid", $fid, $cm->id);
+                               "field.php?d=$data->id&amp;mode=display&amp;fid=$fid", $fid, $cm->id);
                     
                     $displaynoticegood = get_string('fieldadded','data');
                 }
 
 
         case 'update':    ///update a field
-            if (confirm_sesskey() and $fieldinput = data_submitted($CFG->wwwroot.'/mod/data/fields.php')){
+            if (confirm_sesskey() and $fieldinput = data_submitted($CFG->wwwroot.'/mod/data/field.php')){
 
                 $fieldinput->name = optional_param('name','',PARAM_NOTAGS);
 
                     data_replace_field_in_templates($data, $oldfieldname, $field->field->name);
                     
                     add_to_log($course->id, 'data', 'fields update', 
-                               "fields.php?d=$data->id&amp;mode=display&amp;fid=$fid", $fid, $cm->id);
+                               "field.php?d=$data->id&amp;mode=display&amp;fid=$fid", $fid, $cm->id);
                     
                     $displaynoticegood = get_string('fieldupdated','data');
                 }
                         data_replace_field_in_templates($data, $field->field->name, '');
                         
                         add_to_log($course->id, 'data', 'fields delete', 
-                                   "fields.php?d=$data->id", $field->field->name, $cm->id);
+                                   "field.php?d=$data->id", $field->field->name, $cm->id);
     
                         $displaynoticegood = get_string('fielddeleted', 'data');
                     }
                     $field = data_get_field_from_id($fid, $data);
 
                     notice_yesno('<strong>'.$field->name().': '.$field->field->name.'</strong><br /><br />'. get_string('confirmdeletefield','data'), 
-                                 'fields.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$fid.'&amp;sesskey='.sesskey().'&amp;confirm=1',
-                                 'fields.php?d='.$data->id);
+                                 'field.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$fid.'&amp;sesskey='.sesskey().'&amp;confirm=1',
+                                 'field.php?d='.$data->id);
 
                     print_footer($course);
                     exit;
                     /// Print Action Column
                     $table->data[] = array(
 
-                    '<a href="fields.php?d='.$data->id.'&amp;mode=display&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
+                    '<a href="field.php?d='.$data->id.'&amp;mode=display&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
                     '<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.get_string('edit').'" /></a>'.
                     '&nbsp;'.
-                    '<a href="fields.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
+                    '<a href="field.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
                     '<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.get_string('delete').'" /></a>',
 
 
-                    '<a href="fields.php?mode=display&amp;d='.$data->id.
+                    '<a href="field.php?mode=display&amp;d='.$data->id.
                     '&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.$field->field->name.'</a>'.
                     '</td>',
 
         
         echo '<div class="fieldadd" align="center">';
         echo get_string('newfield','data').': ';
-        popup_form($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id.'&amp;mode=new&amp;sesskey='.
+        popup_form($CFG->wwwroot.'/mod/data/field.php?d='.$data->id.'&amp;mode=new&amp;sesskey='.
                    sesskey().'&amp;newtype=', $menufield, 'fieldform', '', 'choose');
         helpbutton('fields', get_string('addafield','data'), 'data');
         echo '</div>';
index 25584fe5d7ac2fc1cac466ea8cc0ca518e6c2cb8..bdd5a067389e991dd9716cb082ac0e34a37599db 100755 (executable)
@@ -59,7 +59,7 @@
     
     if (isteacher($course->id)) {
         if (!count_records('data_fields','dataid',$data->id)) {      // Brand new database!
-            redirect($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id);  // Redirect to field entry
+            redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id);  // Redirect to field entry
         }
     }
 
index 3ceda955ac16727f70d014a750f2c6e2d150344a..34023594e7493d92757dc826066dce5d6cfab976 100755 (executable)
@@ -181,7 +181,7 @@ class data_field_base {     /// Base class for Database Field Types (see field/*
         }
         print_simple_box_start('center','80%');
 
-        echo '<form name="editfield" action="'.$CFG->wwwroot.'/mod/data/fields.php" method="post">'."\n";
+        echo '<form name="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
         echo '<input type="hidden" name="d" value="'.$this->data->id.'" />'."\n";
         if (empty($this->field->id)) {
             echo '<input type="hidden" name="mode" value="add" />'."\n";
@@ -294,7 +294,7 @@ class data_field_base {     /// Base class for Database Field Types (see field/*
     function image() {
         global $CFG;
 
-        $str = '<a href="fields.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;sesskey='.sesskey().'">';
+        $str = '<a href="field.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;sesskey='.sesskey().'">';
         $str .= '<img src="'.$CFG->modpixpath.'/data/field/'.$this->type.'/icon.gif" ';
         $str .= 'height="'.$this->iconheight.'" width="'.$this->iconwidth.'" border="0" alt="'.$this->type.'" title="'.$this->type.'" /></a>';
         return $str;
index e16289787dc52942e7b738ea7e7fbcf068ba06a6..b97edb7c4940746891c971b7d47056bf0dc426cc 100755 (executable)
@@ -38,7 +38,7 @@
     }
     if (isteacher($course->id)) {
         $row[] = new tabobject('templates', $CFG->wwwroot.'/mod/data/templates.php?d='.$data->id.'&amp;mode=singletemplate', get_string('templates','data'));
-        $row[] = new tabobject('fields', $CFG->wwwroot.'/mod/data/fields.php?d='.$data->id, get_string('fields','data'), '', true);
+        $row[] = new tabobject('fields', $CFG->wwwroot.'/mod/data/field.php?d='.$data->id, get_string('fields','data'), '', true);
     }
 
     $tabs[] = $row;
index 000d7be61ecb65ddd5af5942af82c8bd4c1ebad4..a466353cda621c45dd836d72937ac92166501139 100755 (executable)
@@ -61,7 +61,7 @@
     
     if (isteacher($course->id)) {
         if (!count_records('data_fields','dataid',$data->id)) {      // Brand new database!
-            redirect($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id);  // Redirect to field entry
+            redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id);  // Redirect to field entry
         }
     }
 
index a791e681ab0468d54405d2345a5a5f108ae939f0..dffe81f8440c6dbbe35c2873da313f40910f2082 100755 (executable)
@@ -66,7 +66,7 @@
 
     if (isteacher($course->id)) {
         if (!record_exists('data_fields','dataid',$data->id)) {      // Brand new database!
-            redirect($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id);  // Redirect to field entry
+            redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id);  // Redirect to field entry
         }
     }