Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled the login button only when exam as started #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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