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

Grades won't export to Excel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.4
    • Gradebook
    • None
    • MOODLE_20_STABLE

      I went to export grades to excel. After the settings screen appears, I click "Download" and the headings appear, but not the student names & grades. This is the error message:

      Debug info: Unknown column 'rainner.userid' in 'on clause'
      SELECT g.* , u.lastname AS usrt1, u.firstname AS usrt2, u.id AS usrt
      FROM mdl_grade_grades g
      JOIN mdl_user u ON g.userid = u.id
      JOIN (SELECT DISTINCT eu1_u.id
      FROM mdl_user eu1_u
      JOIN mdl_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
      JOIN mdl_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = ?)
      WHERE eu1_u.deleted = 0 AND eu1_u.id <> ?) je ON je.id = u.id

      JOIN (
      SELECT DISTINCT ra.userid
      FROM mdl_role_assignments ra
      WHERE ra.roleid IN (?,?)
      AND ra.contextid IN (168,3,1)
      ) rainnner ON rainner.userid = u.id
      WHERE u.deleted = 0
      AND g.itemid IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

      ORDER BY usrt1 ASC, usrt2 ASC, usrt ASC, g.itemid ASC
      [array (
      0 => '4',
      1 => '1',
      2 => '3',
      3 => '5',
      4 => 40,
      5 => 44,
      6 => 46,
      7 => 50,
      8 => 51,
      9 => 55,
      10 => 56,
      11 => 63,
      12 => 67,
      13 => 72,
      14 => 76,
      15 => 77,
      16 => 80,
      17 => 81,
      18 => 87,
      19 => 88,
      20 => 93,
      21 => 97,
      22 => 101,
      23 => 102,
      24 => 106,
      25 => 107,
      26 => 108,
      27 => 109,
      28 => 12,
      )]
      Stack trace:
      line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 749 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 166 of \grade\lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      line 225 of \grade\export\lib.php: call to graded_users_iterator->init()
      line 59 of \grade\export\xls\index.php: call to grade_export->display_preview()

            andyjdavis Andrew Davis
            stevemac805 Steve McKenzie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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