version 1.3, 2000/08/04 15:54:49
|
version 1.5, 2000/09/11 14:51:25
|
Line 2
|
Line 2
|
Copyright (C) 1992-2000 Michigan State University |
Copyright (C) 1992-2000 Michigan State University |
|
|
The CAPA system is free software; you can redistribute it and/or |
The CAPA system is free software; you can redistribute it and/or |
modify it under the terms of the GNU Library General Public License as |
modify it under the terms of the GNU General Public License as |
published by the Free Software Foundation; either version 2 of the |
published by the Free Software Foundation; either version 2 of the |
License, or (at your option) any later version. |
License, or (at your option) any later version. |
|
|
The CAPA system is distributed in the hope that it will be useful, |
The CAPA system is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
Library General Public License for more details. |
General Public License for more details. |
|
|
You should have received a copy of the GNU Library General Public |
You should have received a copy of the GNU General Public |
License along with the CAPA system; see the file COPYING. If not, |
License along with the CAPA system; see the file COPYING. If not, |
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
Boston, MA 02111-1307, USA. |
Boston, MA 02111-1307, USA. |
Line 68 int scorer_set_entry(ClientData notused,
|
Line 68 int scorer_set_entry(ClientData notused,
|
Tcl_SetResult(interp,errorline,TCL_VOLATILE); |
Tcl_SetResult(interp,errorline,TCL_VOLATILE); |
return TCL_ERROR; |
return TCL_ERROR; |
} |
} |
a_line=capa_malloc(strlen(tries)*5,1); |
a_line=capa_malloc(strlen(tries)*5+MAX_STUDENT_NUMBER,1); |
sprintf(a_line,"%s %s,%s\n",student_number,answers,tries); |
sprintf(a_line,"%s %s,%s\n",student_number,answers,tries); |
new_len = strlen(a_line); |
new_len = strlen(a_line); |
sprintf(fmtbuf, "%%%dc",MAX_STUDENT_NUMBER); |
sprintf(fmtbuf, "%%%dc",MAX_STUDENT_NUMBER); |
Line 210 int scorer_get_entry(ClientData notused,
|
Line 210 int scorer_get_entry(ClientData notused,
|
entry->tries = tries_p; |
entry->tries = tries_p; |
entry->e_probs = nq; |
entry->e_probs = nq; |
} |
} |
sprintf(buf,"%d;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); |
sprintf(buf,"%ld;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); |
Tcl_SetResult(interp,buf,TCL_VOLATILE); |
Tcl_SetResult(interp,buf,TCL_VOLATILE); |
return TCL_OK; |
return TCL_OK; |
} |
} |
Line 220 void processFile(FILE *inputFile,Questio
|
Line 220 void processFile(FILE *inputFile,Questio
|
{ |
{ |
T_entry grade; |
T_entry grade; |
char studentNumber[MAX_STUDENT_NUMBER+1],name[MAX_NAME_CHAR+1]; |
char studentNumber[MAX_STUDENT_NUMBER+1],name[MAX_NAME_CHAR+1]; |
int offset,score,section,buf,i,numRight,points=0,leafs,processed=0,unit; |
int score,section,buf,i,numRight,points=0,leafs,processed=0,unit; |
|
|
printf("Processing"); |
printf("Processing"); |
while(fscanf(inputFile,"%s",studentNumber)!=EOF) |
while(fscanf(inputFile,"%s",studentNumber)!=EOF) |