"MDL-14129, fix print_error call under course/, see tracker"

This commit is contained in:
dongsheng 2008-05-07 06:02:51 +00:00
parent 211c6890c5
commit ba6018a902
17 changed files with 146 additions and 117 deletions

View file

@ -24,19 +24,19 @@
} }
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("Site isn't defined!"); print_error("siteisnotdefined", 'debug');
} }
if (empty($id)) { if (empty($id)) {
print_error("Category not known!"); print_error("unknowcategory");
} }
if (!$context = get_context_instance(CONTEXT_COURSECAT, $id)) { if (!$context = get_context_instance(CONTEXT_COURSECAT, $id)) {
print_error("Category not known!"); print_error("unknowcategory");
} }
if (!$category = get_record("course_categories", "id", $id)) { if (!$category = get_record("course_categories", "id", $id)) {
print_error("Category not known!"); print_error("unknowcategory");
} }
if (has_capability('moodle/course:create', $context)) { if (has_capability('moodle/course:create', $context)) {
@ -170,7 +170,7 @@
require_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $moveto)); require_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $moveto));
if (! $destcategory = get_record("course_categories", "id", $data->moveto)) { if (! $destcategory = get_record("course_categories", "id", $data->moveto)) {
print_error("Error finding the category"); print_error("cannotfindcategory", '', '', $data->moveto);
} }

View file

@ -9,11 +9,11 @@
require_login(); require_login();
if (!can_delete_course($id)) { if (!can_delete_course($id)) {
print_error('You do not have the permission to delete this course.'); print_error('cannotdeletecourse');
} }
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("Site not found!"); print_error("siteisnotdefined", 'debug');
} }
$strdeletecourse = get_string("deletecourse"); $strdeletecourse = get_string("deletecourse");
@ -21,7 +21,7 @@
$strcategories = get_string("categories"); $strcategories = get_string("categories");
if (! $course = get_record("course", "id", $id)) { if (! $course = get_record("course", "id", $id)) {
print_error("Course ID was incorrect (can't find it)"); print_error("invalidcourseid");
} }
$category = get_record("course_categories", "id", $course->category); $category = get_record("course_categories", "id", $course->category);
@ -49,7 +49,7 @@
} }
if ($delete != md5($course->timemodified)) { if ($delete != md5($course->timemodified)) {
print_error("The check variable was wrong - try again"); print_error("invalidmd5");
} }
if (!confirm_sesskey()) { if (!confirm_sesskey()) {

View file

@ -16,11 +16,11 @@
if($id == SITEID){ if($id == SITEID){
// don't allow editing of 'site course' using this from // don't allow editing of 'site course' using this from
print_error('You cannot edit the site course using this form'); print_error('cannoteditsiteform');
} }
if (!$course = get_record('course', 'id', $id)) { if (!$course = get_record('course', 'id', $id)) {
print_error('Course ID was incorrect'); print_error('invalidcourseid');
} }
require_login($course->id); require_login($course->id);
$category = get_record('course_categories', 'id', $course->category); $category = get_record('course_categories', 'id', $course->category);
@ -30,12 +30,12 @@
$course = null; $course = null;
require_login(); require_login();
if (!$category = get_record('course_categories', 'id', $categoryid)) { if (!$category = get_record('course_categories', 'id', $categoryid)) {
print_error('Category ID was incorrect'); print_error('unknowcategory');
} }
require_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $category->id)); require_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $category->id));
} else { } else {
require_login(); require_login();
print_error('Either course id or category must be specified'); print_error('needcoursecategroyid');
} }
/// prepare course /// prepare course

View file

@ -22,7 +22,7 @@ $categoryupdate = optional_param('categoryupdate', 0, PARAM_BOOL); // Enables th
$resort = optional_param('resort', 0, PARAM_BOOL); $resort = optional_param('resort', 0, PARAM_BOOL);
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("Site isn't defined!"); print_error("siteisnotdefined");
} }
if ($categoryadd) { // Show Add category form: if $id is given, it is used as the parent category if ($categoryadd) { // Show Add category form: if $id is given, it is used as the parent category
@ -33,7 +33,7 @@ if ($categoryadd) { // Show Add category form: if $id is given, it is used as th
$strtitle = get_string("editcategorysettings"); $strtitle = get_string("editcategorysettings");
$context = get_context_instance(CONTEXT_COURSECAT, $id); $context = get_context_instance(CONTEXT_COURSECAT, $id);
if (!$category = get_record("course_categories", "id", $id)) { if (!$category = get_record("course_categories", "id", $id)) {
print_error("Category not known!"); print_error("unknowcategory");
} }
} }
@ -83,7 +83,7 @@ if ($mform->is_cancelled()){
} }
if (!update_record('course_categories', $newcategory)) { if (!update_record('course_categories', $newcategory)) {
print_error( "Could not update the category '$newcategory->name' "); print_error( "cannotupdatecategory", '', '', $newcategory->name);
} else { } else {
if ($newcategory->parent == 0) { if ($newcategory->parent == 0) {
$redirect_link = 'index.php?categoryedit=on'; $redirect_link = 'index.php?categoryedit=on';
@ -210,7 +210,7 @@ if ($id && !$categoryadd && !$categoryupdate && false) {
require_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $moveto)); require_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $moveto));
if (!$destcategory = get_record("course_categories", "id", $data->moveto)) { if (!$destcategory = get_record("course_categories", "id", $data->moveto)) {
print_error("Error finding the destination category"); pritn_error("unknowcategory");
} }
// TODO function to move the category // TODO function to move the category
} }

View file

@ -7,11 +7,11 @@
$id = required_param('id',PARAM_INT); // Week ID $id = required_param('id',PARAM_INT); // Week ID
if (! $section = get_record("course_sections", "id", $id)) { if (! $section = get_record("course_sections", "id", $id)) {
print_error("Course section is incorrect"); print_error("sectionnotexist");
} }
if (! $course = get_record("course", "id", $section->course)) { if (! $course = get_record("course", "id", $section->course)) {
print_error("Could not find the course!"); print_error("invalidcourseid");
} }
require_login($course->id); require_login($course->id);
@ -25,7 +25,7 @@
$timenow = time(); $timenow = time();
if (! set_field("course_sections", "summary", $form->summary, "id", $section->id)) { if (! set_field("course_sections", "summary", $form->summary, "id", $section->id)) {
print_error("Could not update the summary!"); print_error("cannotupdatesummary");
} }
add_to_log($course->id, "course", "editsection", "editsection.php?id=$section->id", "$section->section"); add_to_log($course->id, "course", "editsection", "editsection.php?id=$section->id", "$section->section");

View file

@ -20,7 +20,7 @@
} }
if (! $course = get_record("course", "id", $id)) { if (! $course = get_record("course", "id", $id)) {
print_error("Course ID was incorrect (can't find it)"); print_error("invalidcourseid");
} }
require_login($course->id); require_login($course->id);
@ -65,7 +65,7 @@
$addcourse = clean_param($addcourse, PARAM_INT); $addcourse = clean_param($addcourse, PARAM_INT);
set_time_limit(180); set_time_limit(180);
if (!add_to_metacourse($course->id,$addcourse)) { if (!add_to_metacourse($course->id,$addcourse)) {
print_error("Could not add the selected course to this meta course!"); print_error("cannotmetacourse");
} }
} }
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) { } else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
@ -73,7 +73,7 @@
set_time_limit(180); set_time_limit(180);
$removecourse = clean_param($removecourse, PARAM_INT); $removecourse = clean_param($removecourse, PARAM_INT);
if (! remove_from_metacourse($course->id,$removecourse)) { if (! remove_from_metacourse($course->id,$removecourse)) {
print_error("Could not remove the selected course from this meta course!"); print_error("cannotremovefrommeta");
} }
} }
} else if ($showall and confirm_sesskey()) { } else if ($showall and confirm_sesskey()) {

View file

@ -19,7 +19,7 @@
$context = $sysctx; $context = $sysctx;
if (!$site = get_site()) { if (!$site = get_site()) {
print_error('Site isn\'t defined!'); print_error('siteisnotdefined', 'debug');
} }
if ($CFG->forcelogin) { if ($CFG->forcelogin) {
@ -120,7 +120,7 @@
if ($childcats = get_records('course_categories', 'parent', $deletecat->id)) { if ($childcats = get_records('course_categories', 'parent', $deletecat->id)) {
foreach ($childcats as $childcat) { foreach ($childcats as $childcat) {
if (! set_field('course_categories', 'parent', $deletecat->parent, 'id', $childcat->id)) { if (! set_field('course_categories', 'parent', $deletecat->parent, 'id', $childcat->id)) {
print_error('Could not update a child category!', 'index.php'); print_error('cannotupdatesubcate', '', 'index.php');
} }
} }
} }
@ -131,7 +131,7 @@
if ($childcourses = get_records('course', 'category', $deletecat->id)) { if ($childcourses = get_records('course', 'category', $deletecat->id)) {
foreach ($childcourses as $childcourse) { foreach ($childcourses as $childcourse) {
if (! set_field('course', 'category', $deletecat->parent, 'id', $childcourse->id)) { if (! set_field('course', 'category', $deletecat->parent, 'id', $childcourse->id)) {
print_error('Could not update a child course!', 'index.php'); print_error('cannotupdatesubcourse', '', 'index.php');
} }
} }
} }
@ -163,7 +163,7 @@
unset($tempcat); unset($tempcat);
$tempcat->name = get_string('miscellaneous'); $tempcat->name = get_string('miscellaneous');
if (!$tempcat->id = insert_record('course_categories', $tempcat)) { if (!$tempcat->id = insert_record('course_categories', $tempcat)) {
print_error('Serious error: Could not create a default category!'); print_error('cannotsetupcategory');
} }
$tempcat->context = get_context_instance(CONTEXT_COURSECAT, $tempcat->id); $tempcat->context = get_context_instance(CONTEXT_COURSECAT, $tempcat->id);
mark_context_dirty('/'.SYSCONTEXTID); mark_context_dirty('/'.SYSCONTEXTID);

View file

@ -9,16 +9,16 @@
$name = optional_param('name', false, PARAM_RAW); // Course short name $name = optional_param('name', false, PARAM_RAW); // Course short name
if (!$id and !$name) { if (!$id and !$name) {
print_error("Must specify course id or short name"); print_error("unspecifycourseid");
} }
if ($name) { if ($name) {
if (! $course = get_record("course", "shortname", $name) ) { if (! $course = get_record("course", "shortname", $name) ) {
print_error("That's an invalid short course name"); print_error("invalidshortname");
} }
} else { } else {
if (! $course = get_record("course", "id", $id) ) { if (! $course = get_record("course", "id", $id) ) {
print_error("That's an invalid course id"); print_error("invalidcourseid");
} }
} }

View file

@ -1184,7 +1184,7 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname
} }
asort($modnames, SORT_LOCALE_STRING); asort($modnames, SORT_LOCALE_STRING);
} else { } else {
print_error("No modules are installed!"); print_error("nomodules", 'debug');
} }
if ($rawmods = get_course_mods($courseid)) { if ($rawmods = get_course_mods($courseid)) {
@ -1948,7 +1948,7 @@ function print_my_moodle() {
global $USER, $CFG; global $USER, $CFG;
if (empty($USER->id)) { if (empty($USER->id)) {
print_error("It shouldn't be possible to see My Moodle without being logged in."); print_error('nopermissions', '', '', 'See My Moodle');
} }
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', array('summary')); $courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', array('summary'));
@ -2539,7 +2539,7 @@ function course_in_meta ($course) {
*/ */
function print_standard_coursemodule_settings($form, $features=null) { function print_standard_coursemodule_settings($form, $features=null) {
if (! $course = get_record('course', 'id', $form->course)) { if (! $course = get_record('course', 'id', $form->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
print_groupmode_setting($form, $course); print_groupmode_setting($form, $course);
if (!empty($features->groupings)) { if (!empty($features->groupings)) {
@ -2555,12 +2555,12 @@ function print_groupmode_setting($form, $course=NULL) {
if (empty($course)) { if (empty($course)) {
if (! $course = get_record('course', 'id', $form->course)) { if (! $course = get_record('course', 'id', $form->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
} }
if ($form->coursemodule) { if ($form->coursemodule) {
if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) { if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
$groupmode = groups_get_activity_groupmode($cm); $groupmode = groups_get_activity_groupmode($cm);
} else { } else {
@ -2588,12 +2588,12 @@ function print_grouping_settings($form, $course=NULL) {
if (empty($course)) { if (empty($course)) {
if (! $course = get_record('course', 'id', $form->course)) { if (! $course = get_record('course', 'id', $form->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
} }
if ($form->coursemodule) { if ($form->coursemodule) {
if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) { if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
} else { } else {
$cm = null; $cm = null;
@ -2627,7 +2627,7 @@ function print_grouping_settings($form, $course=NULL) {
function print_visible_setting($form, $course=NULL) { function print_visible_setting($form, $course=NULL) {
if (empty($course)) { if (empty($course)) {
if (! $course = get_record('course', 'id', $form->course)) { if (! $course = get_record('course', 'id', $form->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
} }
if ($form->coursemodule) { if ($form->coursemodule) {

View file

@ -46,7 +46,7 @@
} }
if (! $course = get_record('course', 'id', $id)) { if (! $course = get_record('course', 'id', $id)) {
print_error("Course ID was incorrect"); print_error("invalidcourseid");
} }
/// User must be logged in /// User must be logged in
@ -65,7 +65,7 @@
require_login($course); require_login($course);
require_capability('moodle/user:loginas', $coursecontext); require_capability('moodle/user:loginas', $coursecontext);
if (!has_capability('moodle/course:view', $coursecontext, $userid, false)) { if (!has_capability('moodle/course:view', $coursecontext, $userid, false)) {
print_error('This user is not in this course!'); print_error('usernotincourse');
} }
if (has_capability('moodle/site:doanything', $coursecontext, $userid, false)) { if (has_capability('moodle/site:doanything', $coursecontext, $userid, false)) {
print_error('nologinas'); print_error('nologinas');

View file

@ -58,7 +58,7 @@
{$CFG->prefix}modules md {$CFG->prefix}modules md
WHERE cm.id = '$update' AND WHERE cm.id = '$update' AND
md.id = cm.module")){ md.id = cm.module")){
print_error('Invalid course module id!'); print_error('invalidcourseid');
} }
$returntomod = optional_param('return', 0, PARAM_BOOL); $returntomod = optional_param('return', 0, PARAM_BOOL);
if (file_exists("../mod/$modname/mod_form.php")) { if (file_exists("../mod/$modname/mod_form.php")) {
@ -72,17 +72,17 @@
if (empty($mod->coursemodule)) { //add if (empty($mod->coursemodule)) { //add
if (! $course = get_record("course", "id", $mod->course)) { if (! $course = get_record("course", "id", $mod->course)) {
print_error("This course doesn't exist"); print_error("invalidcourse");
} }
$mod->instance = ''; $mod->instance = '';
$mod->coursemodule = ''; $mod->coursemodule = '';
} else { //delete and update } else { //delete and update
if (! $cm = get_record("course_modules", "id", $mod->coursemodule)) { if (! $cm = get_record("course_modules", "id", $mod->coursemodule)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
$mod->instance = $cm->instance; $mod->instance = $cm->instance;
$mod->coursemodule = $cm->id; $mod->coursemodule = $cm->id;
@ -99,7 +99,7 @@
if (file_exists($modlib)) { if (file_exists($modlib)) {
include_once($modlib); include_once($modlib);
} else { } else {
print_error("This module is missing important code! ($modlib)"); print_error('modulemissingcode', '', '', $modlib);
} }
$addinstancefunction = $mod->modulename."_add_instance"; $addinstancefunction = $mod->modulename."_add_instance";
$updateinstancefunction = $mod->modulename."_update_instance"; $updateinstancefunction = $mod->modulename."_update_instance";
@ -122,7 +122,7 @@
include_once($moderr); include_once($moderr);
die; die;
} }
print_error("Could not update the $mod->modulename", '', "view.php?id=$course->id"); print_error('cannotupdatemod', '', 'view.php?id=$course->id', $mod->modulename);
} }
if (is_string($return)) { if (is_string($return)) {
print_error($return, '', "view.php?id=$course->id"); print_error($return, '', "view.php?id=$course->id");
@ -161,7 +161,7 @@
case "add": case "add":
if (!course_allowed_module($course,$mod->modulename)) { if (!course_allowed_module($course,$mod->modulename)) {
print_error("This module ($mod->modulename) has been disabled for this particular course"); print_error('moduledisable', '', '', $mod->modulename);
} }
if (!isset($mod->name) || trim($mod->name) == '') { if (!isset($mod->name) || trim($mod->name) == '') {
@ -175,7 +175,7 @@
include_once($moderr); include_once($moderr);
die; die;
} }
print_error("Could not add a new instance of $mod->modulename", '', "view.php?id=$course->id"); print_error('cannotaddnewmodule', '', "view.php?id=$course->id", $mod->modulename);
} }
if (is_string($return)) { if (is_string($return)) {
print_error($return, '', "view.php?id=$course->id"); print_error($return, '', "view.php?id=$course->id");
@ -198,14 +198,14 @@
// to each other, so we have to update one of them twice. // to each other, so we have to update one of them twice.
if (! $mod->coursemodule = add_course_module($mod) ) { if (! $mod->coursemodule = add_course_module($mod) ) {
print_error("Could not add a new course module"); print_error("cannotaddcoursemodule");
} }
if (! $sectionid = add_mod_to_section($mod) ) { if (! $sectionid = add_mod_to_section($mod) ) {
print_error("Could not add the new course module to that section"); print_error("cannotaddcmtosection");
} }
if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) { if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) {
print_error("Could not update the course module with the correct section"); print_error("cannotupdatecm");
} }
if (!isset($mod->visible)) { // We get the section's visible field status if (!isset($mod->visible)) { // We get the section's visible field status
@ -250,7 +250,7 @@
"$mod->modulename $mod->instance", $mod->coursemodule); "$mod->modulename $mod->instance", $mod->coursemodule);
break; break;
default: default:
print_error("No mode defined"); print_error('unknowaction');
} }
@ -269,21 +269,21 @@
if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) { if ((!empty($movetosection) or !empty($moveto)) and confirm_sesskey()) {
if (! $cm = get_record("course_modules", "id", $USER->activitycopy)) { if (! $cm = get_record("course_modules", "id", $USER->activitycopy)) {
print_error("The copied course module doesn't exist!"); print_error('copiedcmnotexist');
} }
if (!empty($movetosection)) { if (!empty($movetosection)) {
if (! $section = get_record("course_sections", "id", $movetosection)) { if (! $section = get_record("course_sections", "id", $movetosection)) {
print_error("This section doesn't exist"); print_error("sectionnotexist");
} }
$beforecm = NULL; $beforecm = NULL;
} else { // normal moveto } else { // normal moveto
if (! $beforecm = get_record("course_modules", "id", $moveto)) { if (! $beforecm = get_record("course_modules", "id", $moveto)) {
print_error("The destination course module doesn't exist"); print_error("destinationcmnotexit");
} }
if (! $section = get_record("course_sections", "id", $beforecm->section)) { if (! $section = get_record("course_sections", "id", $beforecm->section)) {
print_error("This section doesn't exist"); print_error("sectionnotexist");
} }
} }
@ -292,7 +292,7 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (!ismoving($section->course)) { if (!ismoving($section->course)) {
print_error("You need to copy something first!"); print_error("needcopy");
} }
moveto_module($cm, $section, $beforecm); moveto_module($cm, $section, $beforecm);
@ -314,7 +314,7 @@
$id = required_param('id',PARAM_INT); $id = required_param('id',PARAM_INT);
if (! $cm = get_record("course_modules", "id", $id)) { if (! $cm = get_record("course_modules", "id", $id)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -328,7 +328,7 @@
} }
if (!set_field("course_modules", "indent", $cm->indent, "id", $cm->id)) { if (!set_field("course_modules", "indent", $cm->indent, "id", $cm->id)) {
print_error("Could not update the indent level on that course module"); print_error("cannotupdatelevel");
} }
if (SITEID == $cm->course) { if (SITEID == $cm->course) {
@ -341,7 +341,7 @@
} else if (!empty($hide) and confirm_sesskey()) { } else if (!empty($hide) and confirm_sesskey()) {
if (! $cm = get_record("course_modules", "id", $hide)) { if (! $cm = get_record("course_modules", "id", $hide)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -362,7 +362,7 @@
} else if (!empty($show) and confirm_sesskey()) { } else if (!empty($show) and confirm_sesskey()) {
if (! $cm = get_record("course_modules", "id", $show)) { if (! $cm = get_record("course_modules", "id", $show)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -370,11 +370,11 @@
require_capability('moodle/course:activityvisibility', $context); require_capability('moodle/course:activityvisibility', $context);
if (! $section = get_record("course_sections", "id", $cm->section)) { if (! $section = get_record("course_sections", "id", $cm->section)) {
print_error("This module doesn't exist"); print_error("sectionnotexist");
} }
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if ($module->visible and ($section->visible or (SITEID == $cm->course))) { if ($module->visible and ($section->visible or (SITEID == $cm->course))) {
@ -394,7 +394,7 @@
$id = required_param( 'id', PARAM_INT ); $id = required_param( 'id', PARAM_INT );
if (! $cm = get_record("course_modules", "id", $id)) { if (! $cm = get_record("course_modules", "id", $id)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -415,7 +415,7 @@
} else if (!empty($copy) and confirm_sesskey()) { // value = course module } else if (!empty($copy) and confirm_sesskey()) { // value = course module
if (! $cm = get_record("course_modules", "id", $copy)) { if (! $cm = get_record("course_modules", "id", $copy)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -423,15 +423,15 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $section = get_record("course_sections", "id", $cm->section)) { if (! $section = get_record("course_sections", "id", $cm->section)) {
print_error("This module doesn't exist"); print_error("sectionnotexist");
} }
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if (! $instance = get_record($module->name, "id", $cm->instance)) { if (! $instance = get_record($module->name, "id", $cm->instance)) {
print_error("Could not find the instance of this module"); print_error("moduleinstancedoesnotexist");
} }
$USER->activitycopy = $copy; $USER->activitycopy = $copy;
@ -453,11 +453,11 @@
} else if (!empty($delete) and confirm_sesskey()) { // value = course module } else if (!empty($delete) and confirm_sesskey()) { // value = course module
if (! $cm = get_record("course_modules", "id", $delete)) { if (! $cm = get_record("course_modules", "id", $delete)) {
print_error("This course module doesn't exist"); print_error('cmunknown');
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
require_login($cm->course); // needed to setup proper $COURSE require_login($cm->course); // needed to setup proper $COURSE
@ -465,7 +465,7 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if (! $instance = get_record($module->name, "id", $cm->instance)) { if (! $instance = get_record($module->name, "id", $cm->instance)) {
@ -476,8 +476,8 @@
if (! delete_course_module($cm->id)) { if (! delete_course_module($cm->id)) {
notify("Could not delete the $module->name (coursemodule)"); notify("Could not delete the $module->name (coursemodule)");
} }
print_error("The required instance of this module didn't exist. Module deleted.", print_error("moduleinstancedoesnotexist",'',
"$CFG->wwwroot/course/view.php?id=$course->id"); "$CFG->wwwroot/course/view.php?id=$course->id");
} }
$fullmodulename = get_string("modulename", $module->name); $fullmodulename = get_string("modulename", $module->name);
@ -510,11 +510,11 @@
} else if (!empty($update) and confirm_sesskey()) { // value = course module } else if (!empty($update) and confirm_sesskey()) { // value = course module
if (! $cm = get_record("course_modules", "id", $update)) { if (! $cm = get_record("course_modules", "id", $update)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
require_login($course->id); // needed to setup proper $COURSE require_login($course->id); // needed to setup proper $COURSE
@ -522,15 +522,15 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if (! $form = get_record($module->name, "id", $cm->instance)) { if (! $form = get_record($module->name, "id", $cm->instance)) {
print_error("The required instance of this module doesn't exist"); print_error("moduleinstancedoesnotexist");
} }
if (! $cw = get_record("course_sections", "id", $cm->section)) { if (! $cw = get_record("course_sections", "id", $cm->section)) {
print_error("This course section doesn't exist"); print_error("sectionnotexist");
} }
if (isset($return)) { if (isset($return)) {
@ -568,11 +568,11 @@
if (! $cm = get_record("course_modules", "id", $duplicate)) { if (! $cm = get_record("course_modules", "id", $duplicate)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
require_login($course->id); // needed to setup proper $COURSE require_login($course->id); // needed to setup proper $COURSE
@ -580,15 +580,15 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if (! $form = get_record($module->name, "id", $cm->instance)) { if (! $form = get_record($module->name, "id", $cm->instance)) {
print_error("The required instance of this module doesn't exist"); print_error("moduleinstancedoesnotexist");
} }
if (! $cw = get_record("course_sections", "id", $cm->section)) { if (! $cw = get_record("course_sections", "id", $cm->section)) {
print_error("This course section doesn't exist"); print_error("sectionnotexist");
} }
if (isset($return)) { if (isset($return)) {
@ -627,18 +627,18 @@
$section = required_param('section',PARAM_INT); $section = required_param('section',PARAM_INT);
if (! $course = get_record("course", "id", $id)) { if (! $course = get_record("course", "id", $id)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
if (! $module = get_record("modules", "name", $add)) { if (! $module = get_record("modules", "name", $add)) {
print_error("This module type doesn't exist"); print_error("moduledoesnotexist");
} }
$context = get_context_instance(CONTEXT_COURSE, $course->id); $context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (!course_allowed_module($course,$module->id)) { if (!course_allowed_module($course,$module->id)) {
print_error("This module has been disabled for this particular course"); print_error("moduledisable");
} }
require_login($course->id); // needed to setup proper $COURSE require_login($course->id); // needed to setup proper $COURSE
@ -675,7 +675,7 @@
} }
} else { } else {
print_error("No action was specified"); print_error("unknowaction");
} }
require_login($course->id); // needed to setup proper $COURSE require_login($course->id); // needed to setup proper $COURSE

View file

@ -18,7 +18,7 @@
$course = required_param('course', PARAM_INT); $course = required_param('course', PARAM_INT);
if (! $course = get_record("course", "id", $course)) { if (! $course = get_record("course", "id", $course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
require_login($course); require_login($course);
@ -26,13 +26,13 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $module = get_record("modules", "name", $add)) { if (! $module = get_record("modules", "name", $add)) {
print_error("This module type doesn't exist"); print_error("moduledoesnotexist");
} }
$cw = get_course_section($section, $course->id); $cw = get_course_section($section, $course->id);
if (!course_allowed_module($course, $module->id)) { if (!course_allowed_module($course, $module->id)) {
print_error("This module has been disabled for this particular course"); print_error("moduledisable");
} }
$cm = null; $cm = null;
@ -75,11 +75,11 @@
$navlinksinstancename = ''; $navlinksinstancename = '';
} else if (!empty($update)) { } else if (!empty($update)) {
if (! $cm = get_record("course_modules", "id", $update)) { if (! $cm = get_record("course_modules", "id", $update)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
require_login($course); // needed to setup proper $COURSE require_login($course); // needed to setup proper $COURSE
@ -87,15 +87,15 @@
require_capability('moodle/course:manageactivities', $context); require_capability('moodle/course:manageactivities', $context);
if (! $module = get_record("modules", "id", $cm->module)) { if (! $module = get_record("modules", "id", $cm->module)) {
print_error("This module doesn't exist"); print_error("moduledoesnotexist");
} }
if (! $form = get_record($module->name, "id", $cm->instance)) { if (! $form = get_record($module->name, "id", $cm->instance)) {
print_error("The required instance of this module doesn't exist"); print_error("moduleinstancedoesnotexist");
} }
if (! $cw = get_record("course_sections", "id", $cm->section)) { if (! $cw = get_record("course_sections", "id", $cm->section)) {
print_error("This course section doesn't exist"); print_error("sectionnotexist");
} }
$form->coursemodule = $cm->id; $form->coursemodule = $cm->id;
@ -160,7 +160,7 @@
$CFG->pagepath .= '/mod'; $CFG->pagepath .= '/mod';
} }
} else { } else {
print_error('Invalid operation.'); print_error('invalidaction');
} }
$modmoodleform = "$CFG->dirroot/mod/$module->name/mod_form.php"; $modmoodleform = "$CFG->dirroot/mod/$module->name/mod_form.php";
@ -168,14 +168,14 @@
require_once($modmoodleform); require_once($modmoodleform);
} else { } else {
print_error('No formslib form description file found for this activity.'); print_error('noformdesc');
} }
$modlib = "$CFG->dirroot/mod/$module->name/lib.php"; $modlib = "$CFG->dirroot/mod/$module->name/lib.php";
if (file_exists($modlib)) { if (file_exists($modlib)) {
include_once($modlib); include_once($modlib);
} else { } else {
print_error("This module is missing important code! ($modlib)"); print_error("modulemissingcode", '', '', $modlib);
} }
$mformclassname = 'mod_'.$module->name.'_mod_form'; $mformclassname = 'mod_'.$module->name.'_mod_form';
@ -192,17 +192,17 @@
if (empty($fromform->coursemodule)) { //add if (empty($fromform->coursemodule)) { //add
$cm = null; $cm = null;
if (! $course = get_record("course", "id", $fromform->course)) { if (! $course = get_record("course", "id", $fromform->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
$fromform->instance = ''; $fromform->instance = '';
$fromform->coursemodule = ''; $fromform->coursemodule = '';
} else { //update } else { //update
if (! $cm = get_record("course_modules", "id", $fromform->coursemodule)) { if (! $cm = get_record("course_modules", "id", $fromform->coursemodule)) {
print_error("This course module doesn't exist"); print_error("cmunknown");
} }
if (! $course = get_record("course", "id", $cm->course)) { if (! $course = get_record("course", "id", $cm->course)) {
print_error("This course doesn't exist"); print_error("invalidcourseid");
} }
$fromform->instance = $cm->instance; $fromform->instance = $cm->instance;
$fromform->coursemodule = $cm->id; $fromform->coursemodule = $cm->id;
@ -243,7 +243,7 @@
$returnfromfunc = $updateinstancefunction($fromform); $returnfromfunc = $updateinstancefunction($fromform);
if (!$returnfromfunc) { if (!$returnfromfunc) {
print_error("Could not update the $fromform->modulename", '', "view.php?id=$course->id"); print_error('cannotupdatemod', '', 'view.php?id=$course->id', $fromform->modulename);
} }
if (is_string($returnfromfunc)) { if (is_string($returnfromfunc)) {
print_error($returnfromfunc, '', "view.php?id=$course->id"); print_error($returnfromfunc, '', "view.php?id=$course->id");
@ -273,12 +273,12 @@
} }
if (!course_allowed_module($course,$fromform->modulename)) { if (!course_allowed_module($course,$fromform->modulename)) {
print_error("This module ($fromform->modulename) has been disabled for this particular course"); print_error('moduledisable', '', '', $fromform->modulename);
} }
$returnfromfunc = $addinstancefunction($fromform); $returnfromfunc = $addinstancefunction($fromform);
if (!$returnfromfunc) { if (!$returnfromfunc) {
print_error("Could not add a new instance of $fromform->modulename", '', "view.php?id=$course->id"); print_error("cannotaddnewmodule", '', "view.php?id=$course->id", $fromform->modulename);
} }
if (is_string($returnfromfunc)) { if (is_string($returnfromfunc)) {
print_error($returnfromfunc, '', "view.php?id=$course->id"); print_error($returnfromfunc, '', "view.php?id=$course->id");
@ -290,14 +290,14 @@
// to each other, so we have to update one of them twice. // to each other, so we have to update one of them twice.
if (! $fromform->coursemodule = add_course_module($fromform) ) { if (! $fromform->coursemodule = add_course_module($fromform) ) {
print_error("Could not add a new course module"); print_error("cannotaddcoursemodule");
} }
if (! $sectionid = add_mod_to_section($fromform) ) { if (! $sectionid = add_mod_to_section($fromform) ) {
print_error("Could not add the new course module to that section"); print_error("cannotaddcmtosection");
} }
if (! set_field("course_modules", "section", $sectionid, "id", $fromform->coursemodule)) { if (! set_field("course_modules", "section", $sectionid, "id", $fromform->coursemodule)) {
print_error("Could not update the course module with the correct section"); print_error("cannotupdatecm");
} }
// make sure visibility is set correctly (in particular in calendar) // make sure visibility is set correctly (in particular in calendar)
@ -315,7 +315,7 @@
"view.php?id=$fromform->coursemodule", "view.php?id=$fromform->coursemodule",
"$fromform->instance", $fromform->coursemodule); "$fromform->instance", $fromform->coursemodule);
} else { } else {
print_error("Data submitted is invalid."); print_error("invaliddata");
} }
// sync idnumber with grade_item // sync idnumber with grade_item

View file

@ -8,7 +8,7 @@
require_login(); require_login();
if (isguest()) { if (isguest()) {
print_error("No guests here!"); print_error("noguest");
} }
if (empty($CFG->enablecourserequests)) { if (empty($CFG->enablecourserequests)) {

View file

@ -14,7 +14,7 @@ require_once('reset_form.php');
$id = required_param('id', PARAM_INT); $id = required_param('id', PARAM_INT);
if (!$course = get_record('course', 'id', $id)) { if (!$course = get_record('course', 'id', $id)) {
print_error("Course is misconfigured"); print_error("invalidcourseid");
} }
require_login($course); require_login($course);

View file

@ -7,7 +7,7 @@
$id = required_param('id', PARAM_INT); // course id $id = required_param('id', PARAM_INT); // course id
if (! $course = get_record("course", "id", $id)) { if (! $course = get_record("course", "id", $id)) {
print_error("Course ID was incorrect"); print_error("invalidcourseid");
} }
require_login($course); require_login($course);

View file

@ -21,5 +21,6 @@ $string['phpvaron'] = 'The PHP server variable \'$a[0]\' is not turned On - $a[1
$string['prefixcannotbeempty'] = 'Table prefix \"$a[0]\" cannot be empty for your target DB ($a[1])'; $string['prefixcannotbeempty'] = 'Table prefix \"$a[0]\" cannot be empty for your target DB ($a[1])';
$string['prefixlimit'] = 'Table prefix \"$a\" maximum allowed length for Oracle DBs is 2cc.'; $string['prefixlimit'] = 'Table prefix \"$a\" maximum allowed length for Oracle DBs is 2cc.';
$string['withoutversion'] = 'Main version.php was not readable or specified'; $string['withoutversion'] = 'Main version.php was not readable or specified';
$string['siteisnotdefined'] = 'Site is not defined!';
?> ?>

View file

@ -12,6 +12,9 @@ $string['backuptablefail'] = 'Backup tables could NOT be set up successfully!';
$string['cannotassignrole'] = 'Cannot assign role in course'; $string['cannotassignrole'] = 'Cannot assign role in course';
$string['cannotunassignrolefrom'] = 'Can not unassign this user from role id: $a'; $string['cannotunassignrolefrom'] = 'Can not unassign this user from role id: $a';
$string['cannotaddrss'] = 'You do not have permission to add rss feeds'; $string['cannotaddrss'] = 'You do not have permission to add rss feeds';
$string['cannotaddnewmodule'] = 'Could not add a new instance of $a';
$string['cannotaddcoursemodule'] = 'Could not add a new course module';
$string['cannotaddcmtosection'] = 'Could not add the new course module to that section';
$string['cannotsaveconfig'] = 'Problem saving config \"$a[0]\" as \"$a[1]\" for plugin \"$a[2]\"'; $string['cannotsaveconfig'] = 'Problem saving config \"$a[0]\" as \"$a[1]\" for plugin \"$a[2]\"';
$string['cannotsavefile'] = 'Cannot save the file\"$a[0]\/$a[1]\"!'; $string['cannotsavefile'] = 'Cannot save the file\"$a[0]\/$a[1]\"!';
$string['cannotcreatebackupdir'] = 'Could not create backupdata folder. The site administrator needs to fix the file permissions'; $string['cannotcreatebackupdir'] = 'Could not create backupdata folder. The site administrator needs to fix the file permissions';
@ -22,11 +25,13 @@ $string['cannotcreatesitedir'] = 'Cannot create site folder. The site administra
$string['cannotcreateorfindstructs'] = 'Error finding or creating section structures for this course'; $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['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['cannotdeletelangcache'] = 'Language cache can not be deleted, please fix permissions in dataroot/cache/languages!';
$string['cannotdeletecourse'] = 'You do not have the permission to delete this course.';
$string['cannotdeleterole'] = 'It can not be deleted, because $a'; $string['cannotdeleterole'] = 'It can not be deleted, because $a';
$string['cannotdeleterolewithid'] = 'Could not delete role with ID $a'; $string['cannotdeleterolewithid'] = 'Could not delete role with ID $a';
$string['cannotdownloadcomponents'] = 'Cannot download components.'; $string['cannotdownloadcomponents'] = 'Cannot download components.';
$string['cannotdownloadlanguageupdatelist'] = 'Cannot download list of language updates from download.moodle.org'; $string['cannotdownloadlanguageupdatelist'] = 'Cannot download list of language updates from download.moodle.org';
$string['cannotdownloadzipfile'] = 'Cannot download ZIP file.'; $string['cannotdownloadzipfile'] = 'Cannot download ZIP file.';
$string['cannoteditsiteform'] = 'You cannot edit the site course using this form';
$string['cannoteditpostorblog'] = 'You can not post or edit blogs.'; $string['cannoteditpostorblog'] = 'You can not post or edit blogs.';
$string['cannoteditmasterlang'] = 'You do not have permission to edit master language package. This permission is controlled by the capability "moodle/site:langeditmaster". Set this capability to allow you to edit master language packages in case you are the maintainer of a package.'; $string['cannoteditmasterlang'] = 'You do not have permission to edit master language package. This permission is controlled by the capability "moodle/site:langeditmaster". Set this capability to allow you to edit master language packages in case you are the maintainer of a package.';
$string['cannotfindcomponent'] = 'Cannot find component.'; $string['cannotfindcomponent'] = 'Cannot find component.';
@ -38,16 +43,25 @@ $string['cannotfindhelp'] = 'Cannot find \"$a\" language help files';
$string['cannotfindlang'] = 'Cannot find \"$a\" language pack!'; $string['cannotfindlang'] = 'Cannot find \"$a\" language pack!';
$string['cannotfindsite'] = 'Cannot find site-level course'; $string['cannotfindsite'] = 'Cannot find site-level course';
$string['cannotmoverolewithid'] = 'Cannot move role with ID $a'; $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['cannotoverridebaserole'] = 'Can not override base role capabilities';
$string['cannotreadtmpfile'] = 'Error reading temporary file'; $string['cannotreadtmpfile'] = 'Error reading temporary file';
$string['cannotremovefrommeta'] = 'Could not remove the selected course from this meta course!';
$string['cannotsavefile'] = 'Cannot save the file \"$a\".'; $string['cannotsavefile'] = 'Cannot save the file \"$a\".';
$string['cannotsavemd5file'] = 'Cannot save md5 file.'; $string['cannotsavemd5file'] = 'Cannot save md5 file.';
$string['cannotsavezipfile'] = 'Cannot save ZIP file.'; $string['cannotsavezipfile'] = 'Cannot save ZIP file.';
$string['cannotsetupcategory'] = 'Serious Error! Could not set up a default course category!'; $string['cannotsetupcategory'] = 'Serious Error! Could not set up a default course category!';
$string['cannotsetupsite'] = 'Serious Error! Could not set up the site!'; $string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
$string['cannotunzipfile'] = 'Cannot unzip file.'; $string['cannotunzipfile'] = 'Cannot unzip file.';
$string['cannotupdatecategory'] = 'Could not update the category ($a)';
$string['cannotupdatecm'] = 'Could not update the course module with the correct section';
$string['cannotupdatelevel'] = 'Could not update the indent level on that course module';
$string['cannotupdaterole'] = 'Cannot update role!'; $string['cannotupdaterole'] = 'Cannot update role!';
$stirng['cannotupdaterss'] = 'Cannot '; $string['cannotupdatemod'] = 'Could not update the $a';
$stirng['cannotupdaterss'] = 'Cannot update rss';
$string['cannotupdatesummary'] = 'Could not update the summary!';
$string['cannotupdatesubcate'] = 'Could not update a child category!';
$string['cannotupdatesubcourse'] = 'Could not update a child course!';
$string['cannotuseadmin'] = 'You need to be an admin user to use this page.'; $string['cannotuseadmin'] = 'You need to be an admin user to use this page.';
$string['cannotuseadminadminorteacher'] = 'You need to be a teacher or admin user to use this page.'; $string['cannotuseadminadminorteacher'] = 'You need to be a teacher or admin user to use this page.';
$string['cannotusepage'] = 'Only teacher and administrator can use this page.'; $string['cannotusepage'] = 'Only teacher and administrator can use this page.';
@ -57,6 +71,7 @@ $string['cantunenrollinthisrole'] = 'You can not unenrol from this course while
$string['cmunknown'] = 'Couldn\'t find this course module'; $string['cmunknown'] = 'Couldn\'t find this course module';
$string['componentisuptodate'] = 'Component is up to date.'; $string['componentisuptodate'] = 'Component is up to date.';
$string['confirmsesskeybad'] = 'Sorry, but your session key could not be confirmed to carry out this action. This security feature prevents against accidental or malicious execution of important functions in your name. Please make sure you really wanted to execute this function.'; $string['confirmsesskeybad'] = 'Sorry, but your session key could not be confirmed to carry out this action. This security feature prevents against accidental or malicious execution of important functions in your name. Please make sure you really wanted to execute this function.';
$string['copiedcmnotexist'] = 'The copied course module does not exist!';
$string['couldnotassignrole'] = 'A serious but unspecified error occurred while trying to assign a role to you'; $string['couldnotassignrole'] = 'A serious but unspecified error occurred while trying to assign a role to you';
$string['coursegroupunknown'] = 'Course corresponding to group $a not specified'; $string['coursegroupunknown'] = 'Course corresponding to group $a not specified';
$string['csvemptyfile'] = 'The CSV file is empty.'; $string['csvemptyfile'] = 'The CSV file is empty.';
@ -64,6 +79,7 @@ $string['csvcolumnduplicates'] = 'Duplicate columns detected.';
$string['csvfewcolumns'] = 'Not enough columns, please verify the delimiter setting.'; $string['csvfewcolumns'] = 'Not enough columns, please verify the delimiter setting.';
$string['csvweirdcolumns'] = 'Invalid CSV file format - number of columns is not constant!'; $string['csvweirdcolumns'] = 'Invalid CSV file format - number of columns is not constant!';
$string['dbupdatefailed'] = 'Database update failed.'; $string['dbupdatefailed'] = 'Database update failed.';
$string['destinationcmnotexit'] = 'The destination course module does not exist';
$string['downloadedfilecheckfailed'] = 'Downloaded file check failed.'; $string['downloadedfilecheckfailed'] = 'Downloaded file check failed.';
$string['duplicateusername'] = 'Duplicate username - skiping record'; $string['duplicateusername'] = 'Duplicate username - skiping record';
$string['errorcleaningdirectory'] = 'Error cleaning directory \"$a\"'; $string['errorcleaningdirectory'] = 'Error cleaning directory \"$a\"';
@ -92,8 +108,9 @@ $string['invalidargorconf'] = 'No valid arguments supplied or incorrect server c
$string['invalidaccessparameter'] = 'Invalid access parameter.'; $string['invalidaccessparameter'] = 'Invalid access parameter.';
$string['invalidcourse'] = 'Invalid course'; $string['invalidcourse'] = 'Invalid course';
$string['invalidcourseid'] = 'You are tring to use an invalid course ID: ($a)'; $string['invalidcourseid'] = 'You are tring to use an invalid course ID: ($a)';
$string['invalidcoursemodule'] = 'Bad course module ID'; $string['invalidcoursemodule'] = 'Invalid course module ID';
$string['invalidcontext'] = 'Invalid context'; $string['invalidcontext'] = 'Invalid context';
$string['invaliddata'] = 'Data submitted is invalid.';
$string['invalidevent'] = 'Invalid event'; $string['invalidevent'] = 'Invalid event';
$string['invalidcoursenameshort'] = 'Invalid short course name'; $string['invalidcoursenameshort'] = 'Invalid short course name';
$string['invalidevent'] = 'Invalid event'; $string['invalidevent'] = 'Invalid event';
@ -108,12 +125,14 @@ $string['invalidmodulename'] = 'Invalid module name: $a';
$string['invalidpagesize'] = 'Invalid page size'; $string['invalidpagesize'] = 'Invalid page size';
$string['invalidrequest'] = 'Invalid request'; $string['invalidrequest'] = 'Invalid request';
$string['invalidrole'] = 'Invalid role'; $string['invalidrole'] = 'Invalid role';
$string['invalidshortname'] = 'That\'s an invalid short course name';
$string['invalidurl'] = 'Invalid url'; $string['invalidurl'] = 'Invalid url';
$string['invaliduser'] = 'Invalid user'; $string['invaliduser'] = 'Invalid user';
$string['invaliduserid'] = 'Invalid user id'; $string['invaliduserid'] = 'Invalid user id';
$string['invalidmd5'] = 'The check variable was wrong - try again';
$string['invalidxmlfile'] = '\"$a\" is not a valid XML file';
$string['iplookupfailed'] = 'Can not find geo information about this IP address $a.'; $string['iplookupfailed'] = 'Can not find geo information about this IP address $a.';
$string['iplookupprivate'] = 'Can not display lookup of private IP address'; $string['iplookupprivate'] = 'Can not display lookup of private IP address';
$string['invalidxmlfile'] = '\"$a\" is not a valid XML file';
$string['listnopeers'] = 'No peers of item found.'; $string['listnopeers'] = 'No peers of item found.';
$string['listnoitem'] = 'Item not found.'; $string['listnoitem'] = 'Item not found.';
$string['listnochildren'] = 'No children of item found.'; $string['listnochildren'] = 'No children of item found.';
@ -129,15 +148,21 @@ $string['missingfield'] = 'Field \"$a\" is missing.';
$string['missingrequiredfield'] = 'Some required field is missing'; $string['missingrequiredfield'] = 'Some required field is missing';
$string['mimetexisnotexist'] = 'Your system is not configured to run mimeTeX. You need to download the appropriate executable for you PHP_OS platform from <a href=\"http://moodle.org/download/mimetex/\">http://moodle.org/download/mimetex/</a>, or obtain the C source from <a href=\"http://www.forkosh.com/mimetex.zip\"> http://www.forkosh.com/mimetex.zip</a>, compile it and put the executable into your moodle/filter/tex/ directory.'; $string['mimetexisnotexist'] = 'Your system is not configured to run mimeTeX. You need to download the appropriate executable for you PHP_OS platform from <a href=\"http://moodle.org/download/mimetex/\">http://moodle.org/download/mimetex/</a>, or obtain the C source from <a href=\"http://www.forkosh.com/mimetex.zip\"> http://www.forkosh.com/mimetex.zip</a>, compile it and put the executable into your moodle/filter/tex/ directory.';
$string['mimetexnotexecutable'] = 'Custom mimetex is not executable!'; $string['mimetexnotexecutable'] = 'Custom mimetex is not executable!';
$string['moduledoesnotexist'] = 'The instance of this module doesn\'t exist'; $string['moduledoesnotexist'] = 'This module does not exist';
$string['moduleinstancedoesnotexist'] = 'The instance of this module does not exist';
$string['moduledisable'] = 'This module ($a) has been disabled for this particular course';
$string['modulemissingcode'] = 'Module $a is missing the code needed to perform this function'; $string['modulemissingcode'] = 'Module $a is missing the code needed to perform this function';
$string['modulerequirementsnotmet'] = 'Module \"$a->modulename\" ($a->moduleversion) could not be installed. It requires a newer version of Moodle (currently you are using $a->currentmoodle, you need $a->requiremoodle).'; $string['modulerequirementsnotmet'] = 'Module \"$a->modulename\" ($a->moduleversion) could not be installed. It requires a newer version of Moodle (currently you are using $a->currentmoodle, you need $a->requiremoodle).';
$string['mustbeteacher'] = 'You must be a teacher to look at this page'; $string['mustbeteacher'] = 'You must be a teacher to look at this page';
$string['multiplerestorenotallow'] = 'Multiple restore execution not allowed!'; $string['multiplerestorenotallow'] = 'Multiple restore execution not allowed!';
$string['needphpext'] = 'You need to add $a support to your PHP installation'; $string['needphpext'] = 'You need to add $a support to your PHP installation';
$string['needcopy'] = 'You need to copy something first!';
$string['needcoursecategroyid'] = 'Either course id or category must be specified';
$string['noblocks'] = 'No blocks found!'; $string['noblocks'] = 'No blocks found!';
$string['noformdesc'] = 'No formslib form description file found for this activity.';
$string['nocontext'] = 'Sorry, but that course is not a valid context'; $string['nocontext'] = 'Sorry, but that course is not a valid context';
$string['noinstances'] = 'There are no instances of $a in this course!'; $string['noinstances'] = 'There are no instances of $a in this course!';
$string['noguest'] = 'No guests here!';
$string['nologinas'] = 'You are not allowed to login as that user'; $string['nologinas'] = 'You are not allowed to login as that user';
$string['noadmins'] = 'No administrators!'; $string['noadmins'] = 'No administrators!';
$string['nousers'] = 'No such user!'; $string['nousers'] = 'No such user!';
@ -153,7 +178,7 @@ $string['notmemberofgroup'] = 'You are not a member of this course group';
$string['onlyadmins'] = 'Only administrators can do that.'; $string['onlyadmins'] = 'Only administrators can do that.';
$string['onlyeditingteachers'] = 'Only editing teachers can do that.'; $string['onlyeditingteachers'] = 'Only editing teachers can do that.';
$string['onlyeditown'] = 'You can only edit your own information'; $string['onlyeditown'] = 'You can only edit your own information';
$string['pagenotexist'] = 'An unusual error occurred (tried to reach a page that doesn\'t exist).'; $string['pagenotexist'] = 'An unusual error occurred (tried to reach a page that does not exist).';
$string['pathdoesnotstartslash'] = 'No valid arguments supplied, path does not start with slash!'; $string['pathdoesnotstartslash'] = 'No valid arguments supplied, path does not start with slash!';
$string['pleasereport'] = 'If you have time, please let us know what you were trying to do when the error occurred:'; $string['pleasereport'] = 'If you have time, please let us know what you were trying to do when the error occurred:';
$string['pluginrequirementsnotmet'] = 'Plugin \"$a->pluginname\" ($a->pluginversion) could not be installed. It requires a newer version of Moodle (currently you are using $a->currentmoodle, you need $a->requiremoodle).'; $string['pluginrequirementsnotmet'] = 'Plugin \"$a->pluginname\" ($a->pluginversion) could not be installed. It requires a newer version of Moodle (currently you are using $a->currentmoodle, you need $a->requiremoodle).';
@ -162,6 +187,7 @@ $string['remotedownloaderror'] = 'Download of component to your server failed, p
$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['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['restricteduser'] = 'Sorry, but your current account \"$a\" is restricted from doing that.';
$string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin'; $string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
$string['sectionnotexist'] = 'This section does not exist';
$string['sendmessage'] = 'Send Message'; $string['sendmessage'] = 'Send Message';
$string['sessionerroruser'] = 'Your session has timed out. Please login again.'; $string['sessionerroruser'] = 'Your session has timed out. Please login again.';
$string['sessionerroruser2'] = 'A server error that affects your login session was detected. Please login again or restart your browser.'; $string['sessionerroruser2'] = 'A server error that affects your login session was detected. Please login again or restart your browser.';
@ -175,6 +201,7 @@ $string['statsnodata'] = 'There is no available data for that combination of cou
$string['statsdisable'] = 'Stats is not enabled.'; $string['statsdisable'] = 'Stats is not enabled.';
$string['unenrolerror'] = 'An error occurred while trying to unenrol that person.'; $string['unenrolerror'] = 'An error occurred while trying to unenrol that person.';
$string['unknowaction']= 'Unknown action!'; $string['unknowaction']= 'Unknown action!';
$string['unknowcategory'] = 'Category not known!';
$string['unknowncourse'] = 'Unknown course named \"$a\"'; $string['unknowncourse'] = 'Unknown course named \"$a\"';
$string['unknowncourseidnumber'] = 'Unknown Course ID \"$a\"'; $string['unknowncourseidnumber'] = 'Unknown Course ID \"$a\"';
$string['unknowngroup'] = 'Unknown group \"$a\"'; $string['unknowngroup'] = 'Unknown group \"$a\"';
@ -190,10 +217,11 @@ $string['usermustbemnet'] = 'Users in the MNET access control list must be remot
$string['usernotaddedadmin'] = 'Can not delete admin accounts.'; $string['usernotaddedadmin'] = 'Can not delete admin accounts.';
$string['usernotaddederror'] = 'User not added - error.'; $string['usernotaddederror'] = 'User not added - error.';
$string['usernotaddedregistered'] = 'User not added - already registered.'; $string['usernotaddedregistered'] = 'User not added - already registered.';
$string['usernotavailable'] = 'The details of this user are not available to you.';
$string['usernotdeletederror'] = 'User not deleted - error.'; $string['usernotdeletederror'] = 'User not deleted - error.';
$string['usernotdeletedmissing'] = 'User not deleted - could not find the username.'; $string['usernotdeletedmissing'] = 'User not deleted - could not find the username.';
$string['usernotdeletedoff'] = 'User not deleted - deleting not allowed.'; $string['usernotdeletedoff'] = 'User not deleted - deleting not allowed.';
$string['usernotavailable'] = 'The details of this user are not available to you.'; $string['usernotincourse'] = 'This user is not in this course!';
$string['usernotrenamedadmin'] = 'Can not rename admin accounts.'; $string['usernotrenamedadmin'] = 'Can not rename admin accounts.';
$string['usernotrenamedexists'] = 'User not renamed - the new username is already in use.'; $string['usernotrenamedexists'] = 'User not renamed - the new username is already in use.';
$string['usernotrenamedmissing'] = 'User not renamed - could not find the old username.'; $string['usernotrenamedmissing'] = 'User not renamed - could not find the old username.';