Answer %d of %d:\n",ii+1,p->ans_cnt,q_idx+1,ii+1); + } else { + sprintf(buf,"
Answer %d of %d:\n",ii+1,p->ans_cnt,q_idx+1,ii+1);
+ }
+ append_qtext(buf);
+ for(ii=1, ai=p->ans_list;ii Answer %d of %d:\n",ii+1,p->ans_cnt,q_idx+1,ii+1);
} else {
sprintf(buf," Answer %d of %d:\n",ii+1,p->ans_cnt,q_idx+1,ii+1);
}
@@ -1886,7 +1886,9 @@ char buf[MAX_BUFFER_SIZE];
}
/* returns a -1 if there were not enough answers, otherwise the number of responses
- for the question is returned*/
+ for the question is returned
+ !!!!!AS A SIDEEFFECT IT ALSO CROPS ANSWERS TO ANSWER_STRING_LENG!!!!!!!
+*/
int gather_answers(char ***ans,int q_idx,Problem_t *p)
{
int cnt;
@@ -1896,6 +1898,7 @@ int gather_answers(char ***ans,int q_idx
sa_p= g_stu_ans_pp[q_idx+1];
for(i=0;((i
\n");
/* SHOW TOTALS */
/* if capalogin_show_summary_score is set to none don't show it */
- sprintf(buf,"%d sets, total = %3d/%3d (%d%%)\n", set, term_score, term_valid, 100*term_score/term_valid);
+ if (term_valid > 0) {
+ sprintf(buf,"%d sets, total = %3d/%3d (%d%%)\n", tot_num_sets, term_score, term_valid, 100*term_score/term_valid);
+ } else {
+ sprintf(buf,"%d sets, total = %3d/%3d\n", tot_num_sets, term_score, term_valid);
+ }
result=read_capa_config("capalogin_show_summary_score",buf2);
if (result != 0 && result != -1) {
if (strcasecmp(buf2,"none")==0) {
@@ -2383,27 +2401,28 @@ FILE *out;
i, /* Question counter */
set_score, /* Score on a set */
term_score=0, /* Total points received */
- term_valid=0, /* Total points possible */
- result;
+ term_valid=0; /* Total points possible */
T_entry entry; /* Database entry for a set */
char buf[MAX_BUFFER_SIZE]; /* Output line buffer */
- char buf2[MAX_BUFFER_SIZE]; /* Output line buffer */
T_header header; /* Problem set header */
- int question_cnt,valid_wgt, rate,configResult,
- status_line_length=DEFAULT_STATUS_LINE_LENGTH,row;
+ int question_cnt,valid_wgt,configResult;
char class_fullpath[ONE_K],*serverName;
int hw_c, hw_r, qz_c, qz_r, fs, homework_count, quiz_count;
- int ex_c, epc_c;
float hw_w, qz_w, ex_w, fe_w, pc_w;
int idx, entry_count, tmp_len;
float *S, *F;
int *X;
- char *capa_server, *qz_p, *ex_p, *epc_p;
+ char *capa_server;
int max_set[4];
char **c_path_pp;
-
-
-
+
+ /*Unused Vars
+ char buf2[MAX_BUFFER_SIZE];
+ char *qz_p, *ex_p, *epc_p;
+ int ex_c, epc_c, result;
+ int rate, status_line_length=DEFAULT_STATUS_LINE_LENGTH,row;
+ */
+
serverName=getenv("SERVER_NAME");
if (!serverName) {
fprintf(out,"Enviroment variable SERVER_NAME not set.\n");