Renamed fields.php to field.php
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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&mode=display&fid=$fid", $fid, $cm->id);
|
||||
"field.php?d=$data->id&mode=display&fid=$fid", $fid, $cm->id);
|
||||
|
||||
$displaynoticegood = get_string('fieldadded','data');
|
||||
}
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
|
||||
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);
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
data_replace_field_in_templates($data, $oldfieldname, $field->field->name);
|
||||
|
||||
add_to_log($course->id, 'data', 'fields update',
|
||||
"fields.php?d=$data->id&mode=display&fid=$fid", $fid, $cm->id);
|
||||
"field.php?d=$data->id&mode=display&fid=$fid", $fid, $cm->id);
|
||||
|
||||
$displaynoticegood = get_string('fieldupdated','data');
|
||||
}
|
||||
@@ -142,7 +142,7 @@
|
||||
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');
|
||||
}
|
||||
@@ -155,8 +155,8 @@
|
||||
$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.'&mode=delete&fid='.$fid.'&sesskey='.sesskey().'&confirm=1',
|
||||
'fields.php?d='.$data->id);
|
||||
'field.php?d='.$data->id.'&mode=delete&fid='.$fid.'&sesskey='.sesskey().'&confirm=1',
|
||||
'field.php?d='.$data->id);
|
||||
|
||||
print_footer($course);
|
||||
exit;
|
||||
@@ -217,14 +217,14 @@
|
||||
/// Print Action Column
|
||||
$table->data[] = array(
|
||||
|
||||
'<a href="fields.php?d='.$data->id.'&mode=display&fid='.$field->field->id.'&sesskey='.sesskey().'">'.
|
||||
'<a href="field.php?d='.$data->id.'&mode=display&fid='.$field->field->id.'&sesskey='.sesskey().'">'.
|
||||
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.get_string('edit').'" /></a>'.
|
||||
' '.
|
||||
'<a href="fields.php?d='.$data->id.'&mode=delete&fid='.$field->field->id.'&sesskey='.sesskey().'">'.
|
||||
'<a href="field.php?d='.$data->id.'&mode=delete&fid='.$field->field->id.'&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&d='.$data->id.
|
||||
'<a href="field.php?mode=display&d='.$data->id.
|
||||
'&fid='.$field->field->id.'&sesskey='.sesskey().'">'.$field->field->name.'</a>'.
|
||||
'</td>',
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
echo '<div class="fieldadd" align="center">';
|
||||
echo get_string('newfield','data').': ';
|
||||
popup_form($CFG->wwwroot.'/mod/data/fields.php?d='.$data->id.'&mode=new&sesskey='.
|
||||
popup_form($CFG->wwwroot.'/mod/data/field.php?d='.$data->id.'&mode=new&sesskey='.
|
||||
sesskey().'&newtype=', $menufield, 'fieldform', '', 'choose');
|
||||
helpbutton('fields', get_string('addafield','data'), 'data');
|
||||
echo '</div>';
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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.'&fid='.$this->field->id.'&mode=display&sesskey='.sesskey().'">';
|
||||
$str = '<a href="field.php?d='.$this->data->id.'&fid='.$this->field->id.'&mode=display&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;
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
}
|
||||
if (isteacher($course->id)) {
|
||||
$row[] = new tabobject('templates', $CFG->wwwroot.'/mod/data/templates.php?d='.$data->id.'&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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user