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

Error when trying to create Rubric from Template

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.2
    • Labels:
    • Environment:
      Windows Server 2008R2, IIS7.5, Microsoft SQL 2008R2
    • Database:
      Microsoft SQL
    • Testing Instructions:
      Hide

      Ideally needs to be tested on MS SQL. But can be also tested on Mysql to make sure everything still works after changes.

      Repeat steps from MDLQA-1187 and also MDLQA-1186 to check that "pick template" form is working for both own and shared templates.

      Show
      Ideally needs to be tested on MS SQL. But can be also tested on Mysql to make sure everything still works after changes. Repeat steps from MDLQA-1187 and also MDLQA-1186 to check that "pick template" form is working for both own and shared templates.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
      git@github.com:marinaglancy/moodle.git
    • Pull Master Branch:
      wip-MDL-31060-master

      Description

      Using most latest weekly update at time of writing. See Testing instructions for what to do - but this error occurs when I click on Create Rubric from Template.

      Reproduction steps:

      1. Create assignment with simple grading
      2. Assignments submitted
      3. change to advanced grading
      4. Click on Create Rubric from Template

      Debug info: SQLState: 42000<br>
      Error Code: 421<br>
      Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The ntext data type cannot be selected as DISTINCT because it is not comparable.<br>
       
      SELECT DISTINCT gd.id, gd.areaid, gd.name, gd.description, gd.descriptionformat, gd.timecreated, 
      gd.usercreated, gd.timemodified, gd.usermodified 
      FROM mdl_grading_definitions gd 
      JOIN mdl_grading_areas ga ON (gd.areaid = ga.id) 
      JOIN mdl_context cx ON (ga.contextid = cx.id) LEFT JOIN mdl_gradingform_rubric_criteria rc ON (rc.definitionid = gd.id) 
      LEFT JOIN mdl_gradingform_rubric_levels rl ON (rl.criterionid = rc.id) WHERE gd.method = N'rubric' AND ga.contextid = '1' AND ga.component = 'core_grading' ORDER BY gd.name
      [array (
      0 => 'rubric',
      1 => '1',
      )]
      Stack trace:
      line 394 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 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 199 of \grade\grading\pick.php: call to sqlsrv_native_moodle_database->get_recordset_sql()

        Gliffy Diagrams

          Activity

          Hide
          salvetore Michael de Raadt added a comment -

          Thanks for reporting this.

          I've put that on the backlog.

          In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

          Show
          salvetore Michael de Raadt added a comment - Thanks for reporting this. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
          Hide
          jgcracknell James Cracknell added a comment -

          Thanks Michael

          Sorry I don't know PHP, so I am unable to help other than testing any patches - I am a Windows and Networking junkie!

          James

          Show
          jgcracknell James Cracknell added a comment - Thanks Michael Sorry I don't know PHP, so I am unable to help other than testing any patches - I am a Windows and Networking junkie! James
          Hide
          marina Marina Glancy added a comment -

          It turned out that this text field and also most of other fields are not used anyway in the query result so I removed them from query completely.

          Show
          marina Marina Glancy added a comment - It turned out that this text field and also most of other fields are not used anyway in the query result so I removed them from query completely.
          Hide
          jgcracknell James Cracknell added a comment -

          Hi Marina

          Looked at the difference file on github - will hopefully test during the day Weds (UK Time).

          Thank you.

          Show
          jgcracknell James Cracknell added a comment - Hi Marina Looked at the difference file on github - will hopefully test during the day Weds (UK Time). Thank you.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Marina - this has been integrated now

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Marina - this has been integrated now
          Hide
          jgcracknell James Cracknell added a comment -

          Sorry about the delay - exams all last week for students here.

          Tested on MS SQL 2008R2

          It works as expected.

          Thank you.

          J.

          Show
          jgcracknell James Cracknell added a comment - Sorry about the delay - exams all last week for students here. Tested on MS SQL 2008R2 It works as expected. Thank you. J.
          Hide
          nebgor Aparup Banerjee added a comment -

          Thanks for reporting and testing this James
          Passing - tested fine by issue reporter.

          Show
          nebgor Aparup Banerjee added a comment - Thanks for reporting and testing this James Passing - tested fine by issue reporter.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          This is now available in the git and cvs repositories.

          Consider the responsibility of your fingerprints engraved there for future generations!

          Thanks for the work, closing, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - This is now available in the git and cvs repositories. Consider the responsibility of your fingerprints engraved there for future generations! Thanks for the work, closing, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12