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

Merged
merged 10 commits into from
Jan 27, 2025
Merged

Conversation

carlobortolan
Copy link
Member

@carlobortolan carlobortolan commented Dec 18, 2024

Motivation and Context

Closes #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 year equals 1234).
  • 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

@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

@carlobortolan carlobortolan marked this pull request as ready for review January 10, 2025 09:59
@carlobortolan carlobortolan requested a review from SebiWrn January 10, 2025 12:36
api/courses.go Show resolved Hide resolved
dao/streams.go Outdated Show resolved Hide resolved
web/admin.go Outdated Show resolved Hide resolved
web/admin.go Outdated Show resolved Hide resolved
@carlobortolan carlobortolan requested a review from SebiWrn January 12, 2025 00:13
Copy link
Collaborator

@SebiWrn SebiWrn left a comment

Choose a reason for hiding this comment

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

Looks good :)

@carlobortolan carlobortolan merged commit d888fcd into dev Jan 27, 2025
9 checks passed
@carlobortolan carlobortolan deleted the 1418-test-courses-for-lecturers branch January 27, 2025 13:54
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
2 participants