From: skodak Date: Wed, 6 Dec 2006 09:57:42 +0000 (+0000) Subject: MDL-7812 warning in sorting form in data module when no fields defined X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=196da4a45edb007a32c7300be3a38bdfc7c06a7f;p=moodle.git MDL-7812 warning in sorting form in data module when no fields defined --- 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 ''; }