Rev 17451 | Rev 17459 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17451 | Rev 17457 | ||
---|---|---|---|
Line 214... | Line 214... | ||
214 | class_base,pc,pu); |
214 | class_base,pc,pu); |
215 | } |
215 | } |
216 | else accessfile("yes","w","%s/%s/examsimu.%d", |
216 | else accessfile("yes","w","%s/%s/examsimu.%d", |
217 | session_dir,pb,t1); |
217 | session_dir,pb,t1); |
218 | } |
218 | } |
219 |
|
219 | /* set up wims_scoring + wims_time_remain */ |
220 | snprintf(dbuf,sizeof(dbuf),"%d",remain); |
- | |
221 | setvar("wims_exam_remain",dbuf); /* remaining time in seconds */ |
- | |
222 | if(pc==NULL) pc=getvar("wims_class"); |
220 | if(pc==NULL) pc=getvar("wims_class"); |
- | 221 | if(pc) { |
|
- | 222 | int maxremain; |
|
223 |
|
223 | maxremain=getscorestatus(pc,t1); |
- | 224 | remain=min(maxremain,duration+start-nowtime); |
|
- | 225 | } |
|
- | 226 | else { |
|
- | 227 | remain=duration+start-nowtime; |
|
- | 228 | }; |
|
- | 229 | if(remain<0) remain=0; |
|
- | 230 | snprintf(dbuf,sizeof(dbuf),"%d",remain); |
|
- | 231 | setvar("wims_exam_remain",dbuf); |
|
224 | } |
232 | } |
225 | 233 | ||
226 | double currexamscore(int sh) |
234 | double currexamscore(int sh) |
227 | { |
235 | { |
228 | char buf[MAX_FNAME+1], sbuf[MAX_LINELEN+1]; |
236 | char buf[MAX_FNAME+1], sbuf[MAX_LINELEN+1]; |