Generate Demo Fixture
How to generate a demo fixture file
Download a current database dump from RadGrad
Login to RadGrad as administrator. Go to the Manage Database Page:

Click the Dump Database button. RadGrad will create a zip file containing all the collections and download it. Unzip the file and copy/move the JSON file to the scripts/radgrad-db/ directory. This directory is .gitignored so the student data will not be shared.
Edit the "create-demo-fixture": "npm run tsc && node js/fixture-generator/demo-fixture-generator.js radgrad-db/2021-05-18-10-14-34.json data/demo-fixture-generator-config.json" script in scripts/package.json to use the downloaded database.
Edit the demo-fixture-generator-config.json file (optional)
The demo-fixture-generator-config.json file defines five students:
abi@hawaii.eduAbi is a sophomore who has planned her Junior year.alfred@hawaii.eduAlfred is a senior with one academic term left.betty@hawaii.eduBetty is a junior with about a full year left.charley@hawaii.eduCharley is a blank student with no interests or career goals.dora@hawaii.eduDora is a Level 5 student.ella@hawaii.eduElla is an alumni.
You can edit the data/demo-fixture-generator-config.json file if you want to change the students or their plans.
The demo-fixture-generator-config.json file has two parts studentProfiles and studentPlans.
The
The StudentProfileCollection defines five student profiles. Setting up their interests, career goals, and their sharing preferences.
The studentPlans is an array of plans for each student. The plan has four components
usernamethe name of the student.coursesan array of course information.{ "slug": "ics_111", "academicYearOffset": -2, "termNum": 0, "grade": "A" },The
slugis the course slug. TheacademicYearOffsetis the number of years from the current year this course is in the plan. ThetermNumis the term in the year. For semester base systems 0 = 'Fall', 1 = 'Spring', 2 = 'Summer'. For quarter based systems 0 = 'Fall', 1 = 'Winter', 2 = 'Spring', 3 = 'Summer'. Thegradeis either the earned grade for courses in the past or the planned grade for future courses.opportunitiesan array of opportunity information.{ "slug": "acm-manoa", "academicYearOffset": -1, "termNum": 1, "verified": true },The
slugis the opportunity slug. TheacademicYearOffsetandtermNumare the same as courses.verifiedindicates if the opportunity was verified.reviewsan array of review information.{ "academicYearOffset": -1, "termNum": 1, "reviewee": "ics_111", "rating": 5, "comments": "Lecture can be boring. Tests can be tricky... so pay attention and read the questions and answers twice before answering them. Lab is were all the fun is. If you're not an ICS major or don't like programing, you probably shouldn't take the course." },The
academicYearOffsetandtermNumare the same as above. Therevieweeis the slug of the course or opportunity being reviewed. Theratingis the rating andcommentsare the student's comments about the course or opportunity.
Run the script
Cd into the scripts directory and run the script.
The new demo fixture is created in the scripts/data directory.