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

grade_object::insert() should fetch the new data and store it in object properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I had a little trouble with grade_object::instert() because after insert only id was updated, but the rest of properties was not synced with the actual data in database.

      I guess other developers might have the same problem when using the grade objects, the idea is to use update_from_db() after insert. It was already done in grade_category once and would have to be done several times in gradelib.php. There should be no performance penalty because we often use the grade objects after insert() anyway.

      Patch is nearly ready...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Tester:
              Nicolas Connault Nicolas Connault
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08