JClic and JClic-repo
JClic is a free software project from the Catalan Educational Telematic Network (XTEC) for creating various types of interactive activities such as associations, puzzles, text activities, crosswords or puzzles, from elements of text, graphics and multimedia.
The program includes an authoring tool to create activities, a player and a reporting system that stores the results obtained by students. All these components, along with some guides and tutorials on how to create activities, are available in the clicZone.
Many teachers from different countries have used JClic to create interactive materials for a wide variety of levels, subjects, languages and curriculum areas. Some of these materials have been collected in a huge library created with jclic-repo, another open source project that will facilitate the publication of collections of JClic projects in static web hosting services.
JClic project files
Groups of single activities are often grouped in JClic projects and organized in one or more sequences (lists of activities that must be performed in a specific order). The resulting set of activities, sequences and media elements are packaged into JClic project files (files with extension ".jclic.zip").
JClic.js makes use of:
- jQuery to parse XML documents and manage DOM objects
- JSZip to extract contents from "jclic.zip" files
- clipboard.js to copy reports data into the user's clipboard
- i18next to deal with messages translated into different languages
- screenfull.js to allow activities play at full screen
- script.js to read JClic projects from local file systems as JSONP
- webfontloader to dynamically load web fonts as needed
The build brocess of JClic.js is based on:
- npm (the package manager of Node.js) to install,
update and track package dependencies.
- Browserify to allow the use of npm modules in browsers
- Grunt to automate debug and building tasks
- JSDoc to generate this documentation
- JSHint to detect possible errors and check code quality
How to set-up the development environtment
npm to the latest version open a terminal and launch:
sudo npm install -g npm
We use Grunt for automation of building tasks. This package must be globally installed:
sudo npm install -g grunt-cli
To install the remaining packages, just go to the project's root directory and write:
This will install jQuery, Browserify and other needed components into
To build jclic.js, just invoke:
This will generate the file
jclic.min.js on the
To test the module and see the demo on your browser, launch the test server:
You can also build this documentation running
JClic.js main classes
JClic.js is organized in three main groups of classes: Player, Document and Utilities. In addition to this, the main JClic class provides methods to read JClic project documents, build players, launch activities and communicate with external reporting systems.
JClicPlayer loads JClic project files, manages the user interaction and acts as a interface between the browser and JClic classes for multiple functions. The player has:
- Skin: manages the visual appareance. Can have up to three Counter objects.
- PlayerHistory: used to track the user's navigation between activities.
- Reporter: Used to collect and display scores, times and other data generated by users while playing activities.
JClicProject encapsulates all data needed to play JClic activities. Its main components are:
- A collection of Activity objects (see below)
- An ActivitySequence formed by ActivitySequenceElement objects.
- A MediaBag formed by MediaBagElement objects.
The Activity class has the following subclasses:
- TextActivityBase (see below)
All classes derived from TextActivityBase have:
- ActiveBox: an AbstractBox with active content (see below)
- BoxBag: a collection of AbstractBox objects.
- TextGrid: a grid of single letters.
- ActiveBoxContent: encapsulates the content of a single ActiveBox.
- BoxBase: contains style specs (color, gradient, border, font, size...) common to one or more ActiveBoxContent objects. Also used by TextActivityDocument to encapsulate text styles.
- ActiveBagContent: a collection of ActiveBoxContent objects.
- TextGridContent: encapsulates the content of a TextGrid object.
- Shaper: describes how to cut a panel in multiple cells.
- EventSounds: a collection of EventSoundsElement
- ActiveMediaBag: a collection of MediaContent
- ActiveMediaPlayer: performs playing of MediaContent
- AutoContentProvider: builds dynamic content for activities
- Arith: random generator of menthal arithmetics operations
Jump between sequence points:
- JumpInfo: stores information about what to do when an activity finishes or when the user clicks on a link or button.
Miscellaneous utility classes:
Sponsors that make possible JClic.js
JClic is an open-source project supported by XTEC, the Telematic Network of the Catalan Ministry of Education
We use Transifex as a platform for translations of JClic.js into many languages. Please read TRANSLATIONS.md if you want to contribute to the project creating a new translation or improving the existing ones.
Checking the operation of JClic.js on different browsers and platforms is possible thanks to BrowserStack