From 24370631abaeb1ff639c03eda9d4a2d45e0c3297 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Wed, 1 Nov 2023 23:48:47 +0100 Subject: [PATCH] Added active info for badge --- classes/badgeinfo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/badgeinfo.php b/classes/badgeinfo.php index 50f3652..33e15ac 100644 --- a/classes/badgeinfo.php +++ b/classes/badgeinfo.php @@ -119,6 +119,7 @@ class badgeinfo { 'number of studyplan students that can get this badge', VALUE_OPTIONAL), "issuedcount" => new \external_value(PARAM_INT, 'number of studyplan students that have got this badge', VALUE_OPTIONAL), + "active" => new \external_value(PARAM_BOOL, 'badge is available'), ], "Badge info", $value); } @@ -149,6 +150,7 @@ class badgeinfo { 'description' => $this->badge->description, 'imageurl' => \moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $this->badge->id, '/', 'f1')->out(false), + "active" => $this->badge->is_active(), ]; // Add badge issue stats if a studentlist is attached to the request.