apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
66 stars 73 forks source link

Add module opening and closing times to API #1362

Closed ihalaij1 closed 4 months ago

ihalaij1 commented 4 months ago

Description

What?

Add module opening and closing times to API

Why?

Requested for the needs of the Aalto Grades project

Fixes #1361

ihalaij1 commented 4 months ago

@murhum1 I followed the logic that is used to define the is_open field: https://github.com/apluslms/a-plus/blob/0086e01f23d17d0916f6d1e7500985efa7066db7/course/models.py#L1397-L1402

The module is considered 'open' if the reading_opening_time has passed.

Do you think we should just provide both opening times?

murhum1 commented 4 months ago

Okay, I see - but yes, I'd still rather provide both to avoid ambiguity.

ihalaij1 commented 4 months ago

@murhum1 Fixed!