Moodle

mod/quiz/edit.php calls set_field during the page display code - it should be moved to the action processing code

Details

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

Description

Activity

Hide
David Wong added a comment -

For any of you who have teachers who set the point value of any question less than one in a quiz/exam, VOTE for this one..... It's misleading cause you can save it but when you go back the quiz, the point value is set to less than zero if you're using mysql. If you're using postgres, you get an error message.

d

Show
David Wong added a comment - For any of you who have teachers who set the point value of any question less than one in a quiz/exam, VOTE for this one..... It's misleading cause you can save it but when you go back the quiz, the point value is set to less than zero if you're using mysql. If you're using postgres, you get an error message. d
Hide
Tim Hunt added a comment -

Actually, if you want to be able to do fractional question weights, you need the fix for MDL-7308 which has already been fixed in Moodle 2.0 dev. However, since that involves database changes, it is not going to be applied to the 1.9 stable branch. This bug is really a technical internal matter.

Show
Tim Hunt added a comment - Actually, if you want to be able to do fractional question weights, you need the fix for MDL-7308 which has already been fixed in Moodle 2.0 dev. However, since that involves database changes, it is not going to be applied to the 1.9 stable branch. This bug is really a technical internal matter.
Hide
Tim Hunt added a comment -

Olli, it would be great if you could have a look at the changes I made here, since they affect your code. I think it is all safe. I was just surprised to see the output buffering code there at all. Looked like a bit of a nasty hack to me. I just want to be sure that I have not broken anything subtle by removing it. Thanks.

I was originally planning to fix this in 1.9.x too. On reflection, however, it seems safer to do it in HEAD only. I don't remember any reports of actual problems caused by this.

Show
Tim Hunt added a comment - Olli, it would be great if you could have a look at the changes I made here, since they affect your code. I think it is all safe. I was just surprised to see the output buffering code there at all. Looked like a bit of a nasty hack to me. I just want to be sure that I have not broken anything subtle by removing it. Thanks. I was originally planning to fix this in 1.9.x too. On reflection, however, it seems safer to do it in HEAD only. I don't remember any reports of actual problems caused by this.
Hide
Olli Savolainen added a comment -

Tim,

It is all good and fine. The reason I added the output buffering is that 1.9 was getting the sum of the grades from quiz_print_question_list() already so I thought, well it is not very smart to get a value returned from an output function like that, but I did not want to start questioning things like that at that point. It looks better now, thank you.

Show
Olli Savolainen added a comment - Tim, It is all good and fine. The reason I added the output buffering is that 1.9 was getting the sum of the grades from quiz_print_question_list() already so I thought, well it is not very smart to get a value returned from an output function like that, but I did not want to start questioning things like that at that point. It looks better now, thank you.
Hide
Tim Hunt added a comment -

Great. Thanks for checking it out.

Show
Tim Hunt added a comment - Great. Thanks for checking it out.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: