Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27948

The question engine should use a recordset to load attempt data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.1
    • 2.1
    • Quiz
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE
    • Hide

      Please reset all MDLQA tests to do with attempting quizzes with any behaviour, or previewing questions.

      If you want to do a quick test at integration time:
      1. Run all question and mod/quiz unit tests.
      2. Preview some questions from the question bank.
      3. Attempt and review a quiz.
      4. Visit all 4 quiz reports.

      Show
      Please reset all MDLQA tests to do with attempting quizzes with any behaviour, or previewing questions. If you want to do a quick test at integration time: 1. Run all question and mod/quiz unit tests. 2. Preview some questions from the question bank. 3. Attempt and review a quiz. 4. Visit all 4 quiz reports.

    Description

      using Moodle 2.1beta (Build: 20110617) on own WAMP local server...

      quiz repagination causes error
      Error reading from database

      More information about this error

      Debug info: BIGINT UNSIGNED value is out of range in '(-(1) * `moodlegit21dev`.`qas`.`id`)'

      SELECT
      COALESCE(qasd.id, -1 * qas.id) AS id,
      quba.id AS qubaid,
      quba.contextid,
      quba.component,
      quba.preferredbehaviour,
      qa.id AS questionattemptid,
      qa.questionusageid,
      qa.slot,
      qa.behaviour,
      qa.questionid,
      qa.variant,
      qa.maxmark,
      qa.minfraction,
      qa.flagged,
      qa.questionsummary,
      qa.rightanswer,
      qa.responsesummary,
      qa.timemodified,
      qas.id AS attemptstepid,
      qas.sequencenumber,
      qas.state,
      qas.fraction,
      qas.timecreated,
      qas.userid,
      qasd.name,
      qasd.value

      FROM mdl_question_usages quba
      LEFT JOIN mdl_question_attempts qa ON qa.questionusageid = quba.id
      LEFT JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id
      LEFT JOIN mdl_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id

      WHERE
      quba.id = ?

      ORDER BY
      qa.slot,
      qas.sequencenumber

      [array (
      0 => '22',
      )]
      Stack trace:
      line 393 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 794 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 269 of \question\engine\datalib.php: call to mysqli_native_moodle_database->get_records_sql()
      line 78 of \question\engine\lib.php: call to question_engine_data_mapper->load_questions_usage_by_activity()
      line 365 of \mod\quiz\attemptlib.php: call to question_engine::load_questions_usage_by_activity()
      line 385 of \mod\quiz\attemptlib.php: call to quiz_attempt->__construct()
      line 395 of \mod\quiz\attemptlib.php: call to quiz_attempt::create_helper()
      line 44 of \mod\quiz\attempt.php: call to quiz_attempt::create()

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              rezeau Joseph Rézeau
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Sam Hemelryk Sam Hemelryk
              Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1/Jul/11