Skip to content

Commit

Permalink
MDL-11896 added hint if entry awaits approval
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 27, 2009
1 parent 12058e6 commit ebb621f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/en_utf8/data.php
Expand Up @@ -200,6 +200,7 @@
$string['norecords'] = 'No entries in database';
$string['norating'] = 'This activity does not use ratings';
$string['nosingletemplate'] = 'Single template is not yet defined';
$string['notapproved'] = 'Entry is not approved yet.';
$string['notinjectivemap'] = 'Not an injective map';
$string['number'] = 'Number';
$string['numberrssarticles'] = 'RSS articles';
Expand Down
7 changes: 7 additions & 0 deletions mod/data/view.php
Expand Up @@ -303,6 +303,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');
}
}

echo $OUTPUT->heading(format_string($data->name));

// Do we need to show a link to the RSS feed for the records?
Expand Down

0 comments on commit ebb621f

Please sign in to comment.