radgrad / radgrad2

Source code for RadGrad, Version 2
https://radgrad.org
9 stars 5 forks source link

Fix CompEng database snapshot #488

Closed philipmjohnson closed 3 years ago

philipmjohnson commented 3 years ago

Please do work for this task in a branch called issue-488.

The computer engineering fixture is needs to be improved in two ways:

1. Current ComputerEngineering.json does not load

If you run meteor npm run start-custom, where custom/settings.development.json contains the following line:

 "databaseRestoreFileName": "database/snapshot/ComputerEngineering.json",

Then you get the following error:

I20210423-13:56:51.420(-10)? Startup:
I20210423-13:56:51.420(-10)?   * Defining admin user if necessary.
I20210423-13:56:51.619(-10)? Defining ADMIN radgrad@hawaii.edu with password foo
I20210423-13:56:51.620(-10)?   * Loading database if necessary.
I20210423-13:56:51.641(-10)? Loading database from file database/snapshot/ComputerEngineering.json, dumped Invalid date.
I20210423-13:56:51.644(-10)? Error: The following collections are in database/snapshot/ComputerEngineering.json, but not in RadGrad.collectionLoadSequence: AcademicPlanCollection,AdvisorLogCollection,DesiredDegreeCollection,FavoriteCareerGoalCollection,FavoriteCourseCollection,FavoriteInterestCollection,FavoriteOpportunityCollection,FeedCollection,FeedbackInstanceCollection,HelpMessageCollection,MentorAnswerCollection,MentorProfileCollection,MentorQuestionCollection,PlanChoiceCollection
I20210423-13:56:51.645(-10)? Error: The following collections are in RadGrad.collectionLoadSequence, but missing from database/snapshot/ComputerEngineering.json: ProfileCareerGoalCollection,ProfileCourseCollection,ProfileInterestCollection,ProfileOpportunityCollection
I20210423-13:56:51.772(-10)? Finished loading database.

As you can see, there are some collections that need to be deleted, and some collections that need to be added.

Deleting the extra collections is easy, just find them and delete them.

To add new ones, take a look at the default settings fixture (database/snapshot/2021-03-18-08-47-34.json), and use those definitions.

2. Update default faculty, advisor, and student definitions

The ComputerEngineering fixture contains many users that are all associated with ICS. Fix this so that the default users are faculty, advisors, and students associated with Computer Engineering. To start, the only student should be Jatin.

jatinp101 commented 3 years ago

image