Rev 12288 | Rev 13011 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12288 | Rev 12381 | ||
---|---|---|---|
Line 133... | Line 133... | ||
133 | { |
133 | { |
134 | char fname[MAX_FNAME+1], logbuf[MAX_LINELEN+1], cbuf[256], sbuf[32], shbuf[32]; |
134 | char fname[MAX_FNAME+1], logbuf[MAX_LINELEN+1], cbuf[256], sbuf[32], shbuf[32]; |
135 | char *user, *classe, *sh, *sess, *exo, *cc, *ip, *allow, *pend, *se; |
135 | char *user, *classe, *sh, *sess, *exo, *cc, *ip, *allow, *pend, *se; |
136 | char *ex; |
136 | char *ex; |
137 | double sc,Sc; |
137 | double sc,Sc; |
138 |
|
138 | int i, scorelog, testmax; |
139 | 139 | ||
140 | if(robot_access || strstr("session_prefix","_check")!=NULL) return; |
140 | if(robot_access || strstr("session_prefix","_check")!=NULL) return; |
141 | user=getvar("wims_user"); classe=getvar("wims_class"); |
141 | user=getvar("wims_user"); classe=getvar("wims_class"); |
142 | sc=0; |
142 | sc=0; |
143 | if(isexam) { |
143 | if(isexam) { |
Line 181... | Line 181... | ||
181 | cc=cbuf; |
181 | cc=cbuf; |
182 | } |
182 | } |
183 | else cc=c; |
183 | else cc=c; |
184 | if(classe==NULL || *classe==0) i=1; |
184 | if(classe==NULL || *classe==0) i=1; |
185 | else i=getscorestatus(classe,atoi(sh)); |
185 | else i=getscorestatus(classe,atoi(sh)); |
186 |
|
186 | testmax=gettrycheck(classe,user,atoi(sh),atoi(exo))==1; |
187 | testmax=strcmp(c,"new")!=0 && strcmp(c,"renew")!=0 && testmax_; |
- | |
188 | pend=getvar("wims_scoring"); if(pend==NULL) pend=""; |
187 | pend=getvar("wims_scoring"); if(pend==NULL) pend=""; |
189 | if((i==0 || !exodepOK || strcmp(pend,"pending")!=0 || testmax) && strcmp(cc,"rafale")!=0) |
188 | if((i==0 || !exodepOK || strcmp(pend,"pending")!=0 || testmax) && strcmp(cc,"rafale")!=0) |
190 | if(testmax) allow="maxtry noscore"; else allow="noscore"; |
189 | if(testmax) allow="maxtry noscore"; else allow="noscore"; |
191 | else { |
- | |
192 | if((strcmp(c,"new")==0 || strcmp(c,"renew")==0) && testmax_) allow="maxtry noscore"; |
- | |
193 |
|
190 | else allow=""; |
194 | } |
- | |
195 | ip=remote_addr; if(*ip==0) ip="-"; scorelog=0; |
191 | ip=remote_addr; if(*ip==0) ip="-"; scorelog=0; |
196 | if(user==NULL || *user==0) { |
192 | if(user==NULL || *user==0) { |
197 | classe="0"; allow=""; |
193 | classe="0"; allow=""; |
198 | mkfname(fname,"../sessions/%s/.score",sess); |
194 | mkfname(fname,"../sessions/%s/.score",sess); |
199 | } |
195 | } |
200 | else { |
196 | else { |
201 | char *pp; |
197 | char *pp; |
202 | if(classe==NULL || *classe==0) return; |
198 | if(classe==NULL || *classe==0) return; |
203 | pp=getvar("wims_scorereg"); |
199 | pp=getvar("wims_scorereg"); |
204 | if((allow[0]==0 || |
200 | if((allow[0]==0 || testmax || (pp!=NULL && strcmp(pp,"suspend")==0)) && *ex!='E') |
205 | scorelog=1; |
201 | scorelog=1; |
206 | else |
202 | else |
207 | mkfname(fname,"classes/%s/noscore/%s",classe,user); |
203 | mkfname(fname,"classes/%s/noscore/%s",classe,user); |
208 | } |
204 | } |
209 | if(isexam && user!=NULL && *user!=0) { |
205 | if(isexam && user!=NULL && *user!=0) { |