MDL-43230 badges: manually revoke awarded badges
A user can be manually awarded a badge, but if given by mistake an awarded badge cannot be removed.
This commit is contained in:
committed by
Ryan Wyllie
parent
d9520bc04e
commit
b7374faca6
@@ -73,7 +73,11 @@ class core_badges_assertion {
|
||||
WHERE ' . $DB->sql_compare_text('bi.uniquehash', 40) . ' = ' . $DB->sql_compare_text(':hash', 40),
|
||||
array('hash' => $hash), IGNORE_MISSING);
|
||||
|
||||
$this->_url = new moodle_url('/badges/badge.php', array('hash' => $this->_data->uniquehash));
|
||||
if ($this->_data) {
|
||||
$this->_url = new moodle_url('/badges/badge.php', array('hash' => $this->_data->uniquehash));
|
||||
} else {
|
||||
$this->_url = new moodle_url('/badges/badge.php');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user