]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13397 Fixed the language string.
authornicolasconnault <nicolasconnault>
Mon, 31 Mar 2008 06:15:51 +0000 (06:15 +0000)
committernicolasconnault <nicolasconnault>
Mon, 31 Mar 2008 06:15:51 +0000 (06:15 +0000)
lang/en_utf8/data.php
mod/data/view.php

index 4144ce332464a2146b53f985f3b1e8e3e8af53a8..b44f33140859b05927809029ee1929fd90ede544 100644 (file)
@@ -75,7 +75,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!';
index a018a33c49617fe0690ab622b68c52f283ba7127..4427a6aaa6432608df73b7b30411eac94a29bc00 100755 (executable)
     $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)) {