Commit 51770f92 authored by dongsheng's avatar dongsheng
Browse files

MDL-14129, createing error string

parent bdfa0433
......@@ -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
......
......@@ -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";
......
......@@ -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');
}
......
......@@ -32,12 +32,12 @@
}
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');
}
}
......
......@@ -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\"';
......
......@@ -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';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment