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

TypeError on cohorts page if cohort ID is NULL

XMLWordPrintable

      Steps to reproduce issue

      1. Prepare a CSV file with two lines:
      name
      Uploaded cohort 1

      2. Go to Site administration > Users > Cohorts > Upload cohorts.
      3. Click Choose a file..., select the above CSV file and click Upload this file.
      4. Click Preview then click Upload cohorts.
      When the message Uploaded 1 cohorts is displayed click Continue.

      Expected results

      The new cohort appears in the list of cohorts.

      Actual results

      Exception - core_cohort\reportbuilder\local\systemreports\cohorts::core_cohort\reportbuilder\local\systemreports{closure}(): Argument #1 ($idnumber) must be of type string, null given, called in [dirroot]/reportbuilder/classes/local/report/column.php on line 690

      Debug info:
      Error code: generalexceptionmessage

      Stack trace:

      line 142 of /cohort/classes/reportbuilder/local/systemreports/cohorts.php: TypeError thrown
      line 690 of /reportbuilder/classes/local/report/column.php: call to core_cohort\reportbuilder\local\systemreports\cohorts::core_cohort\reportbuilder\local\systemreports{closure}()
      line 205 of /reportbuilder/classes/table/system_report_table.php: call to core_reportbuilder\local\report\column->format_value()
      line ? of unknownfile: call to core_reportbuilder\table\system_report_table::core_reportbuilder\table{closure}()
      line 207 of /reportbuilder/classes/table/system_report_table.php: call to array_walk()
      line 2016 of /lib/tablelib.php: call to core_reportbuilder\table\system_report_table->format_row()
      line 2140 of /lib/tablelib.php: call to table_sql->build_table()
      line 58 of /reportbuilder/classes/output/renderer.php: call to table_sql->out()
      line 491 of /lib/outputrenderers.php: call to core_reportbuilder\output\renderer->render_system_report_table()
      line 113 of /reportbuilder/classes/external/system_report_exporter.php: call to plugin_renderer_base->render()
      line 125 of /lib/classes/external/exporter.php: call to core_reportbuilder\external\system_report_exporter->get_other_values()
      line 72 of /reportbuilder/classes/output/system_report.php: call to core\external\exporter->export()
      line 45 of /reportbuilder/classes/output/renderer.php: call to core_reportbuilder\output\system_report->export_for_template()
      line 491 of /lib/outputrenderers.php: call to core_reportbuilder\output\renderer->render_system_report()
      line 231 of /reportbuilder/classes/system_report.php: call to plugin_renderer_base->render()
      line 118 of /cohort/index.php: call to core_reportbuilder\system_report->output()

        1. 401.gif
          401.gif
          527 kB
        2. cohorts.csv
          0.0 kB
        3. master.gif
          master.gif
          356 kB

            davidcarrillo David Carrillo
            leonstr Leon Stringer
            Paul Holden Paul Holden
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 53 minutes
                53m

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