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

Feature 7 course enrolment debugging #83

Merged
merged 7 commits into from
Dec 8, 2022
Merged

Conversation

jltng
Copy link
Contributor

@jltng jltng commented Dec 6, 2022

As of December 7th, 2022:
MAJOR CHANGES TO COURSE ENROLMENT USE CASE

  • created 3 gateways, respectively implemented by FileCourse, FileUser, and FileTaskMap (added necessary methods in FileUser and FileTaskMap @CC-3636 @yyutiw
  • this being said, changed gateway names @TiareMar changed name in your use case + tests to code would run. But I don't think you can directly call my gateway in your use case (you would need your own use case gateway to implement FileCourse)
  • removed all occurrences of casting
  • enrolment screen should work (by work i mean the success view pop up lol) !!!
  • @celinelumqr I commented out one of your assertion tests because it failed for me:

Screen Shot 2022-12-07 at 6 34 46 PM

  • finish enrolment interactor test
  • do some more testing
  • report my use cases

As of December 5th, 2022
Changes in CourseEnrolmentInteractor:

  • Need to pull main branch (gave me a scary error about a .git/ file that was changed????
  • As the instructor enters "task1,task2,task3" but we want ["task1", "task2", "task3"] added a method in my CourseCreationRequest model that splits the input string by comma and appends it to an ArrayList. Courses.getTasks() should produce ["task1", "task2", "task3"].
  • Small bug: student's ID is never added to the 'students' parameter of the Course (the second check for course enrolment would always pass because there are no students in the Course)
  • Bug: EnrolmentInteractor throwing a NPE: parameters in response model are set to null (not initialized properly)
    Screen Shot 2022-12-06 at 11 02 00 PM
  • Need to change the way the tasks datafile is accessed --> FileTaskMap needs to implement my use case gateway
  • Have a few tests here because I need my new edits for them to work. Will use testing branch when this gets merged.

…nging the key so that it no longer requires casting (uses parallel arraylists), added helper method in TaskMap that allows me to add a Map to TaskMap
@jltng jltng linked an issue Dec 6, 2022 that may be closed by this pull request
4 tasks
@jltng jltng self-assigned this Dec 6, 2022
@jltng jltng requested a review from TiareMar December 6, 2022 20:25
@jltng jltng added the (de)bug (Fixing) something that isn't working label Dec 6, 2022
@@ -84,39 +85,44 @@ public CourseEnrolmentResponseModel enrol(CourseEnrolmentRequestModel requestMod
courseTaskId.add(taskTitleToId);
Copy link
Contributor

Choose a reason for hiding this comment

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

above on line 46/47, I think it should be if (!courseEnrolmentDsGateway.existsByCourseID(requestModel.getCourseID())) { (i.e. if course does NOT exist)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed! Thanks for catching it

@TiareMar
Copy link
Contributor

TiareMar commented Dec 6, 2022

Also, while you're making changes, I think the screen issue for the courses tab in the main screens are just that in the ActionListeners of StudentMain and InstructorMain need to be showing the screen name that you initialize in Main. (i.e. 'courseEnrol' instead of just 'course')

jltng added 6 commits December 6, 2022 23:08
…in course creation use case (splitting one string of tasks into multiple task strings in arraylist in requestmodel, made pop-up text nicer in screen, modified Course entity getTasks method to match use case changes, one small bug found,
… work rip), still need to test for persistence as well as the enrolment tests too
…ill delete later after i make sure this actually works)
Copy link
Contributor

@alyson647 alyson647 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 to me!

Copy link
Contributor

@TiareMar TiareMar left a comment

Choose a reason for hiding this comment

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

Looking good!

Copy link
Contributor

@CC-3636 CC-3636 left a comment

Choose a reason for hiding this comment

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

looks swaggy to me

@jltng jltng merged commit 404b8ee into main Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(de)bug (Fixing) something that isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature 7 - Course Enrolment and Course Creation
4 participants