MDL-32220 question import: files sometimes stored in the wrong context.

Sadly, this involves a small API change, but I don't believe anyone was
using the argument I had to remove (because we were sometimes passing a
wrong value, and there is not way to compute the right value at that
point in the code.)

Also sadly, the code to compute the context we are importing into is now
rather spaghetti-like, but it works.
This commit is contained in:
Tim Hunt
2012-03-29 14:13:28 +01:00
parent a280078197
commit 4d18892676
8 changed files with 28 additions and 16 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ class qformat_webct extends qformat_default {
return true;
}
protected function readquestions($lines, $context) {
protected function readquestions($lines) {
$webctnumberregex =
'[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)((e|E|\\*10\\*\\*)([+-]?[0-9]+|\\([+-]?[0-9]+\\)))?';