From c95034f28c0c493e9d3e6e4ee3eaa48d5766c0ff Mon Sep 17 00:00:00 2001 From: dongsheng Date: Fri, 11 Apr 2008 02:34:11 +0000 Subject: [PATCH] MDL-9758, add 2 new tags, see tracker. --- mod/data/lib.php | 6 ++++++ mod/data/templates.php | 2 ++ mod/data/view.php | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index 750b423435..243517b44b 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -966,6 +966,12 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re $patterns[]='##user##'; $replacement[] = ''.fullname($record).''; + + $patterns[] = '##timeadded##'; + $replacement[] = ''.get_string('data:added', 'data').userdate($record->timecreated).''; + + $patterns[] = '##timemodified##'; + $replacement [] = ''.get_string('data:modified', 'data').userdate($record->timemodified).''; $patterns[]='##approve##'; if (has_capability('mod/data:approve', $context) && ($data->approval) && (!$record->approved)){ diff --git a/mod/data/templates.php b/mod/data/templates.php index ca94a363bb..1855bedc94 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -226,6 +226,8 @@ echo ''; echo ''; echo ''; + echo ''; + echo ''; echo ''; if ($mode != 'singletemplate') { // more points to single template - not useable there diff --git a/mod/data/view.php b/mod/data/view.php index 146507cf03..c3ed5e3f71 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -418,7 +418,7 @@ } else { - $what = ' DISTINCT r.id, r.approved, r.timecreated, r.userid, u.firstname, u.lastname '; + $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname '; $count = ' COUNT(r.id) '; $tables = $CFG->prefix.'data_records r, '.$CFG->prefix.'user u '; $where = 'WHERE r.dataid = '.$data->id. ' AND r.userid = u.id '; -- 2.39.5