Hi,
Thank you for the great module.
Here is the problem we have: for some reason field "Question:" for any quiz question (we created 1 T/F and 1 multichoice) is not getting into the database: node_revisions.body. Also question update will erase manually(directly to db) added node_revisions.body field.
Please let me know how I can help to trace this problem.
Thanks a lot,
Gennady

Comments

falcon’s picture

Status: Active » Postponed (maintainer needs more info)

What version of php do you use, what kind of database? What other contributed modules are you using?

I suspect this to be a problem you'll have to solve yourself as it doesn't seem to be a general problem with the Quiz module :/ If you have compatible versions of PHP, Database Drupal core etc. you could try to disable contributed modules until Quiz starts working for you...

If anyone else experiences similar problems please report it here

falcon’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closes this one until more info is provided

jpstokes’s picture

I'm having the exactly same problem. I created at least 5 questions before realizing that the questions weren't being saved to the quiz.

PHP Version 5.2.14
Drupal 6.19
MySql 5.0.91

gennadiy’s picture

Version: 6.x-4.0-rc9 » 6.x-4.1
Status: Closed (cannot reproduce) » Fixed

Got newest version of quiz -6.x-4.1- same problem. Could you please point me to the place in the code to look at as for what is going on.

Thank you,
Gennady

gennadiy’s picture

Status: Fixed » Active

Field "Question:" for any quiz question (we created 1 T/F and 1 multichoice) is not getting into the database: node_revisions.body. Also question update will erase manually added (directly to db) node_revisions.body field.
Some more info: question that was entered in very 1st field for quiz question ends up in the node_revisions.teaser field, but for the view node_revisions.body field is selected and it's empty.

AntiNSA’s picture

I was having that problem.... but bigger poblem is that the availability dates are not saving with mine. I gave 9 classes final exams a year ago no prob... big nightmare now with finals beginnning...

kobee’s picture

Hi,
I've got the same problem. I'm using openpublish.

I tried to add a CCK field "Question2" and the data is correctly saved, but it's not displayed on the "Take" quizz.

Any update??

curiousGeorge’s picture

Priority: Normal » Major
Issue tags: +6.x-4.1, +no questions, +questions dropped, +question field

Hi, We are experiencing the same problem.

No questions show up on any of our quizzes. We create them under manage questions. When we 'Take' the quiz, only the quiz title page shows up using our template, subsequent pages use the quiz template, AND our questions have disappeared from the body. We see Q 1 of X....and the actual options, but the actual question is nowhere to be seen. We've done everything from dropping tables, running update, reinstalling, etc. - only to find that the problem persists.

We are running OpenPublish, Varnish, Calais, Php 5.2.16, MySQL 5.07.7 on Drupal 6. Autoload is installed.
Quiz version 6.x-4.1

Any feedback on this is appreciated. Thanks, in advance.

gennadiy’s picture

Interesting - we are also using OpenPublish. So is it something in OpenPublish that triggers this problem? Let's ask in OpenPublish group for solution.
What it does - it writes entered text into the "teaser" field of the node_revisions table, but reads it from the "body" field that is empty :(
Just look into the node_revisions table for the nid of the records and then run UPDATE for those nids:
UPDATE node_revisions SET body=teaser WHERE nid>=4361 AND nid<=4370

gennadiy’s picture

falcon,
Could you or someone else please point me to the part where the text for the question is saved/updated into the database.
Thanks,
Gennady

nirvanajyothi’s picture

Component: Code - Quiz module » Code - Import/Export

Think it's the node_revisions table.

sivaji_ganesh_jojodae’s picture

Component: Code - Import/Export » Code - Quiz core
Status: Active » Fixed

I'm able to reproduce this problem as well in OpenPublish. It looks to me that this problem is introduced by openpublish_administration.module

Below is the code that sets $node->body empty which is the question field in quiz module.

function node_submit($node) {  
  // Generate the teaser, but only if it hasn't been set (e.g. by a
  // module-provided 'teaser' form item).
  if (!isset($node->teaser)) {
    if (isset($node->body)) {
      $node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL);
      // Chop off the teaser from the body if needed. The teaser_include
      // property might not be set (eg. in Blog API postings), so only act on
      // it, if it was set with a given value.
      if (isset($node->teaser_include) && !$node->teaser_include && $node->teaser == substr($node->body, 0, strlen($node->teaser))) {
        $node->body = substr($node->body, strlen($node->teaser));
      }
    }
    else {
      $node->teaser = '';
      $node->format = 0;
    }
  }
}

Introduced by openpublish_administration.module

/**
 * Implementation of hook_form_alter().
 */
function openpublish_administration_form_alter(&$form, $form_state, $form_id) {
  // Make mods to every node form
  if ($form['#id'] == 'node-form') {
    $form['menu']['#collapsed'] = TRUE;
    $form['path']['#collapsed'] = TRUE;

    // Hide the split summary button
    if (!empty($form['body_field'])) {
      $form['body_field']['teaser_js']['#type'] = 'hidden';
      $form['body_field']['teaser_include']['#type'] = 'hidden';
    }
  }
}

Commenting $form['body_field']['teaser_js']['#type'] and $form['body_field']['teaser_include']['#type'] seems to fix the issue for me.

Don't copy/paste this code. This is just a trimmed version of actual code. Just comment the above mentioned lines that will do the needful.

Status: Fixed » Closed (fixed)
Issue tags: -6.x-4.1, -no questions, -questions dropped, -question field

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