Subversion Repositories wimsdev

Rev

Rev 17410 | Rev 17423 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5648 obado 1
<!-- adm/class/exam student.phtml START -->
2
 
10116 bpr 3
!! <!--There is no help for student yet. this will hide the "help button"-->
10879 bpr 4
!!FIXME this should be used in oef modules where the help is sometimes inside the
5
!! statement or after.
5648 obado 6
!set module_has_help = no
7
 
4039 bpr 8
!read adm/class/classname.phtml $wims_classname\
4021 bpr 9
$wims_institutionname
23 reyssat 10
 
1419 bpr 11
!read adm/title.phtml 1\
4021 bpr 12
$classname\
1419 bpr 13
$title
14
 
23 reyssat 15
!if $wims_user=supervisor
11460 bpr 16
  <div class="wimscenter">($name_presentation)</div>
17216 guerimand 17
!else
18
  !! -------- testing if another exam is begin
19
  !let other=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
20
!! 1 : IP 2 : session 3 : time 4 : exam
21
  !distribute word $other into IP,ses,time,other
22
!!  !let other=!word 4 of $other
23
  !if $other!=$empty and $other!=$exam
24
    !let error=other_exam $other
25
  !else
26
    !reset other
27
  !endif
23 reyssat 28
!endif
29
 
17216 guerimand 30
!if $desc!=$empty and $other=$empty
11460 bpr 31
  <h2>$name_instructions:</h2>
32
  <div class="exam_instructions" id="exam_desc">$desc</div>
4805 obado 33
!endif
34
 
23 reyssat 35
!if $error!=$empty
11460 bpr 36
  <div class="wims_msg alert">
37
  !read lang/msg.phtml.$moduclass_lang
38
  </div>
39
  !href module=home $wims_name_back2
17216 guerimand 40
  !tail
11460 bpr 41
  !exit
23 reyssat 42
!endif
43
 
44
!if $registered<0 or ($registered>0 and $timeleft<=0)
11460 bpr 45
  !changeto score.phtml
23 reyssat 46
!endif
47
 
17382 guerimand 48
!if $exam_mode>0
49
  <div class="wims_msg info">
50
    !line $exam_mode of $name_modedesc
51
  </div>
52
  !distribute item 0,0,0 into cntexo,flag_course,coursefalse
17410 guerimand 53
  <h2>$name_progress</h2>
54
  !readproc examprogressbar.proc $progressbar
55
  $wims_progressbar
17382 guerimand 56
!endif
57
 
23 reyssat 58
!if $exocnt=0
11460 bpr 59
  $name_empty
23 reyssat 60
!else
11460 bpr 61
  <h2>$name_content</h2>
62
  !set activeexo=0
16378 guerimand 63
  !if $start_ip!=$empty and $start_ip!=$httpd_REMOTE_ADDR
64
    <div class="wims_msg info">$name_warning_notstartip</div>
65
  !endif
11460 bpr 66
  <ol class="wims_exam">
16878 guerimand 67
  !for i in $(wims_exrandomlist[1;])
17382 guerimand 68
    !increase cntexo
11460 bpr 69
    <li class="exo_item">
4805 obado 70
!! -------------------------- debut de la ligne correspondant a un exercice de l'examen
4956 obado 71
 
11460 bpr 72
    !set ex=!record $i of wimshome/log/classes/$wims_class/exams/.exam$exam
73
    !distribute lines $ex into we,li,ti,de,op
74
    !set de=!trim $de
75
    !if $t_=yes and ($allowtype=simulation or $tryremain>0 or \
15494 bpr 76
      ($tryremain=0 and $registered!=$empty))
17382 guerimand 77
      !if $exam_mode>0 and $(got$i)!=$empty
78
        !let flag_course=$[$flag_course+$(got$i)]
79
      !endif
80
      !if $(replied$i)>0 or ($flag_course<10*($cntexo-1) and $exam_mode>0)
81
        <span class="exo_name">$ti </span>
82
        !if $(replied$i)>0
83
          !if $exam_mode=0 or $(got$i)=10
84
            - <span class="exo_done">$name_done</span>
85
          !else
86
            - <span>&#x274c;</span>
87
            !set coursefalse=$cntexo
88
          !endif
89
        !endif
11460 bpr 90
        &nbsp;<span class="weight">($name_weight: $we)</span>
91
      !else
92
        !if $de!=$empty
93
          !set dt=!examdep $exam $de
94
        !else
95
          !set dt=yes
96
        !endif
97
        !if $dt=yes
98
          !advance activeexo
15494 bpr 99
          <span class="exo_link">
11460 bpr 100
          !href target=wims_exam cmd=new&worksheet=$exam.$i $ti
15494 bpr 101
          </span>&nbsp;
102
          <span class="weight">($name_weight: $we)</span>
11460 bpr 103
          !if autogen iswordof $op and $wims_exam_remain!=$empty
104
            !set ss=$(wims_session)t$(exam)t$i
105
            !set test=!defof w_cmd in wimshome/sessions/$ss/var
106
            !if $test=$empty
107
              !set test=$wims_ref_name?wims_window=new&+session=$(wims_session)_exam&+cmd=new&+worksheet=$exam.$i
17230 bpr 108
              <img src="$test" style="height:1px; width:1px">
11460 bpr 109
            !endif
110
          !endif
111
        !else
15494 bpr 112
          <span class="wims_emph">$ti</span>
113
          <span>
114
          !href cmd=reply&job=student $name_depend
11460 bpr 115
.
15494 bpr 116
          </span>
11460 bpr 117
        !endif
23 reyssat 118
      !endif
119
    !else
11460 bpr 120
      <span>$ti.</span>&nbsp;<span class="weight">($name_weight: $we)</span>
23 reyssat 121
    !endif
4956 obado 122
!! -------fin d'affichage de la ligne correspondant a un exercice
11460 bpr 123
     </li>
4956 obado 124
  !next i
11460 bpr 125
  </ol>
17230 bpr 126
  <br class="spacer clearall">
15494 bpr 127
  !! variables
128
  !! $stries: number of tries
129
  !! $tryremain: number of remaining tries
130
  !! registered: if non empty, the exam session has begun
131
  !! exhausted: if yes, no more available sessions
4805 obado 132
 
17382 guerimand 133
  !if $exam_mode>0 and $coursefalse!=0
134
    <div class="wims_msg alert">
135
      $name_courseend
136
    </div>
137
  !endif
138
 
15494 bpr 139
  !! closed exam
11460 bpr 140
  !if $t_=no
141
    <p class="examclosed">$name_examclosed</p>
142
    !set wims_menu_items=!append line refresh,1,cmd=reply&job=student to $wims_menu_items
23 reyssat 143
  !else
15494 bpr 144
    !if $tryremain < $stries
145
      <p class="exam_score"><strong>$name_bestscore</strong></p>
146
    !endif
147
    <div class="exam_instructions wims_msg info" id="exam_status">
148
    !! open exam or in simulation
11460 bpr 149
    <p class="tries">
150
    !if $stries=1
151
      $name_exam1
152
    !else
11461 bpr 153
      $name_exam2 $name_bestscore2
11460 bpr 154
    !endif
11718 bpr 155
    </p>
11460 bpr 156
    !if $tryremain<0 or ($tryremain=0 and ($registered=$empty or $allowtype=simulation))
15494 bpr 157
      <p>
11460 bpr 158
      !if $trcut=0
159
        $name_exam3
160
      !else
161
        $name_exam4
162
      !endif
11718 bpr 163
      $name_exam6bis
11461 bpr 164
      !if $stry>1
165
        $name_exam5
166
      !endif
11460 bpr 167
      !set exhausted=yes
15494 bpr 168
      </p>
11460 bpr 169
    !endif
170
    !if $wims_exam_remain!=$empty
17412 guerimand 171
!!      !set wims_hr_r=$[max(0,$wims_exam_remain)]
172
!!      !set wims_hr_rm=$[floor($wims_hr_r/60)]
173
!!      !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
174
      <p> $wims_name_examremain <span id="exam_clock">
175
!!$wims_hr_rm:$wims_hr_rs.
176
      </span></p>
177
!!record 0 of wimshome/public_html/scripts/js/chronoid.js
178
!!      <script>clockid($wims_exam_remain,"exam_clock");</script>
11722 bpr 179
      !if yes iswordof $warning
11953 bpr 180
        <div class="wims_msg warning">
11718 bpr 181
        $name_exam11
11953 bpr 182
        </div>
11718 bpr 183
      !endif
11460 bpr 184
    !endif
11718 bpr 185
    !if $registered=$empty and $exhausted!=yes
11953 bpr 186
      <div>
11718 bpr 187
      !if $stries>1
15494 bpr 188
        $name_exam9.
11718 bpr 189
      !else
15494 bpr 190
        $name_exam9bis.
11718 bpr 191
      !endif
11722 bpr 192
      !if yes iswordof $warning
15494 bpr 193
        <div class="wims_msg warning">
11718 bpr 194
        $name_exam11
15494 bpr 195
        </div>
11718 bpr 196
      !endif
11953 bpr 197
      </div>
11718 bpr 198
      $name_exam10
8296 obado 199
 
11461 bpr 200
      !if $allowtype!=simulation and $stries>1
11460 bpr 201
        $name_exam7
11461 bpr 202
      !else only one session or simulation
11460 bpr 203
        $name_exam8
204
      !endif
205
      </p>
206
    !else
11461 bpr 207
      !if $allowtype!=simulation and $tryremain=0 and $exhausted!=yes and $tries>1
11460 bpr 208
        <p class="lasttry">$name_lasttry</p>
209
      !endif
210
    !endif
11718 bpr 211
    !if $tryremain>0 and $stries>1
212
      <p class="tryremain">$name_exam6</p>
213
    !endif
11953 bpr 214
    </div>
11460 bpr 215
    !if $exhausted!=yes
216
      !set wims_menu_items=!append line refresh,1,cmd=reply&job=student   \
1419 bpr 217
scoreexam,1,cmd=reply&job=score \
218
to $wims_menu_items
16368 guerimand 219
      !if $wims_exam_remain!=$empty
11460 bpr 220
        !set wims_menu_items=!append line endexam,1,cmd=reply&job=scorereg\
1419 bpr 221
to $wims_menu_items
11460 bpr 222
      !endif
223
    !endif exhausted!=yes
224
  !endif t_=no
11953 bpr 225
 
11460 bpr 226
!endif exocnt=0
23 reyssat 227
 
228
!if $t_=yes
11460 bpr 229
  !if $allowtype=simulation
230
    <p class="wims_msg info simulation">$name_simulation</p>
231
  !endif
23 reyssat 232
!endif
233
 
234
!if $wims_user=supervisor
11460 bpr 235
  !set wims_menu_items=!append line itemsep,0,\
10116 bpr 236
backteacher,1,cmd=resume\
11460 bpr 237
to $wims_menu_items
23 reyssat 238
!endif
239
 
5648 obado 240
<!-- adm/class/exam/student.phtml END -->
23 reyssat 241
!tail
242
 
243
!reset job