Skip to content

Moving contest preferences from dedicated page to task list admin#1098

Merged
anthonygego merged 8 commits intoINGInious:mainfrom
AlexandreDoneux:moving_contest_preferences
Jan 23, 2026
Merged

Moving contest preferences from dedicated page to task list admin#1098
anthonygego merged 8 commits intoINGInious:mainfrom
AlexandreDoneux:moving_contest_preferences

Conversation

@AlexandreDoneux
Copy link
Contributor

This PR moves the contests settings from its dedicated page to the task list administration page. It is done in a way to allow settings to be implemented for any task dispenser.

Copy link
Member

@anthonygego anthonygego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite the expected implementation.

There already is a dictionary for all the dispenser settings called course_structure (for legacy reasons) in task_dispenser.js that is populated by a function called dispenser_structure_<dispenser_id>. This method should be defined in a plugin-specific JS file or provided in a plugin-specific template if appropriate.

You should implement the latter method by defining a dispenser id if not defined and move the code from your dispenser_util_get_settings function into dispenser_structure_<dispenser_id>. Then adapt the check_dispenser_data method of the Contest class by moving the code from your handle_settings method.

The code in inginious/frontend/task_dispensers and inginious/frontend/pages is not expected to be changed.

@AlexandreDoneux AlexandreDoneux marked this pull request as ready for review January 22, 2026 12:33
@AlexandreDoneux
Copy link
Contributor Author

AlexandreDoneux commented Jan 22, 2026

In task_dispenser.js, is the dispenser_util_get_task_config() still used somewhere ? It seems you have replaced its use by the global dispenser_config dictionnary but forgot to remove that function.

@anthonygego
Copy link
Member

In task_dispenser.js, is the dispenser_util_get_task_config() still used somewhere ? It seems you have replaced its use by the global dispenser_config dictionnary but forgot to remove that function.

Indeed, it seems it is not used anymore.

@anthonygego
Copy link
Member

LGTM.

@anthonygego anthonygego merged commit 7415335 into INGInious:main Jan 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants