Added active info for badge
This commit is contained in:
parent
dd7fa5f620
commit
24370631ab
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user