This is a NodeJS tool using the Puppeteer headless browser to crawl the CodeHS code teaching platform for a teacher's students' grades.
Use the package manager npm to install CodeHS Crawler.
npm install codehs_grades
Note: Add the -g flag to use this tool anywhere; however, out files will have a different path from that of the working path.
Clone this repository.
git clone https://github.com/e-zhang09/CodeHS-HWCrawler.git
cd CodeHS-HWCrawler
npm link
Note: outputs will be in the 'out' sub-directory
codehs_grades
if students put in min time for credit before due date, then they will get on time credit (so they could get full credit if they work more)
if not everything was submitted on time and they didn't work at least min time for credit before due date, it is late, so they will get 70% of any score in the future
if all assignments were submitted on time OR time spent before due >= full credit time --> on time and max points else if time spent before due >= min time for any credit if all assignments are submitted OR total time spent is >= full credit time --> score is full credit and on time else --> score is totalTimeSpent / timeForMaxCredit * max and status is on time
// ALL THESE ARE LATE NOW else if all submitted OR total time spent is >= full credit time -> score is 70% of max and status is late else if total time spent is >= min time for any credit -> score is totalTimeSpent / timeForMaxCredit * max * 0.7 and status is late else -> score is 0 and status is missing
Below is the old grade system.
Award 10/10 pts for the assignment.
Award 10/10 pts for the assignment.
If none of the above, loop through each exercise of the assignment
(N is number of exercises in the assignment)
Award the exercise 1
pt .
Award the exercise M / (45 / N)
pt, where M is the minutes they worked on the exercise.
(Rounding to the 2nd decimal place)
Award the exercise 0
pt.
Note: 'Exercises' and 'assignments' are defined below.
Exercises are the problems each student have to solve as an assignment.
Using edit sessions
- A session ends when there was more than 30 minutes between versions or when the last version is reached.
- The duration of each session is the difference between the first and last version of the session.
Note: See TimeCalculations.md for example expected behaviors
Will have more options soon
If installed through npm install codehs_grades
In the node_modules/codehs_grades/
sub-folder of the install location
If installed through npm install codehs_grades -g
On unix systems: /usr/local/lib/node/codehs_grades/
or /usr/local/lib/node_modules/codehs_grades/
On windows: %USERPROFILE%\AppData\Roaming\npm\node_modules\codehs_grades\
If installed through git clone
In the out
sub-folder of the project installation location
Delete the ./cached directory as problem IDs may have changed
The assignment may have been removed and could not be found, no real solutions as of right now.
Could be ignored, may cause excessive memory usage?
This tool does not support linux systems yet (mac may not work either)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.