$string['cannotupdatemod'] = 'Could not update $a';
$string['cannotupdatemodcap'] = 'Could not update $a capabilities!';
$string['cannotupdateuser'] = 'Updating user failed';
-$string['cannotupdateusermsgpref'] = 'Updating user failed';
+$string['cannotupdateusermsgpref'] = 'Cannot update user message preferences';
$string['cannotupdateuseronexauth'] = 'Failed to update user data on external auth: $a. See the server logs for more details.';
$string['cannotupdatepasswordonextauth'] = 'Failed to update password on external auth: $a. See the server logs for more details.';
$string['cannotupdateplugincap'] = 'Could not update $a capabilities!';
$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['coursemisconf'] = 'Course is misconfigured';
+$string['courserequestdisabled'] = 'Sorry, but requesting courses has been disabled by the administrator';
$string['csvemptyfile'] = 'The CSV file is empty';
$string['csvcolumnduplicates'] = 'Duplicate columns detected';
$string['csvfewcolumns'] = 'Not enough columns, please verify the delimiter setting';
$string['failtoloadblocks'] = 'One or more blocks are registered in the database, but they all failed to load!';
$string['fieldrequired'] = '\"$a\" is a required field';
$string['filenotfound'] = 'Sorry, the requested file could not be found';
+$string['filenotreadable'] = 'File is not readable';
$string['filemismatch'] = 'Non-core file name mismatch. The file \"$a->current\" should be $a->file';
$string['filternotinstalled'] = 'Filter $a is not currently installed';
$string['filternotactive'] = 'Filter $a is not currently active';
$string['tagdisabled'] = 'Tags are disabled!';
$string['themenotinstall'] = 'This theme is not installed!';
$string['transactionvoid'] = 'Transaction cannot be voided because it has already been voided';
-$string['typenotimplement'] = 'TODO: type not implemented';
+$string['importformatnotimplement'] = 'Sorry, importing this format is not yet implemented!';
$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['courserejectreason'] = 'Outline your reasons for rejecting this course<br />(this will be emailed to the requester)';
$string['courserejectsubject'] = 'Your course has been rejected';
$string['courserequest'] = 'Course request';
-$string['courserequestdisabled'] = 'Sorry, but requesting courses has been disabled by the administrator';
$string['courserequestfailed'] = 'For some reason, your course request could not be saved';
$string['courserequestintro'] = 'Use this form to request a course to be created for you.<br />Try and fill in as much information as you can to allow<br />the administrators to understand your reasons for wanting this course.';
$string['courserequestreason'] = 'Reasons for wanting this course';
$string['cannotcreate'] = 'Could not create new entry in question_attempts table';
$string['cannotcreatedataset'] = 'Unable to create dataset $a';
$string['cannotcreaterelation'] = 'Unable to create relation to dataset $a[0] $a[1]';
+$string['cannotcreatepath'] = 'Cannot create path: $a';
$string['cannotcopybackup'] = 'Could not copy backup file';
$string['cannotdeletecate'] = 'You can\'t delete that category it is the default category for this context.';
$string['cannotfindcate'] = 'Could not find category record';
$string['cannotmovecate'] = 'Cannot move the category $a. It is the last in this context.';
$string['cannotmovefromto'] = 'Could not move the category $a[0] to $a[1]';
$string['cannotmovequestion'] = 'You can\'t use this script to move questions that have files associated with them from different areas.';
+$string['cannotopenforwriting'] = 'Cannot open for writing: $a';
$string['cannotunhidequestion'] = 'Failed to unhide the question.';
$string['cannotunzip'] = 'Could not unzip file.';
$string['cannotupdatesubcate'] = 'Could not update a child category!';
$string['errormanualgradeoutofrange'] = 'The grade $a->grade is not between 0 and $a->maxgrade for question $a->name. The score and comment have not been saved.';
$string['errormovingquestions'] = 'Error while moving questions with ids $a.';
$string['errorprocessingresponses'] = 'An error occurred while processing your responses.';
+$string['errorpreprocess'] = 'Error occurred during pre-processing!';
+$string['errorpostprocess'] = 'Error occurred during post-processing!';
+$string['errorprocess'] = 'Error occurred during processing!';
$string['errorsavingcomment'] = 'Error saving the comment for question $a->name in the database.';
$string['errorupdatingattempt'] = 'Error updating attempt $a->id in the database.';
$string['emptyxml'] = 'Unkown error - empty imsmanifest.xml';
$ext = substr($this->realfilename, strpos($this->realfilename,'.'), strlen($this->realfilename)-1);
if ($ext=='.dat') {
if (!is_readable($filename)) {
- error("File is not readable");
+ print_error('filenotreadable', 'error');
}
return file($filename);
}
function importpreprocess() {
global $CFG;
- error("Sorry, importing this format is not yet implemented!",
- "$CFG->wwwroot/mod/quiz/import.php?category=$category->id");
+ print_error('cannotimportformat', 'question', "$CFG->wwwroot/mod/quiz/import.php?category=$category->id");
}
function exportpreprocess() {
// create a directory for the exports (if not already existing)
if (!$export_dir = make_upload_directory($this->question_get_export_dir().'/'.$this->filename)) {
- error( get_string('cannotcreatepath','quiz',$export_dir) );
+ print_error('cannotcreatepath', 'quiz', '', $export_dir);
}
$path = $CFG->dataroot.'/'.$this->question_get_export_dir().'/'.$this->filename;
$expout = $smarty->fetch('imsmanifest.tpl');
$filepath = $path.'/imsmanifest.xml';
if (empty($expout)) {
- error("Unkown error - empty imsmanifest.xml");
+ print_error('emptyxml', 'question');
}
if (!$fh=fopen($filepath,"w")) {
- error("Cannot open for writing: $filepath");
+ print_error('cannotopenforwriting', 'question', '', $filepath);
}
if (!fwrite($fh, $expout)) {
- error("Cannot write exported questions to $filepath");
+ print_error('cannotwriteto', 'question', '', $filepath);
}
fclose($fh);
$filepath = $path.'/'.$this->get_assesment_item_id($question) . ".xml";
if (!$fh=fopen($filepath,"w")) {
- error("Cannot open for writing: $filepath");
+ print_error('cannotopenforwriting', 'question', '', $filepath);
}
if (!fwrite($fh, $expout)) {
- error("Cannot write exported questions to $filepath");
+ print_error('cannotwriteto', 'question', '', $filepath);
}
fclose($fh);
$this->xml_entitize($result);
$this->xml_entitize($submiturl);
if (! $this->exportpreprocess(0, $course)) { // Do anything before that we need to
- error("Error occurred during pre-processing!", $redirect);
+ print_error('errorpreprocess', 'question', $redirect);
}
if (! $this->exportprocess_quiz($quiz, $questions, $result, $submiturl, $course)) { // Process the export data
- error("Error occurred during processing!", $redirect);
+ print_error('errorprocess','question', $redirect);
}
if (! $this->exportpostprocess()) { // In case anything needs to be done after
- error("Error occurred during post-processing!", $redirect);
+ print_error('errorpostprocess', 'question', $redirect);
}
}
$path = $CFG->dataroot."/smarty_c";
if (!is_dir($path)) {
if (!mkdir($path, $CFG->directorypermissions)) {
- error("Cannot create path: $path");
+ print_error('cannotcreatepath', 'question', '', $path);
}
}
$smarty = new Smarty;
}
-?>
\ No newline at end of file
+?>