Updated! 20231009
How to get Easy JavaScript Simulation to be data analytics enabled.
- Download JavaScript_EJS_6.1 to a folder of your choice and unzip it BETA_201115 https://gitlab.com/ejsS/JavaScriptEditor/release/-/blob/master/JavaScript_EJS_6.1%20BETA_201115.zip
- Open EJSS authoring toolkit or called editor by opening JavaScript_EJS_6.1 BETA_201115 - EjsConsole.jar
- Find the simulation that you want to enable Moodle data analytics
- Add the QuestionLib in Custom tab https://github.com/lookang/codesforejss/blob/master/assessment/questionLib.js copy from // Assume ECMAScript 6; Chrome >=49, Edge >=14, Firefox >=41, Opera >=36, Safari >=8 and all the rest below this line, refer to this post for the full syntax on how to use the QuestionLib
- Read the existing EJSS source code and understand how it works first. Refer to https://iwant2study.org/ospsg/index.php/events/883-20190219-sls-hackathon-etd-cpdd if you need a 272 step by step tutorial on how to create a simple game in EJSS to understand how EJSS source code works.
- Option 1A: 202308-8 method is to add this code in the initialization
tab https://github.com/lookang/codesforejss/blob/master/window.setTimeout(_reset,100) - if (!clicked){ window.setTimeout(_reset,500); clicked=true;}
- the purpose is to force a _reset() 500ms later once using the variable clicked. In variable tab, create a variable called "clicked" with no initial values. This way, the Moodle will reset and display everything in place and also startQuestion(`Q${1}`)
- Option 1B: older alternative: where to add startQuestion, in this example I decided to add into the Play button
- To add the variable `isQuestionAnswered` with an initial value of `false` and a type of `boolean` to check if the communication between EJSS and Moodle has started, you can make the following changes as shown
- Option 2: for a more in-depth gamification student learning experience where first attempt is full marks say (2), and 1 mark for greater than 2 attempts, 0 for incorrect, a more sophisticated method is needed and you can use the code that look like this (copy and paste, the bullet pointed will not be copied over in EJSS authoring toolkit)
- if (once) {
- addQuestionHistory(`$ {
- questionNumber
- } = $ {
- question
- } `); //moodle part of the history
- once=false
- }
- onAnswer(coordinates,true)
- if (isFirstTry) {
- awardQuestionMarks(2);
- once=true // set back to true to prepare for next q
- }
- else {
- awardQuestionMarks(1);
- isFirstTry =true //reset
- once=true // set back to true to prepare for next q
- }
- Once is a variable to check if user enters this mode one time only. if `isFirstTry` is true `awardQuestionMarks (2)`, else `awardQuestionMarks (1)`
- The function of `awardQuestionMarks(1)` where the inside is the number of marks to be awarded. By looking at the existing code, I added this code into the Event for ODE Collision
- Next Prepare the assessment.json file by downloading and saving it inside the workspace with the source for this simulation. E.g. /Users/lookang/Public/workspace/source/zdtan/ejss_model_Collisions1D/. You may download the file here
- And save the file by [COMMAND][s] for Mac Users, or [CONTROL][s] for Windows users.
- Export the file as model and give the link to the file to Wee_Loo_Kang@moe.edu.sg or Lawrence_WEE@moe.gov.sg for him to upload. He will email you in 3 to 5 working days to inform you when your model is ready to be used.
Very useful information Thanks.
ReplyDeleteBuy USD BILL COUNTER machine online in Bangladesh, Buy euro value counter machine In Europe, Buy ECB Teste Euro Fake Note Money Detector in Europe, Buy Cheap Money Counting Machine from China Factory, Buy online vacuum note counting machine from China