Open frncesc opened 7 years ago
Hello,
The implementation is successful! I couldn't configure a working maxFailedActions directly through JClic Author. Instead, I utilized the maxActions value from JClic Author and repurposed it as a "max failed actions" value in the jclicplayer.js. The action counter now displays this maxActions value but decreases only when a failed action occurs. Once it reaches zero (indicating all attempts are used up), the activity terminates as failed. This adjustment does not affect the internal values and logic, so calculations for percentages and the total number of actions remain accurate. Modifications were made in jclicplayer.js and counter.js.
Additionally, it's important to use jclic.min.js in JClic Author before exporting to HTML. If you're working with Moodle, you'll need to upload the modified jclic.min.js to your server and specify its URL in the JClic extension settings. You'll also need to use a customized jclicplugin.js file, as the default one from https://clic.xtec.cat/dist/jclic/jclicplugin.js points to the standard jclic.min.js. Ensure to update the URL in your jclicplugin.js file and host it on your server as well.
You can find the complete project here: Google Drive Link. While you only need the files in JClic Proyecto\jclic.js-html5\jclic.js-master\dist, feel free to review the source code which includes the src for JClic, though no modifications have been made there.
Improvement suggested by Nicolás Cabello. JClic allows to set a maximum number of "tries" or "moves" per activity. When this number of attempts is achieved the activity is marked as "failed", without taking in account if they where good or bad moves. It will be great to have also the possibility to set a "maximum number of bad moves", acting like the "current lifes" in arcade games. Each bad move will substract a "life" from the counter.