Get availability date of activities using web API

Get availability date of activities using web API

by Frank Leone -
Number of replies: 2

Dear all,

I am trying to retrieve the date an activity becomes available, as set in the conditional access fields. I want to compare it to the date of last access to the course, to highlight the course if new activities became available.

I tried both $activity->availabilityinfo and $activity->availability, but they both don't contain this information in a usable format. I also found the printed text when an activity is not yet available here:

$ci = new \core_availability\info_module($mod);

$fullinfo = $ci->get_full_information();

However, it seems a detour to extract it from that. Does anyone know of a better way?

Thanks a lot in advance,

All the best,

Frank

Average of ratings: -
In reply to Frank Leone

Re: Get availability date of activities using web API

by Frank Leone -

Anyone any idea? If there is anything unclear, let me know. Thanks a lot in advance,

       Frank