Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 13504 | czzmrn | 1 | type=imaudio |
| 13715 | obado | 2 | textarea="data instruction" |
| 3 | iEdit="instruction" |
||
| 4 | |||
| 13504 | czzmrn | 5 | :Scelta in un elenco di immagini |
| 6 | <p> |
||
| 7 | Per costruire un esercizio con questo modello è sufficiente inserire la lista delle immagini e |
||
| 8 | le rispettive caratterizzazioni. Queste caratterizzazioni possono essere inserite nelle istruzioni |
||
| 9 | nella forma <span class="tt wims_code_variable">\name</span> |
||
| 10 | Se si desidera che una immagine appaia come elemento perturbatore senza definizione, |
||
| 11 | non inserire alcuna caratterizzazione. Più immagini possono avere la stessa caratterizzazione. |
||
| 12 | </p> |
||
| 13 | <p class="wims_credits"> |
||
| 15179 | lemaire | 14 | Autore del modello: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a> |
| 13504 | czzmrn | 15 | </p> |
| 16 | |||
| 17 | :%%%%%%%%%%%%%%%%% ATTENZIONE %%%%%%%%%%%%%%%%%%%% |
||
| 18 | |||
| 19 | Se si rimuovono le indicazioni del modulo modelli (le righe che |
||
| 20 | cominciano con ':') è necessario rimuovere tutta questa parte |
||
| 21 | introduttiva del file. Altrimenti Createxo potrebbe non accettare il |
||
| 22 | codice dell'esercizio. |
||
| 23 | |||
| 24 | :%%%%%%%% Parametri che possono essere ridefiniti %%%%%%%%%%%%%%%%% |
||
| 25 | |||
| 26 | :\title{Cliccare sulle forme corrette} |
||
| 27 | :\author{Bernadette, Perrin-Riou} |
||
| 28 | :\email{bpr@math.u-psud.fr} |
||
| 29 | :\credits{} |
||
| 30 | |||
| 31 | :Dati |
||
| 32 | Le immagini posso essere inserite nel modulo (in questo caso mettere |
||
| 33 | semplicemente il nome dell'immagine, non dimenticarti di caricare i file |
||
| 34 | nel modulo), |
||
| 35 | oppure possono essere contenute in un file di dati |
||
| 36 | (come nell'esempio). |
||
| 37 | \text{data=modules/data/images/imgschool.fr/images/abeille.png,l'abeille |
||
| 38 | modules/data/images/imgschool.fr/images/ange.png,l'ange |
||
| 39 | modules/data/images/imgschool.fr/images/araignee.png,l'araignée |
||
| 40 | modules/data/images/imgschool.fr/images/aubergine.png,l'aubergine |
||
| 41 | modules/data/images/imgschool.fr/images/ananas.png,l'ananas |
||
| 42 | } |
||
| 43 | |||
| 44 | :Numero di immagini presentate. |
||
| 45 | |||
| 46 | \integer{cnt=4} |
||
| 47 | |||
| 48 | :Dimensione verticale delle immagini in pixel |
||
| 49 | |||
| 50 | \text{sizev=100} |
||
| 51 | |||
| 52 | :%%%%%%%%%%%%%% |
||
| 53 | non inserire ; in sizev |
||
| 54 | \if{\sizev notsametext }{ |
||
| 55 | \text{sizev= style="height:wims(nospace \sizev px)"} |
||
| 56 | } |
||
| 57 | \text{data=wims(embraced randitem \data)} |
||
| 58 | \text{tot=rows(\data)} |
||
| 59 | \text{name=} |
||
| 60 | \while{\name issametext }{ |
||
| 61 | \text{mot = randrow(\data)} |
||
| 62 | \text{name=\mot[2]} |
||
| 63 | } |
||
| 64 | \text{image=\mot[1]} |
||
| 65 | \text{ext=item(2,wims(replace internal . by , in wims(lowercase \image)))} |
||
| 66 | |||
| 67 | :Consegna |
||
| 68 | Qui \name rappresenta il secondo elemento dell'immagine da individuare. |
||
| 69 | \text{instruction=Cliccare su \name.} |
||
| 70 | |||
| 71 | :%%%%%%%%%%%%%% |
||
| 13715 | obado | 72 | \css{<style> |
| 13504 | czzmrn | 73 | table.ans_multipleclick1 {margin-left:auto;margin-right:auto} |
| 74 | </style> |
||
| 75 | } |
||
| 76 | \text{liste=column(1,\data)} |
||
| 77 | \text{listename=column(2,\data)} |
||
| 78 | \text{rep=position(\name,\listename)} |
||
| 79 | \text{perturb=wims(makelist x for x=1 to \tot)} |
||
| 80 | \text{perturb=shuffle(\perturb)} |
||
| 81 | \text{perturb=\perturb[1..\cnt]} |
||
| 82 | \text{inter=wims(listintersection \rep and \perturb)} |
||
| 83 | \if{\inter=}{ |
||
| 84 | \integer{repcnt=items(\rep)} |
||
| 85 | \text{rep= \repcnt >1 ? randitem(\rep)} |
||
| 86 | \text{perturb=\rep,\perturb[1..\cnt-1]} |
||
| 87 | \text{perturb=shuffle(\perturb)} |
||
| 88 | } |
||
| 89 | \matrix{data=\data} |
||
| 90 | \text{liste=\data[\perturb;1]} |
||
| 91 | \text{listename=\data[\perturb;2]} |
||
| 92 | \text{cnt=items(\liste)} |
||
| 93 | \text{Image=} |
||
| 94 | \for{j=1 to \cnt}{ |
||
| 95 | \text{Image=/ isin \liste[\j] ? wims(append item \liste[\j] to \Image): |
||
| 96 | wims(append item \imagedir/\liste[\j] to \Image)} |
||
| 97 | } |
||
| 98 | \text{liste=wims(makelist imgrename(x \sizev) for x in \Image)} |
||
| 99 | \text{rep=position(\name,\listename)} |
||
| 100 | |||
| 101 | \statement{ |
||
| 102 | <div class="instruction">\instruction</div> |
||
| 17175 | bpr | 103 | <br class="spacer"> |
| 13504 | czzmrn | 104 | \embed{r1} |
| 105 | } |
||
| 106 | |||
| 107 | \answer{}{\rep;\liste}{type=multipleclick}{option=shuffle} |