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

tool_cohortroles error when any cohort has a null idnumber

XMLWordPrintable

    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • master_MDL-56358
    • Hide

      Create a cohort with a null value in the idnumber field. (you may need to do this at the db level)
      On the tool_cohortroles page, enter a search value in the "select cohorts" field that will include the cohort with the null idnumber field.
      Make sure the list of cohorts that match the search are shown and the error described does not appear.

      Show
      Create a cohort with a null value in the idnumber field. (you may need to do this at the db level) On the tool_cohortroles page, enter a search value in the "select cohorts" field that will include the cohort with the null idnumber field. Make sure the list of cohorts that match the search are shown and the error described does not appear.

      typically when cohorts are created using the UI we end up with an empty string in the idnumber field. But if another method is used and any cohort has a Null value in the idnumber field, the select cohorts ajax search fails and no cohorts can be selected.

      Invalid response value detected
      File: .../lib/externallib.php Line: 424
      Stack trace:
      cohorts => Invalid response value detected: idnumber => Invalid response value detected: Invalid external api response: the value is "", the server was expecting "raw" typeError code: invalidresponse

      the core function cohort_add_cohort() uses "NULL" as the idnumber if it is not passed in the initial parameter.

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Mark Nelson Mark Nelson
            David Monllaó David Monllaó
            Frédéric Massart Frédéric Massart
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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