Annotation of capa/capa51/GUITools/scorer.h, revision 1.1.1.1

1.1       albertel    1: /*
                      2:  * scorer.h
                      3:  * Copyright Guy Albertelli II 1997
                      4:  */
                      5: #ifndef _SCORER_H_
                      6: #define _SCORER_H_ 1
                      7: 
                      8: /* Tcl command functions */
                      9: int buildStudentList(ClientData, Tcl_Interp*, int, char**);
                     10: int freeStudentList(ClientData, Tcl_Interp*, int, char**);
                     11: int getAnswersFromSet(ClientData, Tcl_Interp *, int, char**);
                     12: int compareCapaID(ClientData, Tcl_Interp *, int, char**);
                     13: int scorer_get_entry(ClientData, Tcl_Interp *, int, char**);
                     14: int scorer_set_entry(ClientData, Tcl_Interp *, int, char**);
                     15: 
                     16: #define SCO_FATALERROR 1
                     17: #define SCO_NEW 2
                     18: #define SCO_EXIST 3
                     19: 
                     20: #define CAPA_METHOD 1
                     21: #define LENIENT_METHOD 2
                     22: #define STRICT 3
                     23: 
                     24: #define YES 1
                     25: #define NO 0
                     26: 
                     27: #ifndef NeXT
                     28: #define TRUE 1
                     29: #define FALSE 0
                     30: #endif
                     31: 
                     32: #define MAX_QUEST 50
                     33: #define MAX_ANSWER_LENGTH 23
                     34: #define CONFIG_LINE_LENGTH 250
                     35: #define MAX_LINE_LENGTH 2048
                     36: #define MAX_PID_MATCHES 100
                     37: #define MAX_NUM_FLAG 30
                     38: #define SCAN_INPUT_LENGTH 577
                     39: 
                     40: #define SCANTRON_ERROR 34
                     41: #define SCANTRON_OK 13
                     42: 
                     43: #define ONE_OUT_OF_8 'a'
                     44: #define GLE 'b'
                     45: #define TF 'c'
                     46: #define ASSIGNED 'd'
                     47: #define N_OUT_OF_M 'e'
                     48: #define SINGLE_DIGIT 'f'
                     49: #define STRING_MATCH 'g'
                     50: 
                     51: #define QUESTION_MENU 'y'
                     52: #define QUESTION_STOP 'z'
                     53: 
                     54: #define CHECK_PIN 1
                     55: #define ANON_MODE 3
                     56: #define CHECK_SPACES 4
                     57: #define SURVEY_MODE 5
                     58: #define SURVEY_HEADER 6
                     59: #define PAUSE_TIME 8
                     60: #define ID_FORMAT 9
                     61: #define MULTIPLE_MARKS 10
                     62: #define QUERY_ABOUT_PID 11
                     63: #define LOGGING 12
                     64: 
                     65: #define ANUMBER_FORMAT 1
                     66: #define SOC_SEC_FORMAT 2
                     67: 
                     68: #define E_OPENOUTPUT 1
                     69: #define E_OPENOUTPUTRETURN 2
                     70: #define E_MODIFYFLAG 3
                     71: #define E_GETYESNO 4
                     72: #define E_PRINTQUESTIONS 5
                     73: #define E_OPENSERIAL 6
                     74: #define E_INITSCANTRON 7
                     75: #define E_BADFORM 8
                     76: #define E_UNKNOWSCANTRON 9
                     77: #define E_BUILDPIDPIN 10
                     78: #define E_GETFORM 11
                     79: #define E_CHECKFORM 12
                     80: #define E_HANDLESAVEFORM 13
                     81: #define E_INTREPRETFORM 14
                     82: #define E_CAPA_GET_STUDENT 15
                     83: #define E_PARSER 16
                     84: #define E_UNKNOWN_QTYPE 17
                     85: #define E_PARSER_DIFFERENT 18
                     86: #define E_INVALIDIDFORMAT 19
                     87: #define E_SINGLEDIGIT 20
                     88: #define E_GARBAGEPIDDATA 21
                     89: #define E_LOGERROR 22
                     90: #define E_GRADINGMETHOD 23
                     91: 
                     92: #define GF_SPACES 1
                     93: #define GF_MULTIPLEMARKS 2
                     94: #define GF_EOF 4
                     95: #define GF_PINWRONG 8
                     96: 
                     97: #define CF_STID 2
                     98: #define CF_CLASSL 3
                     99: #define CF_PIN 4
                    100: #define CF_NOERROR 5
                    101: 
                    102: #define LOG_NOPINFOUND 1
                    103: #define LOG_PINWRONG 2
                    104: #define LOG_STUDENTNOTEXIST 3
                    105: #define LOG_PINNOTMATCH 4
                    106: #define LOG_BADPID 5
                    107: #define LOG_BADPIN 6
                    108: #define LOG_SPACES 7
                    109: #define LOG_MULTIPLEMARKS 8
                    110: 
                    111: extern char NUMBER[10];
                    112: extern char LETTER[10];
                    113: 
                    114: typedef struct
                    115: {
                    116:   char answerPID[10];
                    117:   char questionPID[10];
                    118:   char PIN[7];
                    119:   int classlPIN;
                    120:   char Answers[MAX_QUEST][MAX_ANSWER_LENGTH];
                    121:   char Name[17];
                    122:   char serialNumber[7];
                    123:   char origString[577];
                    124:   int error;
                    125: } Student;
                    126: 
                    127: typedef struct
                    128: {
                    129:   char type;
                    130:   int points;
                    131:   int leafs;
                    132: } Question;
                    133: 
                    134: typedef struct
                    135: {
                    136:   char Class[10];
                    137:   int SetId;
                    138:   int NumQuestions;
                    139:   int NumOfStudents;
                    140:   int CheckPIN;
                    141:   int AnonMode;
                    142:   int CheckSpaces;
                    143:   int CheckMultipleMarks;
                    144:   int SurveyMode;
                    145:   int SurveyHeader;
                    146:   int Pause;
                    147:   float PauseTime;
                    148:   int IdFormat;
                    149:   int QueryAboutPID;
                    150:   int log;
                    151:   FILE* logFile;
                    152:   int linesRead;
                    153:   int loggedErrors;
                    154: } Flags;
                    155: 
                    156: typedef struct
                    157: {
                    158:   int writefd;
                    159:   int readfd;
                    160: } SerialLines;
                    161: 
                    162: typedef struct
                    163: {
                    164:   char PID[MAX_STUDENT_NUMBER];
                    165:   int PIN;
                    166:   char *capaid_plus;
                    167: } PIDPIN;
                    168: 
                    169: typedef struct PIDPINlist 
                    170: {
                    171:   char *PID;/*FIXME*/
                    172:   int PIN;  /*FIXME*/
                    173:   char* classname;
                    174:   long num;
                    175:   PIDPIN* classList;
                    176:   int numStudents;
                    177:   struct PIDPINlist *next;
                    178: } PIDPINlist;
                    179: #endif /*_SCORER_H_*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>