Rev 15547 | Rev 16711 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15547 | Rev 16647 | ||
---|---|---|---|
Line 161... | Line 161... | ||
161 | mkfname(examlogd,"%s/examlog/%s/%s",class_dir,user,sess); |
161 | mkfname(examlogd,"%s/examlog/%s/%s",class_dir,user,sess); |
162 | mkfname(examlogf,"%s/%s.%s",examlogd,sh,exo); |
162 | mkfname(examlogf,"%s/%s.%s",examlogd,sh,exo); |
163 | } |
163 | } |
164 | else { |
164 | else { |
165 | sh=getvar("wims_sheet"); |
165 | sh=getvar("wims_sheet"); |
- | 166 | if(sh==NULL || *sh==0) { |
|
- | 167 | sh=getvar("wims_fwnumber"); |
|
166 | if(sh==NULL || *sh==0) return; |
168 | if(sh==NULL || *sh==0) return; |
- | 169 | ex="F"; |
|
- | 170 | exo=getvar("wims_fwexo"); |
|
- | 171 | } |
|
- | 172 | else { |
|
167 | exo=getvar("wims_exo"); if(exo==NULL) return; |
173 | exo=getvar("wims_exo"); if(exo==NULL) return; |
- | 174 | ex=""; |
|
- | 175 | } |
|
168 | sess=getvar("wims_session"); |
176 | sess=getvar("wims_session"); |
169 | if(sess==NULL) return; |
177 | if(sess==NULL) return; |
170 | ex=""; |
- | |
171 | - | ||
172 | } |
178 | } |
173 | if(strcmp(c,"new")!=0 && strcmp(c,"renew")!=0 |
179 | if(strcmp(c,"new")!=0 && strcmp(c,"renew")!=0 |
174 | && strcmp(c,"rafale")!=0 |
180 | && strcmp(c,"rafale")!=0 |
175 | && strcmp(c,"hint")!=0 && parm_restore==0) { |
181 | && strcmp(c,"hint")!=0 && parm_restore==0) { |
176 | char *s; |
182 | char *s; |
Line 183... | Line 189... | ||
183 | else cc=c; |
189 | else cc=c; |
184 | if(classe==NULL || *classe==0) i=1; |
190 | if(classe==NULL || *classe==0) i=1; |
185 | else i=getscorestatus(classe,atoi(sh)); |
191 | else i=getscorestatus(classe,atoi(sh)); |
186 | testmax=gettrycheck(classe,user,atoi(sh),atoi(exo))==1; |
192 | testmax=gettrycheck(classe,user,atoi(sh),atoi(exo))==1; |
187 | pend=getvar("wims_scoring"); if(pend==NULL) pend=""; |
193 | pend=getvar("wims_scoring"); if(pend==NULL) pend=""; |
188 | if((i==0 || !exodepOK || strcmp(pend,"pending")!=0 || testmax) && strcmp(cc,"rafale")!=0) |
194 | if((i==0 || !exodepOK || strcmp(pend,"pending")!=0 || testmax) && strcmp(cc,"rafale")!=0 && *ex!='F') |
189 | if(testmax) allow="maxtry noscore"; else allow="noscore"; |
195 | if(testmax) allow="maxtry noscore"; else allow="noscore"; |
190 | else allow=""; |
196 | else allow=""; |
191 | ip=remote_addr; if(*ip==0) ip="-"; scorelog=0; |
197 | ip=remote_addr; if(*ip==0) ip="-"; scorelog=0; |
192 | if(user==NULL || *user==0) { |
198 | if(user==NULL || *user==0) { |
193 | classe="0"; allow=""; |
199 | classe="0"; allow=""; |
Line 195... | Line 201... | ||
195 | } |
201 | } |
196 | else { |
202 | else { |
197 | char *pp; |
203 | char *pp; |
198 | if(classe==NULL || *classe==0) return; |
204 | if(classe==NULL || *classe==0) return; |
199 | pp=getvar("wims_scorereg"); /* contains suspend or exotrymax */ |
205 | pp=getvar("wims_scorereg"); /* contains suspend or exotrymax */ |
200 | if((allow[0]==0 || i==1 || (pp!=NULL && strcmp(pp,"suspend")==0)) && *ex!='E') |
206 | if((allow[0]==0 || i==1 || (pp!=NULL && strcmp(pp,"suspend")==0)) && *ex!='E' && *ex!='F') |
201 | scorelog=1; |
207 | scorelog=1; |
202 | else |
208 | else { |
- | 209 | if (*ex=='F') |
|
- | 210 | /* freework activity logged to different file */ |
|
- | 211 | mkfname(fname,"classes/%s/freeworksdata/%s.freework",classe,user); |
|
- | 212 | else |
|
203 | mkfname(fname,"classes/%s/noscore/%s",classe,user); |
213 | mkfname(fname,"classes/%s/noscore/%s",classe,user); |
- | 214 | } |
|
204 | } |
215 | } |
205 | if(isexam && user!=NULL && *user!=0) { |
216 | if(isexam && user!=NULL && *user!=0) { |
206 | allow=exam_sheetexo; |
217 | allow=exam_sheetexo; |
207 | snprintf(logbuf,sizeof(logbuf),":%s %2s %s \t%s%s\n", |
218 | snprintf(logbuf,sizeof(logbuf),":%s %2s %s \t%s%s\n", |
208 | nowstr,exo,cc,ip,allow); |
219 | nowstr,exo,cc,ip,allow); |