Override assignment deadlines for groups via API

Override assignment deadlines for groups via API

by G MT -
Number of replies: 4
Hello, 

Is it possible to change the deadline for submitting an assignment for a group in the course via the API?

I can't find any information on how the due date for groups in  assignment is stored. Is this an attribute stored by the 'tasks' module? Is the group attribute?

Is this data stored in some database that I can access using the API and overwrite it?

I mean these settings for the assignment.


https://docs.moodle.org/402/en/Using_Assignment#You_want_students_to_submit_work_in_groups

I will be very grateful for any tips!

Average of ratings: -
In reply to G MT

Re: Override assignment deadlines for groups via API

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

The data are stored in mdl_assign_overrides.
I don't find the api to manage it, I found events but I don't think it help you in that case.

You can find more info in \mod\assign\overrides.php
-> assign_update_events($assignment, $override);

I Think this function can give you good information. Because it seems that modifying the table will not be enougth, it seems that you've also to update the events in, the calendar.


I hope it will help you.

Dominique.

In reply to Dominique Palumbo

Odp: Re: Override assignment deadlines for groups via API

by G MT -
Thank you for clarifying the situation.

It's a pity that there is no easy and fun way to modify deathlines for groups.

I need to periodically set multiple due dates for multiple groups and multiple tasks. That's why I'm looking for a solution to speed up this process.
In reply to G MT

Re: Override assignment deadlines for groups via API

by Michael Hughes -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Yeah, there's no API for this, you're basically looking at decoding what add overrride script does,and my recollection is that its' pretty arcane.
In reply to Michael Hughes

Odp: Re: Override assignment deadlines for groups via API

by G MT -
Do you know if there are any indications that an API supporting this will be added in the future?