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

Replacement of extern_server_course function in course/view.php by hooks api

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-83473_main
    • Hide

      Covered by automated PHPUnit test

      This patch is covered by PHPUnit test.

      Test 1) Regression Test (Backwards compatibility test)

      1. Apply the patch and upgrade Moodle ( to be sure the hook is registered )
      2. Place the externservercourse.php file (see attached) inside the moodle/course folder. Afterwards you can go to any course page moodle/course/view.php?id=xy and you should be redirected to https://moodle.org

      Test 2) Check if hook is registered

      1. Apply the patch and upgrade Moodle ( to be sure the hook is registered )
      2. Go to "Site administration -> Development -> Hooks overview"
      3. Check if you see the hook core_course\hook\before_course_viewed on this page

       

      Show
      Covered by automated PHPUnit test This patch is covered by PHPUnit test. Test 1) Regression Test (Backwards compatibility test) Apply the patch and upgrade Moodle ( to be sure the hook is registered ) Place the externservercourse.php file (see attached) inside the moodle/course folder. Afterwards you can go to any course page moodle/course/view.php?id=xy and you should be redirected to https://moodle.org Test 2) Check if hook is registered Apply the patch and upgrade Moodle ( to be sure the hook is registered ) Go to "Site administration -> Development -> Hooks overview" Check if you see the hook core_course\hook\before_course_viewed on this page  
    • Hide

      Code verified against automated checks.

      Checked MDL-83473 using repository: https://github.com/dasistwas/moodle

      More information about this report

      Built on: Thu 21 Nov 2024 10:06:36 AM UTC

      Show
      Code verified against automated checks. Checked MDL-83473 using repository: https://github.com/dasistwas/moodle main (0 errors / 0 warnings) [branch: MDL-83473_main | CI Job ] More information about this report Built on: Thu 21 Nov 2024 10:06:36 AM UTC
    • Hide

      Launching automatic jobs for branch MDL-83473_main

      Built on: Tue Nov 19 06:30:03 AM UTC 2024

      Show
      Launching automatic jobs for branch MDL-83473 _main Built on: Tue Nov 19 06:30:03 AM UTC 2024

      The deprecated implementation inside course/view.php, which uses the extern_server_course function to distinguish between routing for internal and external courses, can be improved by utilizing the Hook API. This functionality is necessary for a project that involves multiple universities. The Hook API workflow will generalize the method, making it easier to route users to external courses from within other plugins.

       

       

            dasistwas David Bogner
            WunderJacob Jacob Viertel
            Laurent David Laurent David
            Ferran Recio Ferran Recio
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 41 minutes
                41m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.