if (($marker >=0) && has_capability('moodle/course:setcurrentsection', $context) && confirm_sesskey()) {
$course->marker = $marker;
if (! set_field("course", "marker", $marker, "id", $course->id)) {
- print_error("Could not mark that topic for this course");
+ print_error("cannotmarktopic");
}
}
$strimportactivities = get_string('importactivities');
if (! ($course = get_record("course", "id", $id)) ) {
- print_error("That's an invalid course id");
+ print_error("invalidcourseid");
}
if (!$site = get_site()){
- print_error("Couldn't get site course");
+ print_error("siteisnotdefined", 'debug');
}
require_login($course->id);
$syscontext = get_context_instance(CONTEXT_SYSTEM);
if (!has_capability('moodle/course:manageactivities', $tocontext)) {
- print_error("You need do not have the required permissions to import activities to this course");
+ print_error('nopermissiontoimportact');
}
// if we're not a course creator , we can only import from our own courses.
if ($from = get_record('course', 'id', $fromcourse)) {
if (!has_capability('moodle/course:manageactivities', $fromcontext)) {
- print_error("You need to have the required permissions in the course you are importing data from, as well");
+ print_error('nopermissiontoimportact');
}
if (!empty($filename) && file_exists($CFG->dataroot.'/'.$filename) && !empty($SESSION->import_preferences)) {
$restore = backup_to_restore_array($SESSION->import_preferences);
$date = optional_param('date', 0, PARAM_INT); // A time of a day (in GMT)
if (! $course = get_record("course", "id", $id)) {
- print_error("Course is misconfigured");
+ print_error('invalidcourseid');
}
require_login($course->id);
if (! (has_capability('moodle/site:viewreports', $context)
or ($course->showreports and $USER->id == $user)) ) {
- print_error("Sorry, you aren't allowed to see this.");
+ print_error("nopermissions");
}
if ($user) {
if (! $user = get_record("user", "id", $user)) {
- print_error("Can not find that user");
+ print_error("nousers");
}
}
$page = optional_param('page', 0, PARAM_INT); // which page to show
if (! $course = get_record("course", "id", $id) ) {
- print_error("That's an invalid course id");
+ print_error('invalidcourseid');
}
require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/site:viewreports', $context)) {
- print_error('You need do not have the required permission to view this report');
+ print_error('nopermissions');
}
add_to_log($course->id, "course", "report live", "report/log/live.php?id=$course->id", $course->id);
$id = required_param('id',PARAM_INT); // course id
if (!$course = get_record('course', 'id', $id)) {
- print_error('Course id is incorrect.');
+ print_error('invalidcourseid');
}
require_login($course);
print_heading(format_string($course->fullname));
if (!$logstart = get_field_sql("SELECT MIN(time) FROM {$CFG->prefix}log")) {
- print_error('Logs not available');
+ print_error('logfilenotavailable');
}
echo '<div class="loginfo">'.get_string('computedfromlogs', 'admin', userdate($logstart)).'</div>';
$roleid = optional_param('roleid',0,PARAM_INT);
if (!$course = get_record("course","id",$courseid)) {
- print_error("That's an invalid course id");
+ print_error("invalidcourseid");
}
if (!empty($userid)) {
if (!$user = get_record('user','id',$userid)) {
- print_error("That's an invalid user id");
+ print_error("nousers");
}
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/site:viewreports', $context)) {
- print_error('You need do not have the required permission to view reports for this course');
+ print_error('nopermissions');
}
stats_check_uptodate($course->id);
require_once($CFG->dirroot.'/course/report/stats/lib.php');
if (empty($CFG->enablestats)) {
- print_error("Stats is not enabled.");
+ print_error("statsdisable");
}
$courseid = required_param('course', PARAM_INT);
}
if (!$course = get_record("course","id",$courseid)) {
- print_error("That's an invalid course id");
+ print_error("invalidcourseid");
}
if (!empty($userid)) {
if (!$user = get_record('user','id',$userid)) {
- print_error("That's an invalid user id");
+ print_error("nousers");
}
}
.' ORDER BY u.lastname, u.firstname ASC';
if (!$us = get_records_sql($sql)) {
- print_error('Cannot enter detailed view: No users found for this course.');
+ print_error('nousers');
}
foreach ($us as $u) {
if (!empty($report) && !empty($time)) {
if ($report == STATS_REPORT_LOGINS && $course->id != SITEID) {
- print_error('This type of report is only available for the site course');
+ print_error('reportnotavailable');
}
$param = stats_get_parameters($time,$report,$course->id,$mode);
$string['cannotfindhelp'] = 'Cannot find \"$a\" language help files';
$string['cannotfindlang'] = 'Cannot find \"$a\" language pack!';
$string['cannotfindsite'] = 'Cannot find site-level course';
+$string['cannotmarktopic'] = 'Could not mark that topic for this course';
$string['cannotmoverolewithid'] = 'Cannot move role with ID $a';
$string['cannotmetacourse'] = 'Could not add the selected course to this meta course!';
$string['cannotoverridebaserole'] = 'Can not override base role capabilities';
$string['listcantmoveright'] = 'Failed to move item right, their is no peer to make it a child of. Move it below another peer and then you can move it right.';
$string['loginasonecourse'] = 'You can not enter this course.<br /> You have to terminate the \"Login as\" session before entering any other course.';
$string['loginasnoenrol'] = 'You can not use enrol or unenrol when in course \"Login as\" session.';
+$string['logfilenotavailable] = 'Logs not available';
$string['messagingdisable'] = 'Messaging is disabled on this site';
$string['missingfield'] = 'Field \"$a\" is missing.';
$string['missingrequiredfield'] = 'Some required field is missing';
$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['nopermissiontoimportact'] = 'You need do not have the required permissions to import activities to this course';
$string['nopermissiontoviewpage'] = 'You are not allowed to look at this page';
$string['nopermissiontomanagegroup'] = 'You do not have the required permissions to manage groups.';
$string['nosite'] = 'No sites';
$string['remotedownloaderror'] = 'Download of component to your server failed, please verify proxy settings, PHP cURL extension is highly recommended.<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
$string['remotedownloadnotallowed'] = 'Download of components to your server isn\'t allowed (allow_url_fopen is disabled).<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
$string['restricteduser'] = 'Sorry, but your current account \"$a\" is restricted from doing that.';
+$string['reportnotavailable'] = 'This type of report is only available for the site course';
$string['rpcerror'] = 'RPC enrol/mnet/available_courses: ($a)';
$string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
$string['sectionnotexist'] = 'This section does not exist';
$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['statsdisable'] = 'Stats is not enabled.';
$string['statsnodata'] = 'There is no available data for that combination of course and time period.';
$string['statsdisable'] = 'Stats is not enabled.';
$string['unenrolerror'] = 'An error occurred while trying to unenrol that person.';