An extension to Snap! which enables client-side autograding.
Clone with git clone --recursive to download the snap source as a submodule.
If you've already cloned without --recursive do:
git submodule initgit submodule update
Files List:
-
edx-problem-code.xml
- This is the code that belongs in edX for each autograded exercise.
- You will need to modify parameters in this file when pasting it into edX. (See the README comments at the top.)
-
AG_EDX.js
- TODO
-
AG_EDX_NoXML.js
- TODO
-
AGAgent.js
- TODO
-
AGFormatting.js
- TODO
-
feedbackLog.js
- TODO
-
scriptAnalysis.js
- TODO
-
spriteEventLog.js
- TODO
-
snap-edx-overrides.js
- These are the only customizations to the Snap! source
- (Not true right now, but eventually things will be refactored.)
-
Dependencies:
- jQuery
- duh!
- jschannel.js
- Used for communication with edX via iframes
- underscore-min.js
- used once in scriptAnalysis.js
- jQuery
This is the recommended approach:
- Start a local host server, such as:
cdinto this directory.python -m SimpleHttpServerorpython3 -m http.server- Navigate to http://localhost:8000/
- Use the file:
local-snap-ag.html - Set
#test_file=pathin the URL. - If you have a starter XML file, it must be in the same directory as
test_file- Example: In the above case you have
week1_gps.jsin themooc3/folder and a starter fileW1_L1_Starter_GPS_Scraping.xmlalso inmooc3/ - NOTE: When referring to the path to the starter file, don't write the directory in your test file.
- Example: In the above case you have
- Upload
snap/which is an exact copy of the Snap! repo, andlib/- Export a tar file from studio.edx, and uncompress it
- then add
snap/to thestatic/folder - add
lib/tostatic/ - Recompress the course folder and use edX's import tool.
- Upload all the files in
ag-filesto edX, but not in a subfolder. - Upload
edx-snap-ag.htmlbut not in a subfolder. - Upload a
*.jsfile for each problem