Rev 17457 | Rev 17465 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17457 | Rev 17459 | ||
---|---|---|---|
Line 216... | Line 216... | ||
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 | /* set up wims_scoring + wims_time_remain */ |
219 | /* set up wims_scoring + wims_time_remain */ |
220 | if(pc==NULL) pc=getvar("wims_class"); |
220 | if(pc==NULL) pc=getvar("wims_class"); |
- | 221 | remain=duration+start-nowtime; |
|
221 | if(pc) { |
222 | if(pc) { |
222 | int maxremain; |
223 | int maxremain; |
223 | maxremain=getscorestatus(pc,t1); |
224 | maxremain=getscorestatus(pc,t1); |
224 |
|
225 | /* negative return is score retriction timeleft */ |
225 | } |
- | |
226 | else { |
- | |
227 |
|
226 | if (maxremain<0) remain=min(-maxremain,remain); |
228 | }; |
227 | }; |
229 | if(remain<0) remain=0; |
228 | if(remain<0) remain=0; |
230 | snprintf(dbuf,sizeof(dbuf),"%d",remain); |
229 | snprintf(dbuf,sizeof(dbuf),"%d",remain); |
231 | setvar("wims_exam_remain",dbuf); |
230 | setvar("wims_exam_remain",dbuf); |
232 | } |
231 | } |