//prints all comments + a text box for adding additional comment
function data_print_comments($data, $record, $page=0) {
+ global $CFG;
+
echo '<a name="comments"></a>';
if ($comments = get_records('data_comments','recordid',$record->id)) {
'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;
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);
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);