Subversion Repositories wimsdev

Rev

Rev 17542 | 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
 
17468 guerimand 44
!if $registered<0 or ($registered>0 and $wims_exam_remain<=0)
11460 bpr 45
  !changeto score.phtml
23 reyssat 46
!endif
47
 
17382 guerimand 48
!if $exam_mode>0
17542 bpr 49
  !!<div class="wims_msg info">
50
  !!  !line $exam_mode of $name_modedesc
51
  !!</div>
17382 guerimand 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
17423 guerimand 56
  !bound directexo between 1 and $exocnt default $empty
57
  !if $directexo!=$empty
58
    <script>
59
      window.open("$wims_ref_name?wims_window=new&session=$(wims_session)_exam&+cmd=new&worksheet=$exam.$directexo",'wims_exam','status=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes');
60
    </script>
61
    !reset directexo
62
  !endif
17382 guerimand 63
!endif
64
 
23 reyssat 65
!if $exocnt=0
11460 bpr 66
  $name_empty
23 reyssat 67
!else
11460 bpr 68
  <h2>$name_content</h2>
69
  !set activeexo=0
16378 guerimand 70
  !if $start_ip!=$empty and $start_ip!=$httpd_REMOTE_ADDR
71
    <div class="wims_msg info">$name_warning_notstartip</div>
72
  !endif
11460 bpr 73
  <ol class="wims_exam">
16878 guerimand 74
  !for i in $(wims_exrandomlist[1;])
17382 guerimand 75
    !increase cntexo
17542 bpr 76
!! ---- debut de la ligne correspondant a un exercice de l'examen
11460 bpr 77
    !set ex=!record $i of wimshome/log/classes/$wims_class/exams/.exam$exam
78
    !distribute lines $ex into we,li,ti,de,op
79
    !set de=!trim $de
80
    !if $t_=yes and ($allowtype=simulation or $tryremain>0 or \
15494 bpr 81
      ($tryremain=0 and $registered!=$empty))
17542 bpr 82
      !!!if $exam_mode>0 and $(got$i)!=$empty
83
      !!  !let flag_course=$[$flag_course+$(got$i)]
84
      !!!endif
85
      !if $(replied$i)>0
86
        <li class="exo_item">
87
        <span class="exo_name">$ti</span>
88
        !if $exam_mode=0 or $(got$i)=10
89
          - <span class="exo_done">$name_done</span>
90
        !else
91
          - <span>&#x274c;</span>
92
          !set coursefalse=$cntexo
17382 guerimand 93
        !endif
11460 bpr 94
        &nbsp;<span class="weight">($name_weight: $we)</span>
17542 bpr 95
        </li>
96
      !else $(replied$i)=0
11460 bpr 97
        !if $de!=$empty
98
          !set dt=!examdep $exam $de
99
        !else
100
          !set dt=yes
101
        !endif
102
        !if $dt=yes
103
          !advance activeexo
17542 bpr 104
          <li class="exo_item">
15494 bpr 105
          <span class="exo_link">
17432 guerimand 106
          !let rd=!randint 111111,999999
107
          !href target=wims_exam cmd=new&+randomizer=$rd&+worksheet=$exam.$i $ti
15494 bpr 108
          </span>&nbsp;
109
          <span class="weight">($name_weight: $we)</span>
11460 bpr 110
          !if autogen iswordof $op and $wims_exam_remain!=$empty
111
            !set ss=$(wims_session)t$(exam)t$i
112
            !set test=!defof w_cmd in wimshome/sessions/$ss/var
113
            !if $test=$empty
114
              !set test=$wims_ref_name?wims_window=new&+session=$(wims_session)_exam&+cmd=new&+worksheet=$exam.$i
17230 bpr 115
              <img src="$test" style="height:1px; width:1px">
11460 bpr 116
            !endif
117
          !endif
17542 bpr 118
          </li>
119
          !if $exam_mode>0
120
            !goto endli
121
          !endif
11460 bpr 122
        !else
17542 bpr 123
          !if $exam_mode=0
124
            <li class="exo_item">$ti
125
            <span>
126
            !href cmd=reply&job=student $name_depend
127
            </span>
128
            </li>
129
          !endif
11460 bpr 130
        !endif
23 reyssat 131
      !endif
132
    !else
17841 bpr 133
      <li class="exo_item">
11460 bpr 134
      <span>$ti.</span>&nbsp;<span class="weight">($name_weight: $we)</span>
17841 bpr 135
      </li>
23 reyssat 136
    !endif
4956 obado 137
!! -------fin d'affichage de la ligne correspondant a un exercice
138
  !next i
17542 bpr 139
:endli
11460 bpr 140
  </ol>
17230 bpr 141
  <br class="spacer clearall">
15494 bpr 142
  !! variables
143
  !! $stries: number of tries
144
  !! $tryremain: number of remaining tries
145
  !! registered: if non empty, the exam session has begun
146
  !! exhausted: if yes, no more available sessions
17542 bpr 147
  !if $exam_mode>0
148
    !if $dt=no
149
      <div class="wims_msg alert">
17382 guerimand 150
      $name_courseend
17542 bpr 151
      </div>
152
    !endif
17382 guerimand 153
  !endif
154
 
15494 bpr 155
  !! closed exam
11460 bpr 156
  !if $t_=no
157
    <p class="examclosed">$name_examclosed</p>
158
    !set wims_menu_items=!append line refresh,1,cmd=reply&job=student to $wims_menu_items
23 reyssat 159
  !else
17542 bpr 160
    !if $wims_exam_remain!=$empty and ($exam_mode=0 or $dt=yes)
161
      <p>$wims_name_examremain <span id="exam_clock"> </span></p>
162
!!     !if $time_end!=$empty
163
!!        <div class="wims_msg warning">
164
!!        $name_exam11
165
!!        </div>
166
!!     !endif
167
    !endif
15494 bpr 168
    !if $tryremain < $stries
169
      <p class="exam_score"><strong>$name_bestscore</strong></p>
170
    !endif
171
    <div class="exam_instructions wims_msg info" id="exam_status">
172
    !! open exam or in simulation
11460 bpr 173
    <p class="tries">
174
    !if $stries=1
175
      $name_exam1
176
    !else
11461 bpr 177
      $name_exam2 $name_bestscore2
11460 bpr 178
    !endif
11718 bpr 179
    </p>
11460 bpr 180
    !if $tryremain<0 or ($tryremain=0 and ($registered=$empty or $allowtype=simulation))
15494 bpr 181
      <p>
11460 bpr 182
      !if $trcut=0
183
        $name_exam3
184
      !else
185
        $name_exam4
186
      !endif
11718 bpr 187
      $name_exam6bis
11461 bpr 188
      !if $stry>1
189
        $name_exam5
190
      !endif
11460 bpr 191
      !set exhausted=yes
15494 bpr 192
      </p>
11460 bpr 193
    !endif
11718 bpr 194
    !if $registered=$empty and $exhausted!=yes
11953 bpr 195
      <div>
11718 bpr 196
      !if $stries>1
15494 bpr 197
        $name_exam9.
11718 bpr 198
      !else
15494 bpr 199
        $name_exam9bis.
11718 bpr 200
      !endif
17468 guerimand 201
      !if $time_end!=$empty
15494 bpr 202
        <div class="wims_msg warning">
11718 bpr 203
        $name_exam11
15494 bpr 204
        </div>
11718 bpr 205
      !endif
17542 bpr 206
      </div><p>
11718 bpr 207
      $name_exam10
11461 bpr 208
      !if $allowtype!=simulation and $stries>1
11460 bpr 209
        $name_exam7
11461 bpr 210
      !else only one session or simulation
11460 bpr 211
        $name_exam8
212
      !endif
213
      </p>
214
    !else
11461 bpr 215
      !if $allowtype!=simulation and $tryremain=0 and $exhausted!=yes and $tries>1
11460 bpr 216
        <p class="lasttry">$name_lasttry</p>
217
      !endif
218
    !endif
11718 bpr 219
    !if $tryremain>0 and $stries>1
220
      <p class="tryremain">$name_exam6</p>
221
    !endif
11953 bpr 222
    </div>
11460 bpr 223
    !if $exhausted!=yes
17542 bpr 224
      !set wims_menu_items=!append line refresh,1,cmd=reply&job=student\
1419 bpr 225
scoreexam,1,cmd=reply&job=score \
226
to $wims_menu_items
16368 guerimand 227
      !if $wims_exam_remain!=$empty
11460 bpr 228
        !set wims_menu_items=!append line endexam,1,cmd=reply&job=scorereg\
1419 bpr 229
to $wims_menu_items
11460 bpr 230
      !endif
231
    !endif exhausted!=yes
232
  !endif t_=no
11953 bpr 233
 
11460 bpr 234
!endif exocnt=0
23 reyssat 235
 
236
!if $t_=yes
11460 bpr 237
  !if $allowtype=simulation
238
    <p class="wims_msg info simulation">$name_simulation</p>
239
  !endif
23 reyssat 240
!endif
241
 
242
!if $wims_user=supervisor
11460 bpr 243
  !set wims_menu_items=!append line itemsep,0,\
10116 bpr 244
backteacher,1,cmd=resume\
11460 bpr 245
to $wims_menu_items
23 reyssat 246
!endif
247
 
5648 obado 248
<!-- adm/class/exam/student.phtml END -->
23 reyssat 249
!tail
250
 
251
!reset job