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

Import courses #1252

Merged
merged 29 commits into from
Jul 31, 2024
Merged

Import courses #1252

merged 29 commits into from
Jul 31, 2024

Conversation

AravDe
Copy link
Contributor

@AravDe AravDe commented Jun 28, 2024

We changed the functionality of importing courses. When a course is imported, it checks if it already exists in the courses table. If it does exist then it copies the all information other that status(originally it was just directly set to 4, so we did not change it) and term (because term might be different). It does not check if the course exists in the same term anymore. On discussion with Karina, she pointed out that we should not completely rule out on the basis on term as there might be multiple sections of a class with the same course name and term. Maybe we can add another enhancement where it checks for the section but I don't think we are able to import sections through the spreadsheet. Have not tried to import it yet.

Issue : #1180

New Updates
On discussion with Brian, we decided that we are going to ignore the case of sections for now and not add any courses that have the same course abbreviation or term. We checked for three conditions. If the Course Abbreviation and Term is the same, we add the course participants. If the Course Abbreviation is the same and the term is different there are two sub-conditions. If the term is older than that of the most recent Course Abbreviation match, a new course is added without copying any information. If the term is newer than that of the most recent Course Abbreviation match, a new course is added but with information copied from the match. If none of the Course Abbreviation or term match, we enter a new course into the table.

dea and others added 18 commits June 26, 2024 13:45
…s, IF the course already the course already
…rsame course and term and puts pparticipants into existing courses.
…rsame course and term and puts pparticipants into existing courses and comments deleted
@CollegeStevenLN
Copy link
Contributor

Reviewing this PR with Seedy

@seedyjahateh
Copy link
Contributor

Made code review and used unintended inputs yet it still works just fine. I recommend commenting/documenting code though.

Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

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

Let's copy the course proposal questions and instructors to the new course as well, like we do for renewing a course

app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

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

so close!

app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
app/logic/serviceLearningCourses.py Outdated Show resolved Hide resolved
Copy link

View Code Coverage

@BrianRamsay BrianRamsay merged commit 17ec8f1 into development Jul 31, 2024
5 checks passed
@BrianRamsay BrianRamsay deleted the import_courses branch July 31, 2024 15:32
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.

None yet

5 participants