mirror of
https://github.com/moodle/moodle.git
synced 2025-01-16 21:18:33 +01:00
MDL-74075 core_badges: Check accepted criterias
This commit is contained in:
parent
bf842246c6
commit
c36ab09b66
@ -55,6 +55,12 @@ if ($badge->is_active() || $badge->is_locked()) {
|
||||
redirect($return);
|
||||
}
|
||||
|
||||
// Make sure the criteria type is accepted.
|
||||
$accepted = $badge->get_accepted_criteria();
|
||||
if (!in_array($type, $accepted)) {
|
||||
redirect($return);
|
||||
}
|
||||
|
||||
if ($badge->type == BADGE_TYPE_COURSE) {
|
||||
require_login($badge->courseid);
|
||||
$course = get_course($badge->courseid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user