Moodle

Scripts for fixing duplicates due to corrupted gradebook upgrade process

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

.

  1. diag.patch
    22/Jul/08 2:13 AM
    6 kB
    Nicolas Connault
  2. grade_utilities.patch
    24/Jul/08 4:51 PM
    29 kB
    Nicolas Connault

Activity

Hide
Nicolas Connault added a comment -

Please see attached patch

Show
Nicolas Connault added a comment - Please see attached patch
Hide
Nicolas Connault added a comment -

Patch updated with optimised SQL. Also, the detection of duplicated grade items was moved to admin/index.php for the time being, just before the call to upgrade_activity_modules.

Show
Nicolas Connault added a comment - Patch updated with optimised SQL. Also, the detection of duplicated grade items was moved to admin/index.php for the time being, just before the call to upgrade_activity_modules.
Hide
Martin Dougiamas added a comment -

Hi, just had a quick look ... I'm not happy about all the grades code in a new admin/diag directory ...likewise the raw SQL in moodle/admin/index.php is a bit ugly.

How about putting all the code into functions in moodle/lib/grade/utilities.php and in moodle/admin/index.php just have something like

require($CFG->libdir/grade/utilities.php);
grade_check_and_fix();

Where that function will call more functions in the same file to do the check etc and redirect to moodle/grade/repair.php if a GUI is required.

Show
Martin Dougiamas added a comment - Hi, just had a quick look ... I'm not happy about all the grades code in a new admin/diag directory ...likewise the raw SQL in moodle/admin/index.php is a bit ugly. How about putting all the code into functions in moodle/lib/grade/utilities.php and in moodle/admin/index.php just have something like require($CFG->libdir/grade/utilities.php); grade_check_and_fix(); Where that function will call more functions in the same file to do the check etc and redirect to moodle/grade/repair.php if a GUI is required.
Hide
Nicolas Connault added a comment -

Attached updated patch

Show
Nicolas Connault added a comment - Attached updated patch

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: