#sp23
PrairieLearn is an online problem driven learning system for creating homeworks and tests capable of adding variations and randomness to questions. We created the assessment configuration interface where instructors could easily synchronize their questions repositories in github and drag-and-drop the selected questions to a new assessment. This application is still a work in progress but we have a working version available through the link below. PrairieLearn Assessment Configuration is a new project started in Spring 2021 by a group of 5 developers in UC Berkeley's CS 169L.
For assessment configuration interface, go to https://prairielearn-eecs.herokuapp.com
For more information regarding PrairieLearn, go to https://prairielearn.readthedocs.io/en/latest
.
+-- app
| +-- models <Container for ActiveRecord Table>
| +-- commit.rb
| +-- question.rb
| +-- user.rb
| +-- controllers <Actions and Functionality>
| +-- login_controller.rb
| +-- questions_controller.rb
| +-- repo_controller.rb
| +-- session_controller.rb
| +-- user_controller.rb
| +-- views <Front-End HTML>
| +-- content
| +-- new.html.erb
| +-- login <Login and Home/Root Page>
| +-- home.html.erb
| +-- login.html.erb
| +-- questions <Create Assessment Page>
| +-- index.html.erb
| +-- repo <Choosing Repo Page>
| +-- new.html.erb
+-- config
| +-- credentials.yml.enc <Encrypted GitHub OAuth Secret>
| +-- routes.rb <Ruby Routes for Controllers and Views>
+-- db
| +-- migrate <Migration for Database>
+-- features <Cucumber Tests>
+-- spec <RSpec Tests>
| +-- controllers
| +-- models
+-- Gemfile <List of Required Gem Versions>
+-- README.md
- Go to https://prairielearn-eecs.herokuapp.com
- Login to GitHub via 3rd party authentication
- Select a repository you would like to synchronize from the list (only private repositories will show up). Also, make sure there is a directory called 'questions' in your repo that contains all of the questions subdirectories. Then click 'Synchronize'; This might take a couple minutes so sit back and relax
- Configure your assessment via the column on the right with all its metadata
- The left column shows all of the questions in the user's repo.
- User can search for a question using the keywords they remember.
- Click +Zone to create a Zone of questions. Enter the zone title and zone comment at the top of the zone.
- Click +Pool to create a pool of questions inside the zone, user can add comments at the entry box to remind them about the function of the questions.
- Drag-and-drop questions from the left column to the middle column and set the points for each questions.
- Click 'Export' to download your JSON file
- Logout when you are done using the application
- GitHub OAuth login to access private questions repositories
- Fetching questions files (path) via GitHub API calls and store them in PostgreSQL database
- Repository caching to limit numbers of GitHub API calls
- Configure assessment metadata including name, type, total credits, and access
- Select a synchronized question repository and fetch questions from the database to populate our questions selection
- Drag-and-drop questions from a list to a 'selected questions' column
- Allowed a single question to be selected multiple time and allow reordering of the questions
- Exporting all configurations and selected questions to a properly formatted JSON file
- GitHub API calls are still not optimized (synchronizing repository could take a few minutes)
- Repository caching is not optimized (when a new commit id is found, we drop all entries of questions from that selected repository and pull the new ones)
- Move JavaScript out of .erb files
- Consider using AWS and modify API calls to use 'git pull' to create a traversable file directory instead of making API calls per folder
- Zones and pools are available for users to use.
- Can search for questinos using the search bar on the top left.
- The questions shown now are shown using descriptive titles.
git remote set-url heroku https://git.heroku.com/prairielearn-eecs.git
git add .
git commit -m '<Message>'
git push heroku master
- Go to https://dashboard.heroku.com/apps/prairielearn-eecs
- Click 'Heroku Postgres' and go to settings
- Click 'Reset Database...'
- Then run
heroku run rake db:migrate
The application is making a single API calls for every directory in a repository. The initial path of the API call is to a 'questions' directory of a repository as defined by PrairieLearn documentations. For every file or folder inside 'questions', if the entry is a folder/ directory, the application will make an API call to traverse down that directory until it reaches the end, marked by a .JSON file and the file path is stored in our database. This is inefficient since it is doing a Depth First Search but we are traversing all of the branches; concurrency is difficult to implement. For the future, this could be improved by making concurrent API calls or by using 'git pull' to build a file directory within the database. After some research, PostgreSQL does not allow this, so try looking into AWS. For more information, email the contributors.
- David Oh ([email protected])
- Faiz Shamji ([email protected])
- Haolin Zhu ([email protected])
- Sanwu Luo ([email protected])
- Timotius Vincent ([email protected])
- Yuhan Dong ([email protected])
- Guobin Liang ([email protected])
- Fernanda Pisconte ([email protected])
- Chithra Anand ([email protected])