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

/grade/grading/lib.php grading_manager::get_controller() is missing global $DB

    Details

      Gliffy Diagrams

        Activity

        Hide
        marina Marina Glancy added a comment -

        in the current usage of advanced grading it is only used in assignment submission and function get_controller is called after the grading method is set which means after function set_active_method() is invoked. In the later the property areacache is populated.
        It means that the code accessing $DB in get_controller is unreachable.

        Although in the future it may be possible for module to have several grading methods and the function get_controller may be called for non-active method

        Show
        marina Marina Glancy added a comment - in the current usage of advanced grading it is only used in assignment submission and function get_controller is called after the grading method is set which means after function set_active_method() is invoked. In the later the property areacache is populated. It means that the code accessing $DB in get_controller is unreachable. Although in the future it may be possible for module to have several grading methods and the function get_controller may be called for non-active method
        Hide
        stronk7 Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        skodak Petr Skoda added a comment -

        thanks for the detailed evaluation and fix!

        Show
        skodak Petr Skoda added a comment - thanks for the detailed evaluation and fix!
        Hide
        stronk7 Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks (22 and master).

        Show
        stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks (22 and master).
        Hide
        stronk7 Eloy Lafuente (stronk7) added a comment -

        nobody tested this as far as it is unreachable right now.

        Show
        stronk7 Eloy Lafuente (stronk7) added a comment - nobody tested this as far as it is unreachable right now.
        Hide
        stronk7 Eloy Lafuente (stronk7) added a comment -

        Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

        Nah, joking, many thanks! Closing this a fixed, ciao

        Show
        stronk7 Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Mar/12