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

Remove non-functional role switch check in Feedback module

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.5
    • 3.11.2, 4.0, 4.4.2
    • Feedback
    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_404_STABLE
    • MOODLE_405_STABLE
    • Hide
      1. Run the following command:

        $ git grep -B1 -A2 feedback_check_is_switchrole
        

      2. Confirm the only matches are deprecated method and upgrade notes mentioning the same
      Show
      Run the following command: $ git grep -B1 -A2 feedback_check_is_switchrole Confirm the only matches are deprecated method and upgrade notes mentioning the same

      Searching the Moodle repository for

      $USER->switchrole

      turned up this one remaining function in mod_feedback: https://github.com/moodle/moodle/search?q=feedback_check_is_switchrole

      As far as I can tell, the correct method to use would be  from accesslib:

      function is_role_switched($courseid)

      It looks like it's been nonfunctional for somewhere between 6 and 14 years, so it's unclear if the code that uses it is going to work when the boolean check is functioning again.

       

            pholden Paul Holden
            jrchamp Jonathan Champ
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 7 hours
                1w 3d 7h

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