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

Workshop errors with MS SQL

    XMLWordPrintable

    Details

    • Database:
      Microsoft SQL
    • Testing Instructions:
      Hide

      Ideally this should be tested on at least MSSQL (to make sure that the reported issue is fixed) and then PostgreSQL and/or MySQL (to make sure there is no regression).

      • Create a workshop and let at least two students submit their work
      • Switch the workshop to the Assessment phase
      • TEST: make sure that the table of students' submissions is displayed and that you can sort the rows by firstname, lastname and submission title (using the arrows in the table header)
      Show
      Ideally this should be tested on at least MSSQL (to make sure that the reported issue is fixed) and then PostgreSQL and/or MySQL (to make sure there is no regression). Create a workshop and let at least two students submit their work Switch the workshop to the Assessment phase TEST: make sure that the table of students' submissions is displayed and that you can sort the rows by firstname, lastname and submission title (using the arrows in the table header)
    • Workaround:
      Hide

      None known

      Show
      None known
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28015-workshop-sql

      Description

      Hi

      Moodle 2.03+ SQL: 10 Windows 2008R2 IIS7.5

      Started workshop for the first time with a class. Used grading by accumlative grades.

      Used random allocations

      It kept on failing on grade calculations (logged in as admin/teacher) and it kept on stating Database error. (I can provide screenshots if necessary)

      thanks

      J.

      Replication steps:

      1. Start Workshop for a course
      2. Set Accumulative Grading
      3. Random assignment of tasks
      4. Students grade tasks
      5. DB error then appears when trying to do Grade calculations

      PS Debug info below

      Debug info: SQLState: 42000<br>Error Code: 169<br>Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique.<br>
      SELECT TOP 10 u.id AS userid,u.firstname,u.lastname,u.picture,u.imagealt,u.email,s.title AS submissiontitle, s.grade AS submissiongrade, ag.gradinggradeFROM mdl_user uLEFT JOIN mdl_workshop_submissions s ON (s.authorid = u.id AND s.workshopid = '1' AND s.example = 0)LEFT JOIN mdl_workshop_aggregations ag ON (ag.userid = u.id AND ag.workshopid = '1')WHERE u.id IN ('335','180','468','251','196','374','113','121','192','153','222','229','201','227','465','193','126','164','224','163','385','2')ORDER BY lastname ASC,u.lastname,u.firstname,u.id[array (0 => '1',1 => '1',2 => 335,3 => 180,4 => 468,5 => 251,6 => 196,7 => 374,8 => 113,9 => 121,10 => 192,11 => 153,12 => 222,13 => 229,14 => 201,15 => 227,16 => 465,17 => 193,18 => 126,19 => 164,20 => 224,21 => 163,22 => 385,23 => 2,)]Stack trace:line 391 of \lib\dml\moodle_database.php: dml_read_exception thrownline 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()line 368 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()line 773 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()line 807 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()line 1342 of \mod\workshop\locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()line 355 of \mod\workshop\view.php: call to workshop->prepare_grading_report_data()

        Attachments

          Activity

            People

            • Assignee:
              mudrd8mz David Mudrák (@mudrd8mz)
              Reporter:
              jgcracknell James Cracknell
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                1/Aug/11