Skip to content

Commit

Permalink
MDL-13397 Fixed the language string. Merging from HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Mar 31, 2008
1 parent 7b05b27 commit dddf8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lang/en_utf8/data.php
Expand Up @@ -75,7 +75,7 @@
$string['emptyadd'] = 'The Add template is empty, generating a default form...';
$string['emptyaddform'] = 'You did not fill out any fields!';
$string['entries'] = 'Entries';
$string['entrieslefttoadd'] = 'You must add $a more entry/entries before you can view other participants\' entries.';
$string['entrieslefttoadd'] = 'You must add $a->entriesleft more entry/entries before you can view other participants\' entries.';
$string['entry'] = 'Entry';
$string['entrysaved'] = 'Your entry has been saved';
$string['errormustbeteacher'] = 'You need to be a teacher to use this page!';
Expand Down
13 changes: 2 additions & 11 deletions mod/data/view.php
Expand Up @@ -332,21 +332,12 @@
$requiredentries_allowed = true;
$numentries = data_numentries($data);
if ($data->requiredentries > 0 && $numentries < $data->requiredentries && !has_capability('mod/data:manageentries', $context)) {
$entriesleft = $data->requiredentries - $numentries;
$strentrieslefttoadd = get_string('entrieslefttoadd', 'data', $entriesleft);
$data->entriesleft = $data->requiredentries - $numentries;
$strentrieslefttoadd = get_string('entrieslefttoadd', 'data', $data);
notify($strentrieslefttoadd);
$requiredentries_allowed = false;
}

// If not teacher, check whether user has sufficient records to view
if (!has_capability('mod/data:managetemplates', $context) and data_numentries($data) < $data->requiredentriestoview){
notify (($data->requiredentriestoview - data_numentries($data)).'&nbsp;'.get_string('insufficiententries','data'));
echo '</td></tr></table>';
print_footer($course);
exit;
}


/// We need to examine the whole dataset to produce the correct paging

if ((!has_capability('mod/data:managetemplates', $context)) && ($data->approval)) {
Expand Down

0 comments on commit dddf8e4

Please sign in to comment.