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

grade_category-->keephigh seems to be lost after executing apply_forced_settings (causes Oracle breakage)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Labels:
      None
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      While playing with Oracle I get:

      ORA-01407: cannot update ("STRONK7_19"."M_GRADE_CATEGORIES"."KEEPHIGH") to NULL

      UPDATE m_grade_categories SET courseid = '21',parent = NULL,depth = '1',path = '/4/',fullname = '?',aggregation = '11',keephigh = '',droplow = '0',aggregateonlygraded = '1',aggregateoutcomes = '1',aggregatesubcats = '1',timecreated = '1206208578',timemodified = '1206231472' WHERE id = 4

      • line 1704 of lib/dmllib.php: call to debugging()
      • line 205 of lib/grade/grade_object.php: call to update_record()
      • line 222 of lib/grade/grade_category.php: call to grade_object->update()
      • line 877 of lib/grade/grade_category.php: call to grade_category->update()
      • line 784 of lib/grade/grade_category.php: call to grade_category->get_children()
      • line 1299 of grade/lib.php: call to grade_category->fetch_course_tree()
      • line 122 of grade/report/grader/lib.php: call to grade_tree->grade_tree()
      • line 122 of grade/report/grader/index.php: call to grade_report_grader->grade_report_grader()

      Problem seems to be the "keephigh" field whose value, when inserted, is '' (empty string). Tracing the problem down, I've found that the grade_category->apply_forced_settings() call changes the previous value of "keephigh" from 0 to empty string and is the final cause for breakage.

      Code in apply_forced_settings() seems to rely on $CFG->grade_keephigh, that, in my server is empty string.

      To reproduce, I just installed 1.9 under Oracle, created one course and press in the gradebook. Then the error above happened (and some sort of infinite recursion killing the web server).

      Ciao

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Tester:
                Petr Skoda
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/08