Getting the following error when grading a quiz containing a 0 point question. 0/0 leads to NAN and breaks the database query.

Message PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'score' at row 1: UPDATE {quiz_long_answer_user_answers} SET score=:db_update_placeholder_0, is_evaluated=:db_update_placeholder_1, answer_feedback=:db_update_placeholder_2, answer_feedback_format=:db_update_placeholder_3 WHERE ( (result_answer_id = :db_condition_placeholder_0) ); Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => 1 [:db_update_placeholder_2] => [:db_update_placeholder_3] => full_html [:db_condition_placeholder_0] => 11619 ) in long_answer_score_an_answer() (line 115 of /app/www/sites/all/modules/quiz/question_types/long_answer/long_answer.module).

Comments

andyg5000 created an issue. See original summary.

andyg5000’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB
djdevin’s picture

Status: Needs review » Fixed

Looks good, thanks!

Fixed.

  • djdevin committed c5888f2 on 7.x-5.x authored by andyg5000
    Issue #2999514 by andyg5000: NAN when scoring long/short answers
    

Status: Fixed » Closed (fixed)

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