--- capa/capa51/pProj/capaCgiUtils.c 2000/03/22 21:08:03 1.13 +++ capa/capa51/pProj/capaCgiUtils.c 2000/06/27 18:28:48 1.16 @@ -229,14 +229,6 @@ void web_printheader(FILE *out) fprintf(out,"\n"); fprintf(out,"\n"); } - -#ifdef CAPA_WEB - fprintf(out,"\n", - CAPA_VER,COMPILE_DATE); -#else - fprintf(out,"\n", - CAPA_VER,COMPILE_DATE); -#endif } void web_printfooter(FILE *out) @@ -1518,7 +1510,6 @@ char *class_dir; char *c_owner;char *cla } if(mode == VIEW_PREVIOUS_MODE) { /* VIEW_PREVIOUS_MODE */ /* - if( display_ans ) { if( prob_idx->ans_type == ANSWER_IS_FLOAT ) { a = (double)atof(prob_idx->answer); sprintf(cmp_ans,prob_idx->ans_fmt, a); @@ -1539,6 +1530,7 @@ char *class_dir; char *c_owner;char *cla sprintf(buf,"

Answer: %s
\n",cmp_ans); } */ + if( display_ans ) { c_ans=answers_string(ANSWER_STRING_MODE, prob_idx); sprintf(buf,"

Answer: %s
",c_ans); append_qtext(buf); @@ -1547,6 +1539,7 @@ char *class_dir; char *c_owner;char *cla sprintf(buf,"

Explanation: \n

%s
\n",prob_idx->explain); append_qtext(buf); } + } } else { /* could be TRY_SET_MODE, CHECK_ANSWER_MODE */ if( g_passdue ) { get_response(header.partial_credit[question_idx],entry.answers[question_idx],question_idx,prob_idx); @@ -2758,7 +2751,7 @@ int *hc;int *qc;int *fs; configResult=read_capa_config("homework_weight",buf); if (configResult != 0 && configResult != -1 ) { sscanf(buf,"%f", &hw_w); - if(hw_w <= 0.0 ) { + if(hw_w < 0.0 ) { hw_w = DEFAULT_HW_W; } } else { @@ -2767,7 +2760,7 @@ int *hc;int *qc;int *fs; configResult=read_capa_config("quiz_weight",buf); if (configResult != 0 && configResult != -1 ) { sscanf(buf,"%f", &qz_w); - if(qz_w <= 0.0 ) { + if(qz_w < 0.0 ) { qz_w = DEFAULT_QZ_W; } } else { @@ -2776,7 +2769,7 @@ int *hc;int *qc;int *fs; configResult=read_capa_config("exam_weight",buf); if (configResult != 0 && configResult != -1 ) { sscanf(buf,"%f", &ex_w); - if(ex_w <= 0.0 ) { + if(ex_w < 0.0 ) { ex_w = DEFAULT_EX_W; } } else { @@ -2785,7 +2778,7 @@ int *hc;int *qc;int *fs; configResult=read_capa_config("final_weight",buf); if (configResult != 0 && configResult != -1 ) { sscanf(buf,"%f", &fe_w); - if(fe_w <= 0.0 ) { + if(fe_w < 0.0 ) { fe_w = DEFAULT_FE_W; } } else { @@ -2794,7 +2787,7 @@ int *hc;int *qc;int *fs; configResult=read_capa_config("correction_weight",buf); if (configResult != 0 && configResult != -1 ) { sscanf(buf,"%f", &pc_w); - if(pc_w <= 0.0 ) { + if(pc_w < 0.0 ) { pc_w = DEFAULT_PC_W; } } else {