INGInious
INGInious copied to clipboard
Add a metadata var for public URL to task's public resources' access
Is your feature request related to a problem? Please describe. When proposing a public resource through a task, one needs to hardcode both the course_id and task_id in the link as documented: https://docs.inginious.org/en/latest/teacher_doc/share_files.html This is error prone when copy/pasting/duplicating/reusing tasks from one course/year to another. If the old course/task is still online it might even lead to unexpected behaviors if the new task uses some resources publicly available from the old one.
Describe the solution you'd like
The easiest would be to have a var available that handles the public url (like @publi_url) or something similar that would be agnostic of how the link is created. An public URL could look like:
base_url = @public_url + 'ressource_filename'
Describe alternatives you've considered
A second choice would be to have two vars @course_id and @task_id provided to be able to handle URLs such as:
base_url = '/course/' + @course_id + '/' + @task_id + '/ressource_filename'