Skip to content

SEB (safe exam browser) Integration - #878

Open
advay-demo wants to merge 7 commits into
FOSSEE:masterfrom
advay-demo:seb-updates
Open

SEB (safe exam browser) Integration #878
advay-demo wants to merge 7 commits into
FOSSEE:masterfrom
advay-demo:seb-updates

Conversation

@advay-demo

Copy link
Copy Markdown
Contributor

This PR introduces support for Safe Exam Browser (SEB) to help us lock down the quiz environment and prevent cheating.

Here’s a quick rundown of what I've added:

  • Database updates: Added a few new fields to the Quiz model so instructors can configure SEB settings (like requiring fullscreen, enabling zoom, or checking the config key hash).
  • Dynamic Config Generation: Wrote a view that automatically generates and serves the .seb config file based on the quiz's settings so students can easily download it.
  • Validation: Updated the quiz launch process to ensure students are actually using the Safe Exam Browser and that their config key hash matches the one expected by the instructor.
  • Tests: I also went ahead and added a solid batch of tests for both the view logic and the file generation to make sure everything works smoothly.

Comment thread api/views.py Outdated
Comment thread api/views.py Outdated
Comment thread docker/Files/Docker-script.sh Outdated
Comment thread docker/Files/Start-codeserver.sh Outdated
Comment thread yaksh/migrations/0031_auto_20260630_0516.py Outdated
Comment thread yaksh/views.py Outdated
Comment thread yaksh/views.py Outdated

@prathamesh920 prathamesh920 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please resolve the comments.
run the modified code through PEP8 standards.
remove extra spaces.

advay-demo and others added 3 commits July 29, 2026 15:04
Put import on top of the file
Added plistlib and hashlib imports to views.py. Removed duplicate hashlib import within the function.
@prathamesh920

Copy link
Copy Markdown
Contributor

After selecting requires SEB and dynamically generating SEB file and saving the quiz, the interface shows no message or changes to the user. Like whether the file is generated or not, is the SEB mode is proper set.

@prathamesh920

Copy link
Copy Markdown
Contributor

Also, we should give proper instructions to the students.
They should know what steps they need to follow to take the test, including ending the test and exit SEB.

@prathamesh920

Copy link
Copy Markdown
Contributor

A small loophole:
Right now, our interface allows students to resume an ongoing test if they accidentally close the window,
provided they are still within the overall test time frame.

However, with SEB, a student can simply quit the SEB application mid-test without submitting,
look up answers outside the locked environment and then relaunch SEB to resume their attempt.

For now, I think you can configure an Exit Password for SEB.
Later, the team can come up with a proper policy for handling mid-exam disconnects and re-entry.

@prathamesh920 prathamesh920 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Kindly resolve the comments.


Also, I am slightly concerned with the validation process. We need to validate the actual SEB config/request header correctly. (for dynamic SEB configs too) Because I was able to take the test with different config files for the same test. Try compare_digest for hash comparisons.
Also, the seb file is a plain text, i am able to modify the configurations. We should encrypt it.

Also, currently validation happens only at the start of the quiz, but this should ideally happen for each and every request during the quiz.

Comment thread api/views.py Outdated
Comment thread api/views.py Outdated
Comment thread docker/Dockerfile_codeserver Outdated
Comment thread docker/Dockerfile_django Outdated
Comment thread yaksh/templates/yaksh/show_video.html Outdated
Comment thread yaksh/views.py Outdated
Comment thread yaksh/views.py Outdated
Comment thread yaksh/views.py
@prathamesh920

Copy link
Copy Markdown
Contributor

3000+ files changed!
Pls fix this.

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