apluslms / a-plus

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

Add a cache invalidation tag and an exercise reference to the assessment interface #668

Open raphendyr opened 4 years ago

raphendyr commented 4 years ago

Currently, the assessment tool is unable to determine if the exercise has changed since the last request. Currently, the best is to inavliade the cache after a while.

However, we could add a value, which defines if the exercise configuration has changed, which would be perfect for the cache.

Few things to consider. The post_url has been the best guess for the exercise reference (even that was bad). Thus,

Alternatively, these fields can be encoded to a single field, i.e., the cache tag could be part of the url (http://aplus/api/ex/11?c=123, where c=123 is the cache invalidation tag).

Update assessment services after this is implemented:

markkuriekkinen commented 4 years ago

Add e.g. exercise API URL to download the exercise info (name, points etc, and exercise_info).

Don't we already have this? What is missing?

raphendyr commented 4 years ago

Add e.g. exercise API URL to download the exercise info (name, points etc, and exercise_info).

Don't we already have this? What is missing?

Ah. Yeah. Was supposed to make clear that it would be the same for exercise and submission posts. I.e. the assessment service would be able to use it as a cache key (well, tuple of api url and etag would be the cache key).