farkam135 / Myrmey-Assist

The all-in-one UCI SOC
https://myrmeyassist.com
MIT License
1 stars 1 forks source link

Prereqs Component #11

Closed farkam135 closed 7 years ago

farkam135 commented 7 years ago

Prereqs Component

Develop a component that shows the prereqs of a course and whether or not the student meets the prereq. There should also be an add button, since the UCI-API only pulls UCI courses, transfer students would have to manually add a lot of courses they meet the prereq for from a transfer course, so if they don't meet a requirement there should be a button that adds that course.

Props

studentCourses: An array of course names the student has already taken Example:

['COMPSCI 121', 'COMPSCI 161','ICS 139W']

prereqs: A prereqs array. This is a 2-D array, each index in the main array represents requirements, each requirement has to be fulfilled to take the class. Each requirement is another array, in order for the requirement to be fulfilled only one of those classes have to be taken. Example:

[
            [
                "I&C SCI 23",
                "CSE 23",
                "I&C SCI H23",
                "I&C SCI 46",
                "CSE 46"
            ],
            [
                "I&C SCI 6B"
            ],
            [
                "I&C SCI 6D"
            ],
            [
                "MATH 2B",
                "AP CALCULUS BC"
            ]
]

In this example there are 4 requirements. In the first requirement if the student took any of those 5 classes the requirement is met, the 2nd and 3rd requirement are only met if they took 6B and 6D, and the 4th requirement is met if they took MATH 2B or AP CALC BC. So one possible combination of meeting all the requirements would be ['CSE 23','I&C SCI 6B','I&C SCI 6D','MATH 2B'].

addStudentCourse: A function that takes in a course name (i.e 'CS 161') and adds it to the student's taken courses.

farkam135 commented 7 years ago

Resolved in #23