Skip to content
Snippets Groups Projects

Backport membership requests logic

Closed Marcin Grabias requested to merge issue/lms-3467618:membership-requests into 0.2.x
Files
7
@@ -36,10 +36,9 @@ class LearningPath extends Group {
* Checks if the given account is a member of any of the classes of this
* learning path.
*/
public function isClassMember(AccountInterface $account, array &$cache_contexts): bool {
public function isClassMember(AccountInterface $account, array &$cache_contexts = []): bool {
$classes = $this->getClasses();
$cache_contexts = [];
foreach ($classes as $class) {
if ($class->getMember($account) !== FALSE) {
// If the user is a member of one class, only this single class
Loading