MDL-11896 added hint if entry awaits approvel

This commit is contained in:
skodak
2009-09-27 18:07:53 +00:00
parent fca567dee4
commit 582d4d91a0
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -301,6 +301,13 @@
$currentgroup = groups_get_activity_group($cm);
$groupmode = groups_get_activity_groupmode($cm);
// deletect entries not approved yet and show hint instead of not found error
if ($record and $data->approval and !$record->approved and $record->userid != $USER->id and !has_capability('mod/data:manageentries', $context)) {
if (!$currentgroup or $record->groupid == $currentgroup or $record->groupid == 0) {
print_error('notapproved', 'data');
}
}
print_heading(format_string($data->name));
// Do we need to show a link to the RSS feed for the records?