$perpage = optional_param('perpage', 100, PARAM_INT);
if (! $course = get_record("course", "id", $id)) {
- print_error("Course id is incorrect.");
+ print_error('invalidcourseid', 'error');
}
if (! $user = get_record("user", "id", $user)) {
- print_error("User ID is incorrect");
+ print_error('invaliduserid', 'error');
}
//require_login($course);
// if in either context, we can read report, then we can proceed
if (!(has_capability('moodle/site:viewreports', $coursecontext) or ($course->showreports and $USER->id == $user->id) or has_capability('moodle/user:viewuseractivitiesreport', $personalcontext))) {
- print_error("You are not allowed to look at this page");
+ print_error('nopermissiontoviewpage', 'error');
}
add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id");
case 'stats':
if (empty($CFG->enablestats)) {
- print_error("Stats is not enabled.");
+ print_error('statsdisable', 'error');
}
require_once($CFG->dirroot.'/lib/statslib.php');
if (empty($id) && empty($name) && empty($idnumber)) {
- print_error("Must specify course id, short name or idnumber");
+ print_error('unspecifycourseid', 'error');
}
if (!empty($name)) {
if (! ($course = get_record('course', 'shortname', $name)) ) {
- print_error('Invalid short course name');
+ print_error('invalidcoursenameshort', 'error');
}
} else if (!empty($idnumber)) {
if (! ($course = get_record('course', 'idnumber', $idnumber)) ) {
- print_error('Invalid course idnumber');
+ print_error('invalidcourseid', 'error');
}
} else {
if (! ($course = get_record('course', 'id', $id)) ) {
- print_error('Invalid course id');
+ print_error('invalidcourseid', 'error');
}
}
$section->id = insert_record('course_sections', $section);
}
if (! $sections = get_all_sections($course->id) ) { // Try again
- print_error('Error finding or creating section structures for this course');
+ print_error('cannotcreateorfindstructs', 'error');
}
}
$string['cannotcreatelangbase'] = 'Error: Could not create base lang directory.';
$string['cannotcreatetempdir'] = 'Cannot create temp dir.';
$string['cannotcreatesitedir'] = 'Cannot create site folder. The site administrator needs to fix the file permissions.';
+$string['cannotcreateorfindstructs'] = 'Error finding or creating section structures for this course';
$string['cannotcustomizelocallang'] = 'You do not have permission to customize the strings translation. This permission is controlled by the capability "moodle/site:langeditlocal". Set this capability to allow you to edit local language packages in case you want to modify translations for your site.';
$string['cannotdeletelangcache'] = 'Language cache can not be deleted, please fix permissions in dataroot/cache/languages!';
$string['cannotdeleterole'] = 'It can not be deleted, because $a';
$string['invalidcourse'] = 'Invalid course';
$string['invalidcourseid'] = 'You are tring to use an invalid course ID: ($a)';
$string['invalidcoursemodule'] = 'Bad course module ID';
+$string['invalidcoursenameshort'] = 'Invalid short course name';
+$string['invalidevent'] = 'Invalid event';
$string['invalidfieldname'] = '\"$a\" is not a valid field name';
$string['invalidfiletype'] = '\"$a\" is not a valid file type';
$string['invalidgroupid'] = 'INcorrect group id specified.';
$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['nopermissiontoviewpage'] = 'You are not allowed to look at this patge';
$string['nosite'] = 'No sites';
$string['nositeid'] = 'No site ID';
$string['nostatstodisplay'] = 'There is no available data to display, sorry.';
$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['unspecifycourseid'] = 'Must specify course id, short name or idnumber';
$string['statsnodata'] = 'There is no available data for that combination of course and time period.';
+$string['statsdisable'] = 'Stats is not enabled.';
$string['unknowaction']= 'Unknown action!';
$string['unknowncourse'] = 'Unknown course named \"$a\"';
$string['unknowncourseidnumber'] = 'Unknown Course ID \"$a\"';
$string['unknowngroup'] = 'Unknown group \"$a\"';
$string['unknownrole'] = 'Unknown role \"$a\"';
$string['unknownuseraction'] = 'Sorry, I do not understand this user action.';
+$string['unsupportedevent'] = 'Unsupported event type';
$string['urlnotdefinerss'] = 'URL not defined for rss feed';
$string['userautherror'] = 'Unknown auth plugin.';
$string['userauthunsupported'] = 'Auth plugin not supported here.';