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

Course Content Duplicate error when grade letters changed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2, 2.3, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Course
    • Labels:
    • Environment:
      RH Linux 6
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Logged as a teacher go to a course with students
      2. Course administration -> Gradebook -> Letters edit on the dropdown menu -> check "override site defaults" and save changes
      3. Backup the course with the default backup values
      4. Restore the backup selecting "Restore into this course" and "Merge the backup course into this course" in the 2nd step
      5. You SHOULD be able to restore the backup without exceptions
      6. Restore the backup in a new course
      7. You SHOULD be able to restore the backup without exceptions and if you go to the new course gradebook -> edit letters, you can see the "Override site defaults" option checked
      Show
      Logged as a teacher go to a course with students Course administration -> Gradebook -> Letters edit on the dropdown menu -> check "override site defaults" and save changes Backup the course with the default backup values Restore the backup selecting "Restore into this course" and "Merge the backup course into this course" in the 2nd step You SHOULD be able to restore the backup without exceptions Restore the backup in a new course You SHOULD be able to restore the backup without exceptions and if you go to the new course gradebook -> edit letters, you can see the "Override site defaults" option checked
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-29598_master

      Description

      I am using Moodle 2.1.1 on RH6 with mysql.

      Whenever the default grade letters for a course are changed and I duplicate any course content I get "Error writing to database".

      In the log it shows:

      Duplicate entry '209685-0.00000-F' for key 'mdl_gradlett_conlowlet_uix'
      INSERT INTO mdl_grade_letters (lowerboundary,letter,contextid) VALUES(?,?,?)
      [array (
        0 => '0.00000',
        1 => 'F',
        2 => '209685',
      )]

      What can I do to correct this problem?. Is there a patch available ?

      Thanks, Jose

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmonllao David Monllaó
              Reporter:
              jose@fiu.edu Jose Prendes
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/12