Rev 18153 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18153 | Rev 18414 | ||
---|---|---|---|
Line 367... | Line 367... | ||
367 | /* Returns the status of a sheet, or -1 if error */ |
367 | /* Returns the status of a sheet, or -1 if error */ |
368 | int getsheetstatus(char *classe, int sheet) |
368 | int getsheetstatus(char *classe, int sheet) |
369 | { |
369 | { |
370 | char *p, *st, buf[MAX_LINELEN+1], namebuf[MAX_FNAME+1]; |
370 | char *p, *st, buf[MAX_LINELEN+1], namebuf[MAX_FNAME+1]; |
371 | int i,j,res,lnb; |
371 | int i,j,res,lnb; |
- | 372 | char *classp, *classp2, *scp; |
|
372 | char *p1,buf1[MAX_LINELEN],buf2[MAX_LINELEN]; |
373 | char *p1,buf1[MAX_LINELEN],buf2[MAX_LINELEN]; |
373 | char buf3[MAX_LINELEN],buf4[MAX_LINELEN]; |
374 | char buf3[MAX_LINELEN],buf4[MAX_LINELEN]; |
374 | if(isexam || score_isexam) {st="exam"; lnb=8;} else {st="sheet";lnb=9;}; |
375 | if(isexam || score_isexam) {st="exam"; lnb=8;} else {st="sheet";lnb=9;}; |
375 | mkfname(namebuf,"%s/%s/%ss/.%ss",class_base,classe,st,st); |
376 | mkfname(namebuf,"%s/%s/%ss/.%ss",class_base,classe,st,st); |
376 | direct_datafile=1;datafile_fnd_record(namebuf,sheet,buf);direct_datafile=0; |
377 | direct_datafile=1;datafile_fnd_record(namebuf,sheet,buf);direct_datafile=0; |
Line 384... | Line 385... | ||
384 | goto ret; |
385 | goto ret; |
385 | if (strcmp(score_user,"supervisor")==0 || score_user[0]==0) |
386 | if (strcmp(score_user,"supervisor")==0 || score_user[0]==0) |
386 | goto ret; |
387 | goto ret; |
387 | fnd_line(buf,lnb,buf1); |
388 | fnd_line(buf,lnb,buf1); |
388 | rows2lines(buf1); |
389 | rows2lines(buf1); |
- | 390 | classp=getvar("wims_class"); scp=getvar("wims_superclass"); |
|
- | 391 | if(scp!=NULL && *scp!=0) classp2=scp; else classp2=classp; |
|
389 | mkfname(namebuf,"%s/%s/.users/%s",class_base, |
392 | mkfname(namebuf,"%s/%s/.users/%s",class_base,classp2,score_user); |
390 | for(i=1;;++i){ |
393 | for(i=1;;++i){ |
391 | fnd_line(buf1,i,buf); |
394 | fnd_line(buf1,i,buf); |
392 | if(*buf==0) break; |
395 | if(*buf==0) break; |
393 | for (j=1;;++j){ |
396 | for (j=1;;++j){ |
394 | fnd_item(buf,j,buf2); |
397 | fnd_item(buf,j,buf2); |