Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Get enrollment expiration date

$
0
0
by Giorgia Rumore Pagano.  

Hello everyone,

I am currently working on a project where I need to retrieve the enrollment expiration date for each user in a course. To obtain this information, I'm trying to use the mod_assign_get_assignments API in the following manner:

Endpoint:  

 

http://localhost:8080/webservice/rest/server.php?wstoken=....&wsfunction=mod_assign_get_assignments&courseids[0]=2&includenotenrolledcourses=1&capabilities[0]=mod/assign:view&moodlewsrestformat=json

However, I'm unable to find the information I need in the response. Here's the response I receive:

{
    "courses": [
        {
            "id": 2,
            "fullname": "Corso Moodle",
            "shortname": "moodle",
            "timemodified": 1712573533,
            "assignments": []
        }
    ],
    "warnings": []
}

As you can see, the assignments array within the response is empty, and I'm not getting the enrollment expiration date for each user.

Could someone please guide me on how I can retrieve the enrollment expiration date for a course using the Moodle API? Any insights or suggestions would be greatly appreciated.

Thank you in advance for your assistance!



Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>