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

Test course feature for lecturers #1425

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

carlobortolan
Copy link
Member

@carlobortolan carlobortolan commented Dec 18, 2024

Motivation and Context

This is one possible approach to solve #1418.
While this approach is not optimal, as we need to "reserve" special values for test courses, it is relatively simple and builds on top of the existing code in comparison to more complex approaches (e.g., updating the current course model & table to include a isTestCourse attribute or adding a completely new test course model).

Description

  • Internally, test courses are handled just like regular courses but belong to a special "test-semester" (where the course's term equals Test).
  • Updated semester API endpoint and course DAO methods to include an optional includeTestSemester flag, which defaults to false. This allows the endpoint & method to return the same information as before (all normal courses), and only if the flag is set, also include the test courses.
  • Updated all current occurrences of the semester-fetching (e.g., on the start page, search page, and admin page) accordingly so that the test semesters and courses are not included there.

Steps for Testing

Prerequisites:

  • 1 Lecturer
  • 1 Student
  1. Log in as a lecturer
  2. Go to the admin panel and press on + Create Test Course to create a new test course
  3. The test course should now appear after reloading the page
  4. Log out and log in as another user
  5. Check that the previously created test course is not visible anywhere and that the semesters don't include the test semester

Screenshots

How to create a test course:
image

How an Admin sees all test courses:
image

Note

I haven't updated the tests yet (I'll do that once it's confirmed that this approach is ok)

@carlobortolan carlobortolan self-assigned this Dec 18, 2024
@carlobortolan carlobortolan linked an issue Dec 18, 2024 that may be closed by this pull request
Copy link

Your Testserver will be ready at https://1425.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

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.

Test courses for lecturers
1 participant