Skip to content

leozelion/save-answersheets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Save answersheets script

This NodeJS command-line application accompanies the Export attempts quiz report for Moodle. It helps provide the bulk download feature by taking a file of instructions from the report, and based on the steps in there downloading all the Review sheets as PDF files, and any attachments to responses, and then putting them all in a Zip file.

The PDF generation uses the Puppeteer API to control a headless Chromium. How to use this script is documented within the Export attempts report.

For developers

This is a node application, so you need to have npm installed. (I recommend doing that using nvm.)

Installing and running locally

Standard node thing:

npm install

then you can do

node . instruction-file.txt 

to run it.

To only download data for one user, you can do

node . --download-only X1234567 instruction-file.txt

Building an .exe

Remember to update the version number in showVersionAndExit before building.

We build the exe version using nexe, so you need to have that installed. Finding a version that works can be tricky, but node 14.15.3 currently does.

npm install -g nexe

Then to build:

nexe save-answersheets.js

then you will have a save-answersheets.exe In order to distribute that in a way that works, you need that file, and the whole node_modules\puppeteer folder. I suggest zipping those together.

About

A script that can be used with https://github.com/moodleou/moodle-quiz_answersheets to download quiz attempts in bulk as PDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%