From: moodler Date: Sat, 15 Apr 2006 02:41:27 +0000 (+0000) Subject: FIxes for bug 5197 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3f9672d37cd409b156d3e5410e222229f9b5eccf;p=moodle.git FIxes for bug 5197 --- diff --git a/mod/data/lib.php b/mod/data/lib.php index b7371f8523..841fd8399f 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -1106,6 +1106,8 @@ function data_get_ratings($recordid, $sort="u.firstname ASC") { //prints all comments + a text box for adding additional comment function data_print_comments($data, $record, $page=0) { + global $CFG; + echo ''; if ($comments = get_records('data_comments','recordid',$record->id)) { diff --git a/mod/data/view.php b/mod/data/view.php index 0f31ee39cf..f195763516 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -229,7 +229,7 @@ 'view.php?d='.$data->id); $records[] = $deleterecord; - data_print_template('singletemplate', $records, $data); + echo data_print_template('singletemplate', $records, $data, '', 0, true); print_footer($course); exit; @@ -417,6 +417,7 @@ if (empty($data->singletemplate)){ notify(get_string('nosingletemplate','data')); + data_generate_default_template($data, 'singletemplate', 0, false, false); } data_print_template('singletemplate', $records, $data, $search, $page); @@ -430,6 +431,7 @@ if (empty($data->listtemplate)){ notify(get_string('nolisttemplate','data')); + data_generate_default_template($data, 'listtemplate', 0, false, false); } echo $data->listtemplateheader; data_print_template('listtemplate', $records, $data, $search, $page);