Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merged from STABLE

  • Loading branch information...
commit e3931ca8d09ba1b244282f36d9d2f66152952980 1 parent 7f9dd6b
thepurpleblob authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 mod/quiz/format/webct/format.php
10 mod/quiz/format/webct/format.php
View
@@ -346,14 +346,10 @@ function readquestions ($lines) {
$QuestionOK = FALSE;
}
else {
- // Perform string length check and create empty feedback array
+ // Create empty feedback array
$question->feedback = array();
foreach ($question->answer as $key => $dataanswer) {
$question->feedback[$key] = '';
- if (strlen($dataanswer) > 255) {
- $question->answer[$key] = substr($dataanswer,0,250)."...";
- $warnings[] = get_string("answertoolong", "quiz", $nQuestionStartLine);
- }
}
$maxfraction = -1;
$totalfraction = 0;
@@ -501,6 +497,10 @@ function readquestions ($lines) {
}
// Need to put the parsing of calculated items here to avoid ambitiuosness:
+ // if question isn't defined yet there is nothing to do here (avoid notices)
+ if (!isset($question)) {
+ continue;
+ }
if (CALCULATED == $question->qtype && ereg(
"^:([[:lower:]].*|::.*)-(MIN|MAX|DEC|VAL([0-9]+))::?:?($webctnumberregex)", $line, $webct_options)) {
$datasetname = ereg_replace('^::', '', $webct_options[1]);
Please sign in to comment.
Something went wrong with that request. Please try again.