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

Cannot delete Letter boundary

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      1/ Set up the following Letter > Boundary on a course (overriding site default):

      Highest Lowest Letter
      100.00 % 93.00 % A
      92.99 % 90.00 % A-
      89.99 % 87.00 % B+
      86.99 % 83.00 % B
      82.99 % 80.00 % B-
      79.99 % 77.00 % C+
      76.99 % 73.00 % C
      72.99 % 70.00 % C-
      69.99 % 67.00 % D+
      66.99 % 60.00 % D
      59.99 % 30.00 % E
      29.99 % 0.00 % F

      2/ Save
      3/ Delete the "E" letter (empty its lowest value)
      4/ Make sure E is deleted, and F now has the boundary from 59.99 to 0.

      Test 2

      1. Be destructive
        • Randomly change the boundaries (A could be 0-10, F >= 98, etc...)
        • Remove random letters
        • Rename letters, keep boundaries
        • Combine those changes
      2. Make sure you always obtain what you would expect
      Show
      Test 1 1/ Set up the following Letter > Boundary on a course (overriding site default): Highest Lowest Letter 100.00 % 93.00 % A 92.99 % 90.00 % A- 89.99 % 87.00 % B+ 86.99 % 83.00 % B 82.99 % 80.00 % B- 79.99 % 77.00 % C+ 76.99 % 73.00 % C 72.99 % 70.00 % C- 69.99 % 67.00 % D+ 66.99 % 60.00 % D 59.99 % 30.00 % E 29.99 % 0.00 % F 2/ Save 3/ Delete the "E" letter (empty its lowest value) 4/ Make sure E is deleted, and F now has the boundary from 59.99 to 0. Test 2 Be destructive Randomly change the boundaries (A could be 0-10, F >= 98, etc...) Remove random letters Rename letters, keep boundaries Combine those changes Make sure you always obtain what you would expect
    • Workaround:
      Hide

      If you move the letter you wish to delete at the end of the list (ie, set E as boundary 0 (zero) and raise F to 10 in the current example), you will then be able to delete it.

      Show
      If you move the letter you wish to delete at the end of the list (ie, set E as boundary 0 (zero) and raise F to 10 in the current example), you will then be able to delete it.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39692-master
    • Sprint:
      BACKEND Sprint 18

      Description

      Hi,

      Having the following Letter > Boundary on a course (overriding site default):

      Highest Lowest Letter
      100.00 % 93.00 % A
      92.99 % 90.00 % A-
      89.99 % 87.00 % B+
      86.99 % 83.00 % B
      82.99 % 80.00 % B-
      79.99 % 77.00 % C+
      76.99 % 73.00 % C
      72.99 % 70.00 % C-
      69.99 % 67.00 % D+
      66.99 % 60.00 % D
      59.99 % 30.00 % E
      29.99 % 0.00 % F

      I want to delete the "E" letter:

      1. Go into "Edit grade letters"
      2. Select "Unused" for the E Letter grade boundary
      3. Click "Save changes"

      EXPECTED BEHAVIOR
      E is delete and F have now boundary from 59.99 to 0

      ACTUAL BEHAVIOR
      Error message "Error writing to database".
      In the PHP log, we have :

      [15-May-2013 14:14:08 America/New_York] Default exception handler: Erreur d'écriture vers la base de données Debug: Duplicate entry '660-0.00000-F' for key 'mdl_gradlett_conlowlet_uix'
      UPDATE mdl_grade_letters SET letter = ?,lowerboundary = ?,contextid = ? WHERE id=?
      [array (
        0 => 'F',
        1 => 0,
        2 => '660',
        3 => 90,
      )]
      Error code: dmlwriteexception
      * line 426 of \lib\dml\moodle_database.php: dml_write_exception thrown
      * line 1195 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1227 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
      * line 179 of \grade\edit\letter\index.php: call to mysqli_native_moodle_database->update_record()
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/14