-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.9.8
-
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.