When trying to add an existing term to a Quiz I defined (with 'Randomize questions' set to 'Categorized random questions') a couple of errors are reported, and the quiz_terms record is not created.

The errors are the following:

  1. user warning: Field 'weight' doesn't have a default value query: INSERT INTO quiz_terms (nid, vid, tid, max_score, number) VALUES (57, 97, 1, 1, 1) in \includes\common.inc on line 3538.
  2. user warning: Column 'max_score' cannot be null query: UPDATE quiz_node_properties qnp SET max_score = max_score_for_random * number_of_random_questions + ( SELECT SUM(max_score) FROM quiz_node_relationship qnr WHERE qnr.question_status = 1 AND parent_vid = qnp.vid ) WHERE vid IN( 97) in \sites\\modules\quiz\quiz.module on line 2380.
  3. user warning: Column 'max_score' cannot be null query: UPDATE quiz_node_properties qnp SET qnp.max_score = ( SELECT SUM(qt.max_score * qt.number) FROM quiz_terms qt WHERE qt.nid = qnp.nid AND qt.vid = qnp.vid ) WHERE qnp.randomization = 3 AND qnp.vid IN( 97) in \sites\\modules\quiz\quiz.module on line 2388.

System info:

  • Drupal 6.22
  • Windows Server2003
  • IIS v6.0
  • PHP 5.2.6
  • Mysql 5.1.44-community

Please let me know if you need more info.
Thanks,
Guno

CommentFileSizeAuthor
#2 sql error.png43.49 KBpradeep.parasuraman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

falcon’s picture

Status: Active » Closed (cannot reproduce)

I think this one was fixed in another issue.

pradeep.parasuraman’s picture

Version: 6.x-4.2 » 6.x-4.4
Priority: Normal » Critical
Status: Closed (cannot reproduce) » Active
FileSize
43.49 KB

Can someone check on this please? I need this very badly.

SQL Error

Drupal Version : 6.26
PHP Version: 5.3.5
Server : Zend Community Server
OS: Windows 7

Thanks

djdevin’s picture

Component: Code - other » Code - Quiz core
Issue summary: View changes
Status: Active » Closed (outdated)

This issue is being closed because it is filed against a version that is no longer supported.

djdevin’s picture

This issue is being closed because it is filed against a version that is no longer supported.