Merge branch 'MDL-74570-fix' of https://github.com/sarjona/moodle

This commit is contained in:
Andrew Nicols
2023-06-29 17:32:52 +08:00
committed by Ilya Tregubov
-6
View File
@@ -100,9 +100,6 @@ class get_user_badge_by_hash_test extends externallib_advanced_testcase {
$context = \context_system::instance();
$badge->badgeurl = \moodle_url::make_webservice_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id, '/',
'f3')->out(false);
// Hack the database to adjust the time each badge was issued.
$DB->set_field('badge_issued', 'dateissued', $now, ['userid' => $student1->id, 'badgeid' => $badgeid]);
$badge->status = BADGE_STATUS_ACTIVE_LOCKED;
// Add an endorsement for the badge.
@@ -154,9 +151,6 @@ class get_user_badge_by_hash_test extends externallib_advanced_testcase {
$badge->badgeurl = \moodle_url::make_webservice_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->id , '/',
'f3')->out(false);
// Hack the database to adjust the time each badge was issued.
$DB->set_field('badge_issued', 'dateissued', $now, ['userid' => $student1->id, 'badgeid' => $badge->id]);
unset($badge->endorsement);
$badge->alignment = [];
$usercoursebadge[] = (array) $badge;