I think we need add more comments for this complex function, some test cases may explain it better.

Comments

thehong’s picture

Status: Active » Needs review
StatusFileSize
new5.56 KB
thehong’s picture

Currently, contributed modules have no easy way to know max score changed. I think we should load each quiz, calculate max score, use entity API to save. It's slower but it's obviously less dangerous.

djdevin’s picture

I will add some tests for this too.

Can you remove #2373707: Add QUESTION_CATEGORIZED_RANDOM constant from the patch as it is not related?

thehong’s picture

StatusFileSize
new4.26 KB
djdevin’s picture

Category: Support request » Task
Issue tags: +Needs tests
thehong’s picture

StatusFileSize
new3.95 KB
thehong’s picture

Title: Make quiz_update_max_score_properties() less dangerous » Add inline comments to quiz_update_max_score_properties()

djdevin queued 6: make-2373701-6.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 6: make-2373701-6.patch, failed testing.

djdevin’s picture

Status: Needs work » Active
djdevin’s picture

djdevin’s picture

Status: Active » Fixed

Even better, this was fixed, but it now uses an entity save instead of just db_update().

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.