MDL-13397 Fixed the language string. Merging from HEAD

This commit is contained in:
nicolasconnault
2008-03-31 06:18:11 +00:00
parent 947c93bc0a
commit f8d1a60893
2 changed files with 3 additions and 12 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ $string['editordisable'] = 'Disable editor';
$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!';
+2 -11
View File
@@ -270,21 +270,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)) {