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

Error in the Column Sort Order question bank plugin after upgrading to 4.3

XMLWordPrintable

    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-81380_403
    • MDL-81380_404
    • Hide
      1. Install MOODLE_402_STABLE branch
      2. Go to Custom Fields ([https://[[moodleroot]]/question/bank/customfields/customfield.php]) and add a new Category.
      3. Add a new Text Area field (e.g. call both required fields "test").
      4. Then go to Custom Sort Order [https://[[moodleroot]]/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder] (or refresh the page if already open).
      5. "test" is automatically added as a row. Move the new row up one. It will add a column in the config_plugins setting  (qbank_columnsortorder, enabledcol)
      6. Also, go to 'Manage question bank plugins' and hide plugin e.g., Question statistics.
      7. Verify the config_plugins setting (qbank_columnsortorder, disabledcol) in the database. It has a value like qbank_statistics\columns\facility_index,qbank_statistics\columns\discriminative_efficiency,qbank_statistics\columns\discrimination_index
      8. And for custom field, (qbank_columnsortorder, enabledcol) it is saved as qbank_customfields\custom_field_column\test.

      Now install MOODLE_403_STABLE or later branch having this fix

      1. Verify the config_plugins setting (qbank_columnsortorder, disabledcol) in the database. It should have value like qbank_statistics\columns\facility_index-facility_index,qbank_statistics\columns\discriminative_efficiency-discriminative_efficiency,qbank_statistics\columns\discrimination_index-discrimination_index
        and for custom field, (qbank_columnsortorder, enabledcol) it is - qbank_customfields\custom_field_column-test.
      2. Now go to Custom Sort Order [https://[[moodleroot]]/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder] (or refresh the page if already open) and verify that no error is thrown.
      Show
      Install MOODLE_402_STABLE branch Go to  Custom Fields  ([https://[[moodleroot]]/question/bank/customfields/customfield.php]) and add a new Category. Add a new Text Area field (e.g. call both required fields "test"). Then go to  Custom Sort Order  [https://[[moodleroot]]/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder] (or refresh the page if already open). "test" is automatically added as a row. Move the new row up one. It will add a column in the config_plugins setting  (qbank_columnsortorder, enabledcol) Also, go to 'Manage question bank plugins' and hide plugin e.g., Question statistics. Verify the config_plugins setting (qbank_columnsortorder, disabledcol) in the database. It has a value like qbank_statistics\columns\facility_index,qbank_statistics\columns\discriminative_efficiency,qbank_statistics\columns\discrimination_index And for custom field, (qbank_columnsortorder, enabledcol) it is saved as qbank_customfields\custom_field_column\test . Now install MOODLE_403_STABLE or later branch having this fix Verify the config_plugins setting (qbank_columnsortorder, disabledcol) in the database. It should have value like qbank_statistics\columns\facility_index-facility_index,qbank_statistics\columns\discriminative_efficiency-discriminative_efficiency,qbank_statistics\columns\discrimination_index-discrimination_index and for custom field, (qbank_columnsortorder, enabledcol) it is - qbank_customfields\custom_field_column-test . Now go to Custom Sort Order [https://[[moodleroot]]/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder] (or refresh the page if already open) and verify that no error is thrown.

      On our site, upgraded from Moodle 4.3, on .../question/bank/columnsortorder/sortcolumns.php?section=columnsortorder, we are getting

      Exception - core_question\local\bank\column_base::from_column_name(): Argument #2 ($columnname) must be of type string, null given, called in [dirroot]/question/bank/columnsortorder/classes/column_manager.php on line 221

      This is because config_plugins setting (qbank_columnsortorder, disabledcol) has a value like

      qbank_statistics\columns\facility_index,qbank_statistics\columns\discriminative_efficiency,qbank_statistics\columns\discrimination_index

      In Moodle 4.3, that value should look like

      qbank_statistics\columns\discriminative_efficiency-discriminative_efficiency

      There is no upgrade or other fallback code, to try to convert the old values into the new format, leading to fatal errors.

        1. MDL-81380_1_7.png
          MDL-81380_1_7.png
          27 kB
        2. MDL-81380_1_8.png
          MDL-81380_1_8.png
          26 kB
        3. MDL-81380_2_1A.png
          MDL-81380_2_1A.png
          27 kB
        4. MDL-81380_2_1B.png
          MDL-81380_2_1B.png
          25 kB
        5. MDL-81380_2_2.png
          MDL-81380_2_2.png
          68 kB

            Anupama Sarjoshi Anupama Sarjoshi
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Ilya Tregubov Ilya Tregubov
            Mihail Geshoski Mihail Geshoski
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 5 minutes
                2h 5m

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