-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add course admin tool to manage OTP secrets. #2618
Conversation
14f1f8a
to
e78e80a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this looks good, and will be a useful tool for system administrators in some cases.
There is a situation that is perhaps not so good. Basically, when this new page loads it reads all users for all courses from the database and the user dropdowns then contain all of those users. If there are a large number of users and courses that is troubling. The database read is still rather quick, but the dropdown loading is not. I have a course with more than 20,000 users, and the page loads relatively quickly, but if I select that course, and open the users dropdown I see the CPU usage spike rather heavily as the browser loads the contents.
We could put some protection on that (or at least a warning), similar to the accounts page, only show some users (maybe just any user that isn't a student) and have a toggle they can hit so they include all users. In general having 20,000 students, this page would be a bit annoying to have to search for and find the few students you wanted to copy anyways. |
e78e80a
to
6f46f8b
Compare
I added a check to only include smaller courses (less than 200 users) by default, and a warning and a button to show all courses is shown if any courses are ignored/skipped. |
99a91b0
to
572a593
Compare
Adds a page in the admin course that can be used to copy OTP secrets from one user to another or to reset OTP secrets. This allows copying an OTP secret from a single user in one course to a different user in the same or different course. Copying multiple secrets from users in a single course to one or more other courses, provided the user names are the same. Or to reset one or more OTP secrets for users in a single course.
Large courses can cause a lot of CPU load when the javascript generates the menus to select users of the course. Also large courses will be hard to navigate with using the menus. By default courses with 200 or more users will not be listed in the drop down menus. If any course is not included, a warning will state which courses have been ignored and a button to show all courses will appear. The ignored courses are still listed in the list of destination courses when copying multiple secrets.
572a593
to
3d7ab27
Compare
Adds a page in the admin course that can be used to copy OTP secrets from one user to another or to reset OTP secrets. This allows copying an OTP secret from a single user in one course to a different user in the same or different course. Copying multiple secrets from users in a single course to one or more other courses, provided the user names are the same. Or to reset one or more OTP secrets for users in a single course.