MDL-9758, add 2 new tags, see tracker.
This commit is contained in:
@@ -966,6 +966,12 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re
|
||||
$patterns[]='##user##';
|
||||
$replacement[] = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$record->userid.
|
||||
'&course='.$data->course.'">'.fullname($record).'</a>';
|
||||
|
||||
$patterns[] = '##timeadded##';
|
||||
$replacement[] = '<span>'.get_string('data:added', 'data').userdate($record->timecreated).'</span>';
|
||||
|
||||
$patterns[] = '##timemodified##';
|
||||
$replacement [] = '<span>'.get_string('data:modified', 'data').userdate($record->timemodified).'</span>';
|
||||
|
||||
$patterns[]='##approve##';
|
||||
if (has_capability('mod/data:approve', $context) && ($data->approval) && (!$record->approved)){
|
||||
|
||||
@@ -226,6 +226,8 @@
|
||||
echo '<option value="##edit##">' .get_string('edit', 'data'). ' - ##edit##</option>';
|
||||
echo '<option value="##delete##">' .get_string('delete', 'data'). ' - ##delete##</option>';
|
||||
echo '<option value="##approve##">' .get_string('approve', 'data'). ' - ##approve##</option>';
|
||||
echo '<option value="##timeadded##">'.get_string('timeadded', 'data'). ' - ##timeadded##</option>';
|
||||
echo '<option value="##timemodified##">'.get_string('timemodified', 'data'). ' - ##timemodified##</option>';
|
||||
echo '<option value="##user##">' .get_string('user'). ' - ##user##</option>';
|
||||
if ($mode != 'singletemplate') {
|
||||
// more points to single template - not useable there
|
||||
|
||||
+1
-1
@@ -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 ';
|
||||
|
||||
Reference in New Issue
Block a user