UCL-INGI / INGInious

INGInious is a secure and automated exercises assessment platform using your own tests, also providing a pluggable interface with your existing LMS.
http://www.inginious.org
Other
202 stars 139 forks source link

Retrieving team names + name sanitization #977

Open augustindelecluse opened 10 months ago

augustindelecluse commented 10 months ago

Is your feature request related to a problem? Please describe.

In some courses, we create repositories associated to students, the name of the repository being the inginious username of the student. However, we would like to create repositories for group of students as well. Currently, get_input("@username") retrieves a list of students if the group are set up. However, retrieving the names of the group would also be useful in this case.

Let's say that the group "team7" includes ["Naruto", "Sakura", "Sasuke"]. This means that, if we can retrieve the name of the group, we can create a repository named "project-team7", instead of "project-Naruto-Sakura-Sasuke". This is further useful if there's a change in the group: as the repositories are linked to group, if "Sasuke" leaves "team7", then the repository stays "project-team7" instead of becoming "project-Naruto-Sakura", which impacts the submissions of both "Naruto" and "Sakura".

Describe the solution you'd like

Retrieving the name of the team through a command such as get_input("@group") .

Furthermore, as the name of the team will be used to setup repositories, having some restrictions over the names is necessary:

Describe alternatives you've considered

A workaround consists in putting the mapping of teams within a file in $/common. But it means that the teacher needs to update the file for every group change, and forgetting to do so impacts the grading. Furthermore, there is no connection between this file and the group management setup on inginious. In my example, this means that I need to update a file containing

{
    "Naruto": "team7",
    "Sakura": "team7",
    "Sasuke": "team7",
}

So that it contains

{
    "Naruto": "team7",
    "Sakura": "team7",
    "Sasuke": "unknown",
}