In this version, the informations about a student can be supplied to the class.
In this case, the student haven't to write his informations (names and mail address).
These informations can be the result of an SQL request and supplied to the class in an array.
Array template : array(idstudent, last name, first name, gender, email address);
// ... here : maybe an SQL request to get data. Then
$idQCM = 12;
$student = array(146, "DOE", "John", "M.", "email@example.com");
$test = new qcm($idQCM, $student);
In this case, instead of : askfor=name,mail (to ask these informations to the student)
you have to write : askfor=supplied (to say that data are supplied in an array)
A new header:
1 means an alert box will be displayed to inform that a mail will be sent (the result)
0 means no alert box
INFORMATIONS ABOUT THE QCM CLASS version 2.17 (29-jun-2010)
There is no real change in the habitual use of the QCM class with this version 2.17.
The only important change is that it's now possible to use multimedia documents.
Up until now, questions or proposals was made with text. With the version 2.17 it's
possible to use easily texts and/or audio or video documents in the question or
in its proposals, except in combo lists.
An item consists in several lines :
- properties (type of question, good answer, points, etc...),
- the question itself and
- proposals in different ways.
The first line of an item is the properties line it and contains five fields
semicolon separated (without space) :
type-of-question ; categorie-of-question ; good-answer(s) ; points ; mm
"mm" means : this item contains multimedia document(s).
If the item is a traditional item (only texts), this field is empty.
A multimedia document is written in tags <# ..... #> anywhere in the text of the question
or of the proposals (except in combo lists)
The opentags are always followed by reserved keywords to indicate what to display !
<#yt ........ #> to display a YouTube video
<#dm ........ #> to display a DailyMotion video
Into the tags, you have to write the ID (WITHOUT SPACE) of the video. Examples:
URL = http://www.youtube.com/watch?v=faKFcfytlxU
Tag = <#yt faKFcfytlxU #>
URL = http://www.dailymotion.com/video/x842fn_marius-la-partie-de-cartes_shortfilms
Tag = <#dm x842fn_marius-la-partie-de-cartes_shortfilms #>
There are two players very light, useful and free softwares to play video and audio files.
- dewplayer.swf to play mp3 files (4271 bytes)
- dewtube.swf to display your own videos (in FLV format) (3511 bytes)
You don't need them if you are ONLY playing YouTube or Dailymotion videos
You can download them at :
or from my website:
NB: To converts multimedia files (wav -> mp3, avi -> flv, etc...) You can use
- SUPER which can be freely downloaded from http://www.erightsoft.com/SUPER.html
- Format Factory can be freely downloaded from http://www.pcfreetime.com/ ***
With these players, tags are :
<#mp3 ........ #> to display an mp3 file
<#flv ........ #> to display a FLV file (video)
Upload into the QCM directory the required players (dewplayer.swf and/or dewtube.swf) if
necessary. You have just to write into the tags the filename or the URL (WITHOUT SPACES)
of the files to play. Examples:
<#mp3 forelise.mp3 #> forelise.mp3 must be in the QCM directory
<#mp3 http://my.website.com/mp3/file-to-play.mp3 #> mp3 file at this URL
<#flv myvideo.flv #> myvideo.flv must be in the QCM directory
<#flv http://my.website.com/flv/file-to-play.flv #> flv file at this URL
Default parameters are written in the QCM Class. You can modify them by these additionnal
headers in the QCM file :
The first number is for width and the second for height. For dewplayer, color is optionnal.
The above values are the default values or values used if you don't write these headers.
Playing videos with dewtube, you can choose a picture before running.
The dimensions of your video is 384 x 288 (default values. header not changed)
Suppose you have to display a video of the group Texas : "I don't want a lover"
Your video filename is "idontwantalover.flv"
If you have in your QCM directory a file named "idontwantalover.jpg" (384x288 pixels),
this picture will be displayed instead of the video and will disappear when it starts.
# MP3 file (in the QCM directory)
# QCM with unique response (type 0), no category, 2 points, multimedia
; audiofile1.mp3 = name (author)
; audiofile2.mp3 = name (author)
; audiofile3.mp3 = Variations K265 (Mozart) [good answer]
; audiofile4.mp3 = name (author)
Check among the following musics the one composed by Wolfgang Amadeus Mozart
<# mp3 audiofile1.mp3 #>
<# mp3 audiofile2.mp3 #>
<# mp3 audiofile3.mp3 #>
<# mp3 audiofile4.mp3 #>
# Dailymotion video
# QCM with multiple responses (type 1), no category, 3 points, multimedia
; 1. Auguste Mouries : Escartefigue
; 2. Raimu : CÚsar
; 4. Fernand Charpin : Panisse
; 6. Robert Vatier : M. Brun
; others actors aren't in this video
Check the names of the actors who are playing in this film clip<br/><#dm x842fn_marius-la-partie-de-cartes_shortfilms #>
# MP3 file (in the QCM directory)
# Associations (type 3), no category, 3 points, multimedia
; 1. audiofile1 : Canon in D ---> Johann Pachelbel (3)
; 2. audiofile2 : Symphony #40 -> WA Mozart (2)
; 3. audiofile3 : Tambourin ----> Jean-Philippe Rameau (4)
Do the associations between the following musics and their respectives authors
<#mp3 audiofile1.mp3 #>,<#mp3 audiofile2.mp3 #>,<#mp3 audiofile3.mp3 #>
Ludvig van Beethoven,Wolfgang Amadeus Mozart,Johann Pachelbel, Jean-Philippe Rameau
You can see a demo on my website :
==> test this class (demo) / Demo 7
Thank you to report bugs if any at :