Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2097

My Courses 2 block not shown to administrators when it should

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9.8
    • Block: My courses
    • None
    • Windows, XAMPP
    • MySQL
    • MOODLE_19_STABLE

      Hi Nate,

      I noticed that the block tries to follow the setting for the standard My Courses block that relates to showing an administrator all courses or only courses they are a teacher of.

      I was testing this with all courses shown (the default) and I expected it to show the block but it did not appear.

      I think the logic at line 47 of block_my_courses is flawed. My interpretation of your code is, "If I'm an administrator who is not a teacher I want to see the courses listed if administrators can see all courses", but at the moment the test is not achieving this. I think the adminseesall operand needs to be negated in this operation:

      ...
      !(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) and !$adminseesall) and
      ...

      Let me know if I am wrong.

            inceebee Nate Baxley (Inactive)
            salvetore Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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