Moodle

Fatal error trying to attempt quiz with numerical questions in HEAD

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Questions
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

This error shown on a quiz with numerical questions:

Fatal error: Call to undefined function split_old_answer()
in Z:\home\moodle\www\question\type\numerical\questiontype.php on line 313

Activity

Hide
Pierre Pichet added a comment -

Thanks for the testing.
Last time I tested, the quiz interface was scrambled.
i will see this to night (Montréal time...).

Show
Pierre Pichet added a comment - Thanks for the testing. Last time I tested, the quiz interface was scrambled. i will see this to night (Montréal time...).
Hide
Pierre Pichet added a comment -

I am also waiting to see if Tim work on question engine will be ready before 2.0 beta.
If true, part of this code will become obsolete...

Show
Pierre Pichet added a comment - I am also waiting to see if Tim work on question engine will be ready before 2.0 beta. If true, part of this code will become obsolete...
Hide
Oleg Sychev added a comment -

I guess fatal errors should be fixed somehow (not necessary on a good basis) so they won't interfere with testing another things.

Show
Oleg Sychev added a comment - I guess fatal errors should be fixed somehow (not necessary on a good basis) so they won't interfere with testing another things.
Hide
Pierre Pichet added a comment -

the $this-> was forgotten... on line 313
this call happened because the new code was used on old attempts...

Show
Pierre Pichet added a comment - the $this-> was forgotten... on line 313 this call happened because the new code was used on old attempts...
Hide
Pierre Pichet added a comment -

Oups, we were in line in the same time and i send the last comment without waiting for the response (the telephone was ringing..).
I agree that this should be solved and it will be done soon.

Show
Pierre Pichet added a comment - Oups, we were in line in the same time and i send the last comment without waiting for the response (the telephone was ringing..). I agree that this should be solved and it will be done soon.
Hide
Pierre Pichet added a comment -

Add the $this-> but was not able to test this part of the code as there was no old attempts on the site used to code.
Could you test it ?

Show
Pierre Pichet added a comment - Add the $this-> but was not able to test this part of the code as there was no old attempts on the site used to code. Could you test it ?
Hide
Pierre Pichet added a comment -

Tested by modifying attempts record and works correctly
After further testing from Oleg, we could resolve the issue

Show
Pierre Pichet added a comment - Tested by modifying attempts record and works correctly After further testing from Oleg, we could resolve the issue
Hide
Oleg Sychev added a comment -

It seems to work (thought I don't really have any old attempts with units in answers).

I wonder, what normal code has to do with "old" attempts? Shoudn't upgrade code supposed to make them all brand new?

Show
Oleg Sychev added a comment - It seems to work (thought I don't really have any old attempts with units in answers). I wonder, what normal code has to do with "old" attempts? Shoudn't upgrade code supposed to make them all brand new?
Hide
Oleg Sychev added a comment -

Pierre, one thing about new unit handle interface: all those instructions about units (along with their boxes) should be shown ONLY if instructions is non-empty. If a question defines no units they are just bother.

Show
Oleg Sychev added a comment - Pierre, one thing about new unit handle interface: all those instructions about units (along with their boxes) should be shown ONLY if instructions is non-empty. If a question defines no units they are just bother.
Hide
Pierre Pichet added a comment - - edited

Effectively the instructions should not be displayed if no units are shown.
"Shoudn't upgrade code supposed to make them all brand new?".
We need to be able to read old datas that could come from a restore process (course , quiz).

Anyway, I think that I can set resolved as it has been tested on old quiz attempts and restored them correctly.

When working on the new question_engine, Tim will surely find another way to do this...

Show
Pierre Pichet added a comment - - edited Effectively the instructions should not be displayed if no units are shown. "Shoudn't upgrade code supposed to make them all brand new?". We need to be able to read old datas that could come from a restore process (course , quiz). Anyway, I think that I can set resolved as it has been tested on old quiz attempts and restored them correctly. When working on the new question_engine, Tim will surely find another way to do this...
Hide
Pierre Pichet added a comment -

"all those instructions about units (along with their boxes) should be shown ONLY if instructions is non-empty."
I answered too rapidly.
The first use of the instructions is about the valid number formats which is "always shown", in the Instructions fieldset.
The teacher instructions are added if not empty.
It could be related to units or other specific comments on how to fill the responses field.
In quiz, we cannot use info help icon or pop-up windows .

Show
Pierre Pichet added a comment - "all those instructions about units (along with their boxes) should be shown ONLY if instructions is non-empty." I answered too rapidly. The first use of the instructions is about the valid number formats which is "always shown", in the Instructions fieldset. The teacher instructions are added if not empty. It could be related to units or other specific comments on how to fill the responses field. In quiz, we cannot use info help icon or pop-up windows .
Hide
Oleg Sychev added a comment -

Here is an example of what I see now. This is not really thing I'm quite glad to see, since:
1. Too many fieldsets (boxes), which occupies most of the place in the question without been actually useful.
2. Additional instructions (even constant ones about valid numbers formats) repeated in every question of the quiz on the same page, making page more long and distracting students attention from the question itself (especially bad in timed quizzes). Been outlined they can draw even more attention than the quesion text.
3. Printing instructions for the task that user need to do often it time he encounters this task isn't a good usability practice at all. It is mildly useful for beginners (while drawing attention away from more important things), but for users with some experience they make them that feel university thinks they are really stupid, especially with similar instructions repeated 5 times on one quiz page.

Instructions should be easily accessible, but only if user wants them.
I don't know why you can't use help icons (there is probably reason for that,unknown for me), but even then you could make these instructions collapsible (like blocks in Moodle), or floating (like comments in cloze questions), or(and) at least make an option for a question author to turn them off (or, better, on - i.e. off by default).

Show
Oleg Sychev added a comment - Here is an example of what I see now. This is not really thing I'm quite glad to see, since: 1. Too many fieldsets (boxes), which occupies most of the place in the question without been actually useful. 2. Additional instructions (even constant ones about valid numbers formats) repeated in every question of the quiz on the same page, making page more long and distracting students attention from the question itself (especially bad in timed quizzes). Been outlined they can draw even more attention than the quesion text. 3. Printing instructions for the task that user need to do often it time he encounters this task isn't a good usability practice at all. It is mildly useful for beginners (while drawing attention away from more important things), but for users with some experience they make them that feel university thinks they are really stupid, especially with similar instructions repeated 5 times on one quiz page. Instructions should be easily accessible, but only if user wants them. I don't know why you can't use help icons (there is probably reason for that,unknown for me), but even then you could make these instructions collapsible (like blocks in Moodle), or floating (like comments in cloze questions), or(and) at least make an option for a question author to turn them off (or, better, on - i.e. off by default).
Hide
Oleg Sychev added a comment -

"We need to be able to read old datas that could come from a restore process (course , quiz)." - isn't that a job of restore function to determine backup format and convert data to the new format if needed?

I also wonder, shoudn't we try to focus on improving question so it can handle typical number format errors, instead of printing boring instructions how to avoid them.

Show
Oleg Sychev added a comment - "We need to be able to read old datas that could come from a restore process (course , quiz)." - isn't that a job of restore function to determine backup format and convert data to the new format if needed? I also wonder, shoudn't we try to focus on improving question so it can handle typical number format errors, instead of printing boring instructions how to avoid them.
Hide
Pierre Pichet added a comment -

The discussion on instructions should be continued on the main bug MDL-20296.

Show
Pierre Pichet added a comment - The discussion on instructions should be continued on the main bug MDL-20296.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: