Closed mwithheld closed 2 days ago
One use of this starts in the IA availability condition with
\block_integrityadvocate\Api::is_status_valid()
\block_integrityadvocate\Api::is_status_invalid()
These go through an excessive number of functions to get the info
\block_integrityadvocate\Api::is_status_valid($othercm->context, $userid);
// self = \block_integrityadvocate\Api
self::get_module_status($modulecontext, $userid);
self::get_module_session_latest($modulecontext, $userid);
self::get_participantsessions_activity(
$blockinstance->config->apikey,
$blockinstance->config->appid,
$modulecontext->get_course_context()->instanceid,
$modulecontext->instanceid,
$userid,
1
);
// This next one is recursive.
self::get_participantsessions_activity_data($apikey, $appid, $params);
self::get(self::ENDPOINT_PARTICIPANTSESSIONS_ACTIVITY, $apikey, $appid, $params);
For activity status, there's a much simpler endpoint available:https://ca.integrityadvocateserver.com/api/2-0/participantstatusFound in our dev docs:https://www.integrityadvocateserver.com/developers#apiendpointsIt uses the same auth as the old endpoints, so you should be able to easily swap.