]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14129, createing error string
authordongsheng <dongsheng>
Thu, 10 Apr 2008 05:58:13 +0000 (05:58 +0000)
committerdongsheng <dongsheng>
Thu, 10 Apr 2008 05:58:13 +0000 (05:58 +0000)
admin/report/backups/index.php
admin/report/courseoverview/index.php
admin/report/courseoverview/reportsgraph.php
admin/report/stats/index.php
lang/en_utf8/error.php
lang/en_utf8/moodle.php

index a8a4925dee16be143f2be543c592dbbfbd460aad..4591676982a78a1878d179dbc1cbf7d5a978c917 100644 (file)
@@ -15,7 +15,7 @@
 
 /// Scheduled backups are disabled by the server admin
     if (!empty($CFG->disablescheduledbackups)) {
-        print_error('scheduledbackupsdisabled', '', '', NULL, true);
+        print_error('scheduledbackupsdisabled', 'error');
     }
 
 /// Scheduled backups aren't active by the site admin
index b4651036c49be1af458528d0b192264b03f181ca..7bbd95c4911119e65f343338ff8a39074b5b6c35 100644 (file)
@@ -43,7 +43,7 @@
     $timeoptions = stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth);
 
     if (empty($timeoptions)) {
-        error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
+        print_error('nostatstodisplay', 'error', $CFG->wwwroot.'/course/view.php?id='.$course->id);
     }
 
     echo '<form action="index.php" method="post">'."\n";
index a03e2d4e2d10a20096b8dd600f9c40cb674f66a3..a0c71c0faad6a8f04f72c9d821f25c997d39db79 100644 (file)
@@ -29,7 +29,7 @@
     $courses = get_records_sql($sql, 0, $numcourses);
 
     if (empty($courses)) {
-        error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
+        print_error('statsnodata', 'error', $CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
     }
 
 
index 149f769af2cb0f95d3329e0bc0dc1dcbcad46181..0d857c3284479203b9b35bb1f08d1098c1129997 100644 (file)
     }
 
     if (!$course = get_record("course","id",$courseid)) {
-        print_error("That's an invalid course id");
+        print_error('invalidcourse', 'error');
     }
 
     if (!empty($userid)) {
         if (!$user = get_record('user','id',$userid)) {
-            print_error("That's an invalid user id");
+            print_error('invaliduser', 'error');
         }
     }
 
index ae4d520ab4c00716441708c12305329150d01754..d173f6e917d357869c5649493c01f90c5bd18a6b 100644 (file)
@@ -33,6 +33,7 @@ $string['cannotsavezipfile'] = 'Cannot save ZIP file.';
 $string['cannotsetupcategory'] = 'Serious Error! Could not set up a default course category!';
 $string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
 $string['cannotunzipfile'] = 'Cannot unzip file.';
+$string['cannotupdaterole'] = 'Cannot update role!';
 $string['cannotviewprofile'] = 'You can not view the profile of this user.';
 $string['cantunenrollfrommetacourse'] = 'You can not unenrol from this meta course.';
 $string['cantunenrollinthisrole'] = 'You can not unenrol from this course while you are in your current role.';
@@ -77,6 +78,7 @@ $string['invalidmd5'] = 'Invalid md5';
 $string['invalidrequest'] = 'Invalid request';
 $string['invalidrole'] = 'Invalid role';
 $string['invalidurl'] = 'Invalid url';
+$string['invaliduser'] = 'Invalid user';
 $string['iplookupfailed'] = 'Can not find geo information about this IP address $a.';
 $string['iplookupprivate'] = 'Can not display lookup of private IP address';
 $string['invalidxmlfile'] = '\"$a\" is not a valid XML file';
@@ -104,6 +106,7 @@ $string['nonmeaningfulcontent'] = 'Non meaningful content';
 $string['noparticipatorycms'] = 'Sorry, but you have no participatory course modules to report on.';
 $string['nopermissions'] = 'Sorry, but you do not currently have permissions to do that ($a)';
 $string['nosite'] = 'No sites';
+$string['nostatstodisplay'] = 'There is no available data to display, sorry.';
 $string['notavailable'] = 'That is not currently available';
 $string['onlyadmins'] = 'Only administrators can do that.';
 $string['onlyeditingteachers'] = 'Only editing teachers can do that.';
@@ -123,6 +126,7 @@ $string['sessionipnomatch'] = 'Sorry, but your IP number seems to have changed f
 $string['statscatchupmode'] = 'Statistics is currently in catchup mode. So far $a->daysdone day(s) have been processed and $a->dayspending are pending. Check back soon!';
 $string['tagnotfound'] = 'The specified tag was not found in the database';
 $string['unicodeupgradeerror'] = 'Sorry, but your database is not already in Unicode, and this version of Moodle is not able to migrate your database to Unicode.  Please upgrade to Moodle 1.7.x first and perform the Unicode migration from the Admin page.  After that is done you should be able to migrate to Moodle $a';
+$string['statsnodata'] = 'There is no available data for that combination of course and time period.';
 $string['unknowncourse'] = 'Unknown course named \"$a\"';
 $string['unknowncourseidnumber'] = 'Unknown Course ID \"$a\"';
 $string['unknowngroup'] = 'Unknown group \"$a\"';
index c97387c9fdce53a0419b9cfd064c3c1943c18fbb..2958474bb98eba57a9dc6ab4a81c1695e1cdfaaa 100644 (file)
@@ -1078,7 +1078,6 @@ $string['noresults'] = 'No results';
 $string['normal'] = 'Normal';
 $string['normalfilter'] = 'Normal search';
 $string['nosite'] = 'Could not find site-level course';
-$string['nostatstodisplay'] = 'There is no available data to display, sorry.';
 $string['nostudentsfound'] = 'No $a found';
 $string['nostudentsingroup'] = 'There are no students in this group yet';
 $string['nostudentsyet'] = 'No students enrolled in this course yet';
@@ -1393,7 +1392,6 @@ $string['stats'] = 'Statistics';
 $string['statslogins'] = 'Logins';
 $string['statsmodedetailed'] = 'Detailed (user) view';
 $string['statsmodegeneral'] = 'General view';
-$string['statsnodata'] = 'There is no available data for that combination of course and time period.';
 $string['statsnodatauser'] = 'There is no available data for that combination of course, user and time period.';
 $string['statsoff'] = 'Statistics is not currently enabled';
 $string['statsreads'] = 'Views';