From 196da4a45edb007a32c7300be3a38bdfc7c06a7f Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 6 Dec 2006 09:57:42 +0000 Subject: [PATCH] MDL-7812 warning in sorting form in data module when no fields defined --- mod/data/field.php | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/mod/data/field.php b/mod/data/field.php index e53de75966..dda2bf2abc 100755 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -297,32 +297,32 @@ helpbutton('fields', get_string('addafield','data'), 'data'); echo ''; - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ' '.get_string('defaultsortfield','data').':'; - $fields = get_records('data_fields','dataid',$data->id); - echo ''; + echo ''; + echo ''; + echo ' '.get_string('defaultsortfield','data').':'; + echo ''; + echo ' '; + + $options = array(0 => get_string('ascending', 'data'), + 1 => get_string('descending', 'data')); + choose_from_menu($options, 'defaultsortdir', $data->defaultsortdir, ''); + echo ''; + + echo '
'; + echo '
'; } - echo ''; - - echo ' '; - - $options = array(0 => get_string('ascending', 'data'), - 1 => get_string('descending', 'data')); - choose_from_menu($options, 'defaultsortdir', $data->defaultsortdir, ''); - echo ''; - - echo ''; - echo ''; } -- 2.39.5