Skip to content

Conversation

@Nimon77
Copy link
Contributor

@Nimon77 Nimon77 commented Mar 28, 2024

Prevent user from logging in to exam session before exam is started (may be 42Paris specific)

Copy link
Member

@FreekBes FreekBes left a comment

Choose a reason for hiding this comment

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

The _enableOrDisableSubmitButton is intended to enable the submit button for the form (so essentially the login button) already, there's no need to create an extra function for it. The reasoning behind this is to have all the logic that enables or disables the button in the same function for every possible login/lock screen.

Could you make it so that the _enableOrDisableSubmitButton checks the current time, and enables the button when it needs to be?

Side note: I did this once before, thought of it as a small change and didn't test it properly, and found out during an exam the function for some reason didn't work. So I strongly recommend to test it during a test exam before, even though the logic might appear solid.

@FreekBes FreekBes added the enhancement New feature or request label Mar 28, 2024
@FreekBes FreekBes changed the title Enabled the login button only when exam as started Enabled the login button only when exam has started Dec 17, 2024
@FreekBes FreekBes dismissed their stale review April 16, 2025 11:17

I've made the changes myself

@FreekBes FreekBes changed the title Enabled the login button only when exam has started Enable the login button only when exam has started Apr 16, 2025
@FreekBes FreekBes merged commit b48933e into codam-coding-college:main Apr 16, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants