All signed in users trying to create a question get this message.

"An illegal choice has been detected. Please contact the site administrator."

Questions created by the Admin (me), display without any answers to choose from.

Comments

davidburns’s picture

In the quiz.install file you have the following function which does a table alter on quiz_question_answer BUT that table never gets created elsewhere. Would this be the reason that user and admin are unable to submit answers to questions?

I believe it's a similar problem as this one >> http://drupal.org/node/171202

function quiz_update_1() {
  $ret = array();
  
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      // add a result option to the answer table
      $ret[] = update_sql("ALTER TABLE {quiz_question_answer} ADD result_option INTEGER UNSIGNED NULL");

      // Create the result options table
      $ret[] = update_sql("CREATE TABLE {quiz_result_options} (
        nid INTEGER UNSIGNED NOT NULL,
        option_id INTEGER UNSIGNED NOT NULL,
        option_name VARCHAR(255) character set utf8 NOT NULL,
        option_summary LONGTEXT character set utf8 NOT NULL,
        option_start TINYINT UNSIGNED NULL,
        option_end TINYINT UNSIGNED NULL,
        PRIMARY KEY (nid, option_id)
      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
  }
  return $ret;
}
awong’s picture

i cannot reproduce the error. Are you using the right version?

mbutcher’s picture

Status: Active » Closed (fixed)