From 91f3f616a6af492166dba37644964a5b54c0519a Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 5 Jan 2007 02:38:09 +0000 Subject: [PATCH] MDL-7861, strict xhtml fixes --- mod/data/lib.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index 5bda765d48..3ca39f9792 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -330,21 +330,23 @@ function data_generate_default_template(&$data, $template, $recordid=0, $form=fa //get all the fields for that database if ($fields = get_records('data_fields', 'dataid', $data->id, 'id')) { - $str = '
'; + $str = '
'; $str .= ''; foreach ($fields as $field) { $str .= ''; $str .='
'; - if ($template == 'addtemplate') { - $str .= 'type, array('picture', 'checkbox', 'date', 'latlong', 'radiobutton'))) { - $str .= ' for="[['.$field->name.'#id]]"'; - } - $str .= '>'.$field->name.''; - } else { + // Yu: commenting this out, the id was wrong and will fix later + //if ($template == 'addtemplate') { + //$str .= 'type, array('picture', 'checkbox', 'date', 'latlong', 'radiobutton'))) { + // $str .= ' for="[['.$field->name.'#id]]"'; + //} + //$str .= '>'.$field->name.''; + + //} else { $str .= $field->name.': '; - } + //} $str .= ''; @@ -911,7 +913,7 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re * output null * ************************************************************************/ function data_print_preference_form($data, $perpage, $search, $sort='', $order='ASC'){ - echo '
'; + echo '
'; echo '
'; echo ''; echo ' '; @@ -962,7 +964,7 @@ function data_print_ratings($data, $record) { if ($ratingsscale = make_grades_menu($data->scale)) { $ratingsmenuused = false; - echo '
'; + echo '
'; echo ''; if (has_capability('mod/data:rate', $context) and !data_isowner($record->id)) { @@ -1106,7 +1108,7 @@ function data_print_comments($data, $record, $page=0, $mform=false) { $editor = optional_param('addcomment', 0, PARAM_BOOL); if (!$mform and !$editor) { - echo '
'; + echo ''; } else { @@ -1115,7 +1117,7 @@ function data_print_comments($data, $record, $page=0, $mform=false) { $mform = new mod_data_comment_form('comment.php'); $mform->set_defaults(array('mode'=>'add', 'page'=>$page, 'rid'=>$record->id)); } - echo '
'; + echo '
'; $mform->display(); echo '
'; } -- 2.39.5