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

Cannot create a "Simple calculated" questions in Moodle 4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.0.2
    • Questions, Quiz
    • None
    • MOODLE_400_STABLE

      To reproduce, create a "Simple calculated" question as follows:

      • Write "{a}" in "Question text"
      • Write "{a}/2" in "Answer 1 formula"
      • Set Grade to 100% in "Answer 1"
      • Click "Find the wild cards {x..} present in the correct answer formula
      • Click on "Generate" 1 new set of waild card(s) values

      What you get is:

          Can't find data record in database.

       

      Debug info:

      SELECT q.id, qc.id as category, q.parent, q.name, q.questiontext, q.questiontextformat,
      q.generalfeedback, q.generalfeedbackformat, q.defaultmark, q.penalty, q.qtype,
      q.length, q.stamp, q.timecreated, q.timemodified,
      q.createdby, q.modifiedby, qbe.idnumber,
      qc.contextid,
      qv.status,
      qv.id as versionid,
      qv.version,
      qv.questionbankentryid
      FROM {question} q
      JOIN {question_versions} qv ON qv.questionid = q.id
      JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid
      JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid
      WHERE q.id = :id
      [array (
      'id' => 0,
      )]
      Error code: invalidrecordunknown
       

       

      The stack trace:

       

      • line 1674 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      • line 624 of /question/engine/bank.php: call to moodle_database->get_record_sql()
      • line 587 of /cache/classes/loaders.php: call to question_finder->load_for_cache()
      • line 1792 of /cache/classes/loaders.php: call to cache->get_implementation()
      • line 405 of /cache/classes/loaders.php: call to cache_application->get_implementation()
      • line 480 of /question/engine/bank.php: call to cache->get()
      • line 255 of /question/engine/bank.php: call to question_finder->load_question_data()
      • line 273 of /question/engine/bank.php: call to question_bank::load_question_data()
      • line 217 of /question/bank/editquestion/question.php: call to question_bank::load_question()

       

            Unassigned Unassigned
            jsegarra Juan Segarra Montesinos
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.