In quiz.install, quiz_update_6306() adds a new time_left column to the quiz_node_results table. But in quiz_schema(), the new column isn't defined for that table (easily confirmed; there are no other occurrences of time_left in the entire file).

It looks like this would cause problems with people using the latest version of Quiz for the first time.

Comments

sivaji_ganesh_jojodae’s picture

Status: Active » Fixed
Issue tags: +Quick fix

Good catch !! Thank you for reporting this bug, it has been fixed now.

Status: Fixed » Closed (fixed)

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

danielcala’s picture

Hi sivaji, could you add this fix to 6.x-3.0 version

Thanks an regards

benoit.borrel’s picture

StatusFileSize
new543 bytes

Danielca

Here is attached the patch requested @ #3.

To apply it:

cd /PATH/TO/YOUR/SITE_ROOT
patch -p0 /PATH/TO/THE/PATCH/hook_install-time_left-column.patch

Once applied, you can either:

  • reinstall the module
  • or force the module to update itself to schema 6306:
    1. execute this SQL: UPDATE `system` SET `schema_version` = '6305' WHERE `system`.`filename` = 'sites/all/modules/quiz/quiz.module';
    2. run update.php with your browser
dpantele’s picture

Version: 6.x-3.0 » 6.x-3.3
Status: Closed (fixed) » Needs work
StatusFileSize
new1.48 KB

Sorry, it's not fixed.

In my quiz.install file I see

  $schema['quiz_node_properties'] = array(
    ...
      'time_left' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0
      ),
   );

But I believe that the table 'quiz_node_results' should have this string.

Patch is applied (also tries to fix all failures caused by previous patches).

sivaji_ganesh_jojodae’s picture

Status: Needs work » Fixed

@PanDa777 time_left is required in both the quiz_node_results as well as quiz_node_properties.

-quiz_node_properties is used when you created/edit quiz node. Refer quiz_load() and quiz_insert().
-quiz_node_results is used to update the remaining time as the quiz proceeds. Refer quiz_take_quiz()

I have already fixed this in quiz 4.x before my gsoc review forgot to fix it in quiz 3.x. Thanks for reporting this.

Status: Fixed » Closed (fixed)
Issue tags: -Quick fix

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