Added strings for WebCT Import format

This commit is contained in:
moodler
2004-01-11 02:50:41 +00:00
parent 998ebd420a
commit e9f289635d
2 changed files with 28 additions and 17 deletions
+14 -3
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// quiz.php - created with Moodle 1.2 development (2003111400)
// quiz.php - created with Moodle 1.2 development (2004010900)
$string['acceptederror'] = 'Accepted error';
@@ -16,6 +16,7 @@ $string['answerhowmany'] = 'One or multiple answers?';
$string['answersingleno'] = 'Multiple answers allowed';
$string['answersingleyes'] = 'One answer only';
$string['answerswithacceptederrormarginmustbenumeric'] = 'Answers with accepted error must be numeric';
$string['answertoolong'] = 'Answer too long after line $a (255 char. max)';
$string['aon'] = 'AON format';
$string['attempt'] = 'Attempt $a';
$string['attemptfirst'] = 'First attempt';
@@ -27,6 +28,7 @@ $string['attemptsunlimited'] = 'Unlimited attempts';
$string['backtoquiz'] = 'Back to quiz editing';
$string['bestgrade'] = 'Best grade';
$string['blackboard'] = 'Blackboard';
$string['calculatedquestion'] = 'Calculated Question not supported at line $a. The question will be ignored';
$string['caseno'] = 'No, case is unimportant';
$string['casesensitive'] = 'Case sensitivity';
$string['caseyes'] = 'Yes, case must match';
@@ -54,7 +56,7 @@ $string['defaultinfo'] = 'The default category for questions.';
$string['deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?';
$string['deletequestioncheck'] = 'Are you absolutely sure you want to delete \'$a\'?';
$string['description'] = 'Description';
$string['discrimination'] = "Discrim. Index";
$string['discrimination'] = 'Discrim. Index';
$string['eachattemptbuildsonthelast'] = 'Each attempt builds on the last';
$string['editcategories'] = 'Edit categories';
$string['editingdescription'] = 'Editing a Description';
@@ -69,6 +71,7 @@ $string['editingrandomsamatch'] = 'Editing a Random Short-Answer Matching questi
$string['editingshortanswer'] = 'Editing a Short-Answer question';
$string['editingtruefalse'] = 'Editing a True/False question';
$string['editquestions'] = 'Edit questions';
$string['errorsdetected'] = '$a error(s) detected';
$string['false'] = 'False';
$string['feedback'] = 'Feedback';
$string['fileformat'] = 'File format';
@@ -83,6 +86,7 @@ $string['gradehighest'] = 'Highest grade';
$string['grademethod'] = 'Grading method';
$string['guestsno'] = 'Sorry, guests can not see or attempt quizzes';
$string['imagedisplay'] = 'Image to display';
$string['imagemissing'] = 'Image not available at line $a. The filename will be ignored';
$string['importquestions'] = 'Import questions from file';
$string['indivresp'] = 'Responses of Individuals to Each Item';
$string['introduction'] = 'Introduction';
@@ -91,8 +95,10 @@ $string['listitems'] = 'Listing of Items in Quiz';
$string['marks'] = 'Marks';
$string['match'] = 'Matching';
$string['matchanswer'] = 'Matching answer';
$string['missinganswer'] = 'Too few :ANSWER, :Lx, :Rx statements for question line $a. You must define at last 2 possible answers';
$string['missingcorrectanswer'] = 'Correct answer must be specified';
$string['missingname'] = 'Missing question name';
$string['missingquestion'] = 'Missing question label after line $a';
$string['missingquestiontext'] = 'Missing question text';
$string['missingword'] = 'Missing word format';
$string['modulename'] = 'Quiz';
@@ -109,12 +115,14 @@ $string['noreview'] = 'You are not allowed to review this quiz';
$string['noreviewuntil'] = 'You are not allowed to review this quiz until $a';
$string['notenoughsubquestions'] = 'Not enough sub-questions have been defined!<br>Do you want to go back and fix this question?';
$string['numerical'] = 'Numerical';
$string['paragraphquestion'] = 'Paragraph Question not supported at line $a. The question will be ignored';
$string['percentcorrect'] = 'Percent Correct';
$string['publish'] = 'Publish';
$string['qti'] = 'IMS QTI format';
$string['question'] = 'Question';
$string['questioninuse'] = 'The question \'$a\' is currently being used:';
$string['questionname'] = 'Question name';
$string['questionnametoolong'] = 'Question name too long at line $a (255 char. max). It has been truncated.';
$string['questions'] = 'Questions';
$string['quizavailable'] = 'The quiz is available until: $a';
$string['quizclose'] = 'Close the quiz';
@@ -164,10 +172,13 @@ $string['toomanyrandom'] = 'The number of random questions required is more than
$string['true'] = 'True';
$string['truefalse'] = 'True/False';
$string['type'] = 'Type';
$string['unknowntype'] = 'Question type not supported at line $a. The question will be ignored';
$string['viewallanswers'] = 'View $a completed quizzes';
$string['viewallreports'] = 'View reports for $a attempts';
$string['warningsdetected'] = '$a warning(s) detected';
$string['webct'] = 'WebCT format';
$string['withsummary'] = "with Summary Statistics";
$string['withsummary'] = 'with Summary Statistics';
$string['wronggrade'] = 'Wrong grade (after line $a) : ';
$string['yourfinalgradeis'] = 'Your final grade for this quiz is $a';
?>
+14 -14
View File
@@ -116,16 +116,16 @@ class quiz_file_format extends quiz_default_format {
}
if (strlen($question->name) > 255) {
$question->name = substr($question->name,0,250)."...";
$warnings[] = get_string("questionnametoolong", "importwebcbt", $nQuestionStartLine);
$warnings[] = get_string("questionnametoolong", "quiz", $nQuestionStartLine);
}
// Perform sanity checks
if (strlen($question->questiontext) == 0) {
$errors[] = get_string("missingquestion", "importwebcbt", $nQuestionStartLine);
$errors[] = get_string("missingquestion", "quiz", $nQuestionStartLine);
$QuestionOK = FALSE;
}
if (sizeof($question->answer) <= 1) {
$errors[] = get_string("missinganswer", "importwebcbt", $nQuestionStartLine);
$errors[] = get_string("missinganswer", "quiz", $nQuestionStartLine);
$QuestionOK = FALSE;
}
else {
@@ -133,7 +133,7 @@ class quiz_file_format extends quiz_default_format {
foreach ($question->answer as $key => $dataanswer) {
if (strlen($dataanswer) > 255) {
$question->answer[$key] = substr($dataanswer,0,250)."...";
$warnings[] = get_string("answertoolong", "importwebcbt", $nQuestionStartLine);
$warnings[] = get_string("answertoolong", "quiz", $nQuestionStartLine);
}
}
$maxfraction = -1;
@@ -150,7 +150,7 @@ class quiz_file_format extends quiz_default_format {
case SHORTANSWER:
if ($maxfraction != 1) {
$maxfraction = $maxfraction * 100;
$errors[] = get_string("wronggrade", "importwebcbt", $nLine).get_string("fractionsnomax", "quiz", $maxfraction);
$errors[] = get_string("wronggrade", "quiz", $nLine).get_string("fractionsnomax", "quiz", $maxfraction);
$QuestionOK = FALSE;
}
break;
@@ -159,7 +159,7 @@ class quiz_file_format extends quiz_default_format {
if ($question->single) {
if ($maxfraction != 1) {
$maxfraction = $maxfraction * 100;
$errors[] = get_string("wronggrade", "importwebcbt", $nLine).get_string("fractionsnomax", "quiz", $maxfraction);
$errors[] = get_string("wronggrade", "quiz", $nLine).get_string("fractionsnomax", "quiz", $maxfraction);
$QuestionOK = FALSE;
}
}
@@ -167,7 +167,7 @@ class quiz_file_format extends quiz_default_format {
$totalfraction = round($totalfraction,2);
if ($totalfraction != 1) {
$totalfraction = $totalfraction * 100;
$errors[] = get_string("wronggrade", "importwebcbt", $nLine).get_string("fractionsaddwrong", "quiz", $totalfraction);
$errors[] = get_string("wronggrade", "quiz", $nLine).get_string("fractionsaddwrong", "quiz", $totalfraction);
$QuestionOK = FALSE;
}
}
@@ -227,21 +227,21 @@ class quiz_file_format extends quiz_default_format {
if (eregi("^:TYPE:P",$line)) {
// Paragraph Question
$warnings[] = get_string("paragraphquestion", "importwebcbt", $nLine);
$warnings[] = get_string("paragraphquestion", "quiz", $nLine);
$ignore_lines = TRUE; // do not process lines until next question
continue;
}
if (eregi("^:TYPE:C",$line)) {
// Calculated Question
$warnings[] = get_string("calculatedquestion", "importwebcbt", $nLine);
$warnings[] = get_string("calculatedquestion", "quiz", $nLine);
$ignore_lines = TRUE; // do not process lines until next question
continue;
}
if (eregi("^:TYPE:",$line)) {
// Unknow Question
$warnings[] = get_string("unknowtype", "importwebcbt", $nLine);
$warnings[] = get_string("unknowntype", "quiz", $nLine);
$ignore_lines = TRUE; // do not process lines until next question
continue;
}
@@ -259,7 +259,7 @@ class quiz_file_format extends quiz_default_format {
$name = trim($webct_options[1]);
if (strlen($name) > 255) {
$name = substr($name,0,250)."...";
$warnings[] = get_string("questionnametoolong", "importwebcbt", $nLine);
$warnings[] = get_string("questionnametoolong", "quiz", $nLine);
}
$question->name = $name;
continue;
@@ -271,7 +271,7 @@ class quiz_file_format extends quiz_default_format {
$question->image = $filename;
}
else {
$warnings[] = get_string("imagemissing", "importwebcbt", $nLine);
$warnings[] = get_string("imagemissing", "quiz", $nLine);
}
continue;
}
@@ -310,7 +310,7 @@ class quiz_file_format extends quiz_default_format {
}
if (sizeof($errors) > 0) {
echo "<p>".get_string("errorsdetected", "importwebcbt", sizeof($errors))."</p><ul>";
echo "<p>".get_string("errorsdetected", "quiz", sizeof($errors))."</p><ul>";
foreach($errors as $error) {
echo "<li>$error</li>";
}
@@ -318,7 +318,7 @@ class quiz_file_format extends quiz_default_format {
}
if (sizeof($warnings) > 0) {
echo "<p>".get_string("warningsdetected", "importwebcbt", sizeof($warnings))."</p><ul>";
echo "<p>".get_string("warningsdetected", "quiz", sizeof($warnings))."</p><ul>";
foreach($warnings as $warning) {
echo "<li>$warning</li>";
}