diff --git a/swad_account.c b/swad_account.c index fb061880..7697e8b2 100644 --- a/swad_account.c +++ b/swad_account.c @@ -1019,8 +1019,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat, Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); } - /***** Remove exams made by user in all courses *****/ - Tst_RemoveExamsMadeByUsrInAllCrss (UsrDat->UsrCod); + /***** Remove test results made by user in all courses *****/ + Tst_RemoveTestResultsMadeByUsrInAllCrss (UsrDat->UsrCod); /***** Remove user's notifications *****/ Ntf_RemoveUsrNtfs (UsrDat->UsrCod); diff --git a/swad_action.c b/swad_action.c index 528fc066..d5b6d744 100644 --- a/swad_action.c +++ b/swad_action.c @@ -821,12 +821,12 @@ Assessment: 673. ActDisableTag Disable a tag 674. ActRenTag Rename a tag 675. ActRcvCfgTst Receive configuration of test - 676. ActReqSeeMyTstExa Select range of dates to see my results of test exams - 677. ActSeeMyTstExa Show my test results - 678. ActReqSeeUsrTstExa Select users and range of dates to see results of test exams - 679. ActSeeUsrTstExa Show test results of several users - 680. ActSeeOneTstExaMe Show one test exam of me as student - 681. ActSeeOneTstExaOth Show one test exam of other user + 676. ActReqSeeMyTstRes Select range of dates to see my test results + 677. ActSeeMyTstRes Show my test results + 678. ActReqSeeUsrTstRes Select users and range of dates to see test results + 679. ActSeeUsrTstRes Show test results of several users + 680. ActSeeOneTstResMe Show one test result of me as student + 681. ActSeeOneTstResOth Show one test result of other user 682. ActPrnCal Show print view of the academic calendar of the course 683. ActChgCal1stDay Change first day of week and show academic calendar of the course @@ -2191,8 +2191,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActChgDatWrkCrs */{1046,-1,TabUnk,ActReqAsgWrkCrs ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Brw_ChgFileMetadata ,NULL}, /* ActDowWrkCrs */{1120,-1,TabUnk,ActReqAsgWrkCrs ,0x1FF,0x1FF,0x000,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL}, - /* ActSeeTst */{ 29,-1,TabUnk,ActReqTst ,0x118,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowNewTestExam ,NULL}, - /* ActAssTst */{ 98,-1,TabUnk,ActReqTst ,0x118,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_AssessTestExam ,NULL}, + /* ActSeeTst */{ 29,-1,TabUnk,ActReqTst ,0x118,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowNewTest ,NULL}, + /* ActAssTst */{ 98,-1,TabUnk,ActReqTst ,0x118,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_AssessTest ,NULL}, /* ActEdiTstQst */{ 104,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_ShowFormAskEditTsts ,NULL}, /* ActEdiOneTstQst */{ 105,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowFormEditOneQst ,NULL}, @@ -2210,12 +2210,12 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActRenTag */{ 143,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_RenameTag ,NULL}, /* ActRcvCfgTst */{ 454,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ReceiveConfigTst ,NULL}, - /* ActReqSeeMyTstExa */{1083,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelDatesToSeeMyExams ,NULL}, - /* ActSeeMyTstExa */{1084,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowMyExams ,NULL}, - /* ActSeeOneTstExaMe */{1085,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneExam ,NULL}, - /* ActReqSeeUsrTstExa*/{1080,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelUsrsToSeeUsrsExams ,NULL}, - /* ActSeeUsrTstExa */{1081,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowUsrsExams ,NULL}, - /* ActSeeOneTstExaOth*/{1082,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneExam ,NULL}, + /* ActReqSeeMyTstRes */{1083,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL}, + /* ActSeeMyTstRes */{1084,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowMyTestResults ,NULL}, + /* ActSeeOneTstResMe */{1085,-1,TabUnk,ActReqTst ,0x108,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL}, + /* ActReqSeeUsrTstRes*/{1080,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,Tst_SetIniEndDates ,Tst_SelUsrsToSeeUsrsTestResults,NULL}, + /* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowUsrsTestResults ,NULL}, + /* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x110,0x100,0x000,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActPrnCal */{ 71,-1,TabUnk,ActSeeCal ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Cal_DrawCalendar ,NULL}, /* ActChgCal1stDay */{1485,-1,TabUnk,ActSeeCal ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,Cal_ChangeFirstDayOfWeek ,Cal_DrawCalendar ,NULL}, @@ -3948,12 +3948,12 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActAutUsrChgLan, // #1077 ActSeeDocCrs, // #1078 ActSeeMrkCrs, // #1079 - ActReqSeeUsrTstExa, // #1080 - ActSeeUsrTstExa, // #1081 - ActSeeOneTstExaOth, // #1082 - ActReqSeeMyTstExa, // #1083 - ActSeeMyTstExa, // #1084 - ActSeeOneTstExaMe, // #1085 + ActReqSeeUsrTstRes, // #1080 + ActSeeUsrTstRes, // #1081 + ActSeeOneTstResOth, // #1082 + ActReqSeeMyTstRes, // #1083 + ActSeeMyTstRes, // #1084 + ActSeeOneTstResMe, // #1085 ActReqDatSeeMrkCrs, // #1086 ActReqDatSeeMrkGrp, // #1087 ActNewMaiMe, // #1088 diff --git a/swad_action.h b/swad_action.h index 6031cc08..df0b11b0 100644 --- a/swad_action.h +++ b/swad_action.h @@ -832,12 +832,12 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActRenTag (ActRcvRchTxtCrsLnk+115) #define ActRcvCfgTst (ActRcvRchTxtCrsLnk+116) -#define ActReqSeeMyTstExa (ActRcvRchTxtCrsLnk+117) -#define ActSeeMyTstExa (ActRcvRchTxtCrsLnk+118) -#define ActSeeOneTstExaMe (ActRcvRchTxtCrsLnk+119) -#define ActReqSeeUsrTstExa (ActRcvRchTxtCrsLnk+120) -#define ActSeeUsrTstExa (ActRcvRchTxtCrsLnk+121) -#define ActSeeOneTstExaOth (ActRcvRchTxtCrsLnk+122) +#define ActReqSeeMyTstRes (ActRcvRchTxtCrsLnk+117) +#define ActSeeMyTstRes (ActRcvRchTxtCrsLnk+118) +#define ActSeeOneTstResMe (ActRcvRchTxtCrsLnk+119) +#define ActReqSeeUsrTstRes (ActRcvRchTxtCrsLnk+120) +#define ActSeeUsrTstRes (ActRcvRchTxtCrsLnk+121) +#define ActSeeOneTstResOth (ActRcvRchTxtCrsLnk+122) #define ActPrnCal (ActRcvRchTxtCrsLnk+123) #define ActChgCal1stDay (ActRcvRchTxtCrsLnk+124) diff --git a/swad_changelog.h b/swad_changelog.h index 522c8741..d93c4de6 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -168,21 +168,19 @@ // TODO: Change forms to change my webs / social networks to one unique form with a "Save changes" button -// TODO: Change "Results tests" to "View exams" ? -// TODO: Change "See exam" to "View exam" ? -// TODO: Change "Test result" to "Exam" ? - /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.66 (2016-11-21)" +#define Log_PLATFORM_VERSION "SWAD 16.67 (2016-11-21)" #define CSS_FILE "swad16.60.1.css" #define JS_FILE "swad16.46.1.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.67: Nov 21, 2016 Refactoring in tests. + "Test exam" is now called "Test result". (207336 lines) Version 16.66: Nov 21, 2016 Change icons for attendance. Change icons for announcements. Change icons for notices. diff --git a/swad_course.c b/swad_course.c index 89ca7ccd..6d86792e 100644 --- a/swad_course.c +++ b/swad_course.c @@ -2275,7 +2275,7 @@ static void Crs_EmptyCourseCompletely (long CrsCod) Svy_RemoveSurveys (Sco_SCOPE_CRS,CrsCod); /***** Remove all test exams made in the course *****/ - Tst_RemoveCrsExams (CrsCod); + Tst_RemoveCrsTestResults (CrsCod); /***** Remove all tests questions in the course *****/ Tst_RemoveCrsTests (CrsCod); diff --git a/swad_enrollment.c b/swad_enrollment.c index 485ced37..6190c382 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -3751,8 +3751,8 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course * /***** Remove some information about files in course and groups *****/ Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (UsrDat->UsrCod,Crs->CrsCod); - /***** Remove exams made by user in course *****/ - Tst_RemoveExamsMadeByUsrInCrs (UsrDat->UsrCod,Crs->CrsCod); + /***** Remove test results made by user in course *****/ + Tst_RemoveTestResultsMadeByUsrInCrs (UsrDat->UsrCod,Crs->CrsCod); /***** Set all the notifications for this user in this course as removed, except notifications about new messages *****/ diff --git a/swad_global.c b/swad_global.c index a3b3390f..667791af 100644 --- a/swad_global.c +++ b/swad_global.c @@ -395,7 +395,7 @@ void Gbl_InitializeGlobals (void) /* Tests */ Gbl.Test.Config.Pluggable = Tst_PLUGGABLE_UNKNOWN; Gbl.Test.NumQsts = Tst_CONFIG_DEFAULT_DEF_QUESTIONS; - Gbl.Test.AllowTeachers = false; // Must the exam be saved? + Gbl.Test.AllowTeachers = false; // Must the test result be saved? Gbl.Test.AllAnsTypes = false; Gbl.Test.ListAnsTypes[0] = '\0'; diff --git a/swad_global.h b/swad_global.h index 8937218b..613e38c6 100644 --- a/swad_global.h +++ b/swad_global.h @@ -646,10 +646,10 @@ struct Globals } Tags; Tst_AnswerType_t AnswerType; unsigned NumQsts; - long QstCodes[Tst_MAX_QUESTIONS_PER_EXAM]; // Codes of the sent/received questions in a test - char StrIndexesOneQst[Tst_MAX_QUESTIONS_PER_EXAM][Tst_MAX_SIZE_INDEXES_ONE_QST+1]; // 0 1 2 3, 3 0 2 1, etc. - char StrAnswersOneQst[Tst_MAX_QUESTIONS_PER_EXAM][Tst_MAX_SIZE_ANSWERS_ONE_QST+1]; // Answers selected by user - bool AllowTeachers; // Can teachers of this course see the exam? + long QstCodes[Tst_MAX_QUESTIONS_PER_TEST]; // Codes of the sent/received questions in a test + char StrIndexesOneQst[Tst_MAX_QUESTIONS_PER_TEST][Tst_MAX_SIZE_INDEXES_ONE_QST+1]; // 0 1 2 3, 3 0 2 1, etc. + char StrAnswersOneQst[Tst_MAX_QUESTIONS_PER_TEST][Tst_MAX_SIZE_ANSWERS_ONE_QST+1]; // Answers selected by user + bool AllowTeachers; // Can teachers of this course see the test result? bool AllAnsTypes; struct { diff --git a/swad_record.c b/swad_record.c index 01d8ac23..8b7600cc 100644 --- a/swad_record.c +++ b/swad_record.c @@ -2297,7 +2297,7 @@ static void Rec_PutIconsCommands (void) extern const char *Txt_Admin_user; extern const char *Txt_Write_a_message; extern const char *Txt_View_works; - extern const char *Txt_View_exams; + extern const char *Txt_View_test_results; extern const char *Txt_View_attendance; extern const char *Txt_Following_unfollow; extern const char *Txt_Follow; @@ -2368,14 +2368,14 @@ static void Rec_PutIconsCommands (void) /***** Button to view user's test exams *****/ if (ItsMe) - Lay_PutContextualLink (ActSeeMyTstExa,NULL, + Lay_PutContextualLink (ActSeeMyTstRes,NULL, "exam64x64.png", - Txt_View_exams,NULL, + Txt_View_test_results,NULL, NULL); else - Lay_PutContextualLink (ActSeeUsrTstExa,Rec_PutParamsStudent, + Lay_PutContextualLink (ActSeeUsrTstRes,Rec_PutParamsStudent, "exam64x64.png", - Txt_View_exams,NULL, + Txt_View_test_results,NULL, NULL); /***** Button to view user's attendance *****/ diff --git a/swad_test.c b/swad_test.c index c7156249..a29406ee 100644 --- a/swad_test.c +++ b/swad_test.c @@ -85,7 +85,7 @@ const char *Tst_PluggableDB[Tst_NUM_OPTIONS_PLUGGABLE] = "Y", }; -// Feedback to students in exams +// Feedback to students in tests const char *Tst_FeedbackDB[Tst_NUM_TYPES_FEEDBACK] = { "nothing", // No feedback @@ -139,7 +139,7 @@ extern struct Globals Gbl; /***************************** Internal prototypes ***************************/ /*****************************************************************************/ -static void Tst_PutFormToSeeResultsOfUsersTests (Act_Action_t Action); +static void Tst_PutFormToViewResultsOfUsersTests (Act_Action_t Action); static void Tst_GetQuestionsAndAnswersFromForm (void); static void Tst_ShowTstTotalMark (double TotalScore); @@ -148,8 +148,8 @@ static void Tst_SetTstStatus (unsigned NumTst,Tst_Status_t TstStatus); static Tst_Status_t Tst_GetTstStatus (unsigned NumTst); static unsigned Tst_GetNumAccessesTst (void); static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res); -static void Tst_ShowTstResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore); -static void Tst_WriteQstAndAnsExam (unsigned NumQst,long QstCod,MYSQL_ROW row, +static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore); +static void Tst_WriteQstAndAnsTest (unsigned NumQst,long QstCod,MYSQL_ROW row, double *ScoreThisQst,bool *AnswerIsNotBlank); static void Tst_PutFormToEditQstImage (struct Image *Image,int NumImgInForm, const char *ClassContainer, @@ -178,29 +178,29 @@ static Tst_Feedback_t Tst_GetFeedbackTypeFromForm (void); static void Tst_CheckAndCorrectNumbersQst (void); static void Tst_ShowFormAnswerTypes (unsigned NumCols); static unsigned long Tst_GetQuestionsForEdit (MYSQL_RES **mysql_res); -static unsigned long Tst_GetQuestionsForExam (MYSQL_RES **mysql_res); +static unsigned long Tst_GetQuestionsForTest (MYSQL_RES **mysql_res); static void Tst_ListOneQstToEdit (void); static bool Tst_GetOneQuestionByCod (long QstCod,MYSQL_RES **mysql_res); static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *mysql_res); static void Tst_WriteAnswersOfAQstEdit (long QstCod); -static void Tst_WriteAnswersOfAQstSeeExam (unsigned NumQst,long QstCod,bool Shuffle); -static void Tst_WriteAnswersOfAQstAssessExam (unsigned NumQst,long QstCod, +static void Tst_WriteAnswersOfAQstViewTest (unsigned NumQst,long QstCod,bool Shuffle); +static void Tst_WriteAnswersOfAQstAssessTest (unsigned NumQst,long QstCod, double *ScoreThisQst,bool *AnswerIsNotBlank); static void Tst_WriteFormAnsTF (unsigned NumQst); -static void Tst_WriteTFAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, +static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, double *ScoreThisQst,bool *AnswerIsNotBlank); -static void Tst_WriteChoiceAnsSeeExam (unsigned NumQst,long QstCod,bool Shuffle); -static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, +static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle); +static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, double *ScoreThisQst,bool *AnswerIsNotBlank); -static void Tst_WriteTextAnsSeeExam (unsigned NumQst); -static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, +static void Tst_WriteTextAnsViewTest (unsigned NumQst); +static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, double *ScoreThisQst,bool *AnswerIsNotBlank); -static void Tst_WriteIntAnsSeeExam (unsigned NumQst); -static void Tst_WriteIntAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, +static void Tst_WriteIntAnsViewTest (unsigned NumQst); +static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, double *ScoreThisQst,bool *AnswerIsNotBlank); -static void Tst_WriteFloatAnsSeeExam (unsigned NumQst); -static void Tst_WriteFloatAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, +static void Tst_WriteFloatAnsViewTest (unsigned NumQst); +static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, double *ScoreThisQst,bool *AnswerIsNotBlank); static void Tst_WriteHeadUserCorrect (void); static void Tst_WriteScoreStart (unsigned ColSpan); @@ -255,19 +255,19 @@ static unsigned Tst_GetNumTstQuestions (Sco_Scope_t Scope,Tst_AnswerType_t AnsTy static unsigned Tst_GetNumCoursesWithTstQuestions (Sco_Scope_t Scope,Tst_AnswerType_t AnsType); static unsigned Tst_GetNumCoursesWithPluggableTstQuestions (Sco_Scope_t Scope,Tst_AnswerType_t AnsType); -static long Tst_CreateTestExamInDB (void); -static void Tst_StoreScoreOfTestExamInDB (long TstCod, +static long Tst_CreateTestResultInDB (void); +static void Tst_StoreScoreOfTestResultInDB (long TstCod, unsigned NumQstsNotBlank,double Score); static void Tst_ShowHeaderTestResults (void); -static void Tst_ShowResultsOfTestExams (struct UsrData *UsrDat); -static void Tst_ShowDataUsr (struct UsrData *UsrDat,unsigned NumExams); +static void Tst_ShowTestResults (struct UsrData *UsrDat); +static void Tst_ShowDataUsr (struct UsrData *UsrDat,unsigned NumTestResults); static void Tst_PutParamTstCod (long TstCod); static long Tst_GetParamTstCod (void); -static void Tst_ShowExamTstResult (time_t TstTimeUTC); -static void Tst_GetExamDataByTstCod (long TstCod,time_t *TstTimeUTC, - unsigned *NumQsts,unsigned *NumQstsNotBlank,double *Score); -static void Tst_StoreOneExamQstInDB (long TstCod,long QstCod,unsigned NumQst,double Score); -static void Tst_GetExamQuestionsFromDB (long TstCod); +static void Tst_ShowTestResult (time_t TstTimeUTC); +static void Tst_GetTestResultDataByTstCod (long TstCod,time_t *TstTimeUTC, + unsigned *NumQsts,unsigned *NumQstsNotBlank,double *Score); +static void Tst_StoreOneTestResultQstInDB (long TstCod,long QstCod,unsigned NumQst,double Score); +static void Tst_GetTestResultQuestionsFromDB (long TstCod); /*****************************************************************************/ /*************** Show form to generate a self-assessment test ****************/ @@ -279,7 +279,7 @@ void Tst_ShowFormAskTst (void) extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_Take_a_test; extern const char *Txt_No_of_questions; - extern const char *Txt_Generate_exam; + extern const char *Txt_Generate_test; extern const char *Txt_No_test_questions; MYSQL_RES *mysql_res; unsigned long NumRows; @@ -287,15 +287,15 @@ void Tst_ShowFormAskTst (void) /***** Read test configuration from database *****/ Tst_GetConfigTstFromDB (); - /***** Put link to view tests results (exams) *****/ + /***** Put link to view tests results *****/ switch (Gbl.Usrs.Me.LoggedRole) { case Rol_STUDENT: - Tst_PutFormToSeeResultsOfUsersTests (ActReqSeeMyTstExa); + Tst_PutFormToViewResultsOfUsersTests (ActReqSeeMyTstRes); break; case Rol_TEACHER: case Rol_SYS_ADM: - Tst_PutFormToSeeResultsOfUsersTests (ActReqSeeUsrTstExa); + Tst_PutFormToViewResultsOfUsersTests (ActReqSeeUsrTstRes); break; default: break; @@ -340,7 +340,7 @@ void Tst_ShowFormAskTst (void) ""); /***** Send button *****/ - Lay_PutConfirmButton (Txt_Generate_exam); + Lay_PutConfirmButton (Txt_Generate_test); Act_FormEnd (); } } @@ -365,13 +365,13 @@ void Tst_ShowFormAskTst (void) /*************** Write a form to go to result of users' tests ****************/ /*****************************************************************************/ -static void Tst_PutFormToSeeResultsOfUsersTests (Act_Action_t Action) +static void Tst_PutFormToViewResultsOfUsersTests (Act_Action_t Action) { - extern const char *Txt_Results_tests; + extern const char *Txt_Test_results; fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (Action,NULL,"exam64x64.png", - Txt_Results_tests,Txt_Results_tests, + Txt_Test_results,Txt_Test_results, NULL); fprintf (Gbl.F.Out,"
"); } @@ -380,14 +380,14 @@ static void Tst_PutFormToSeeResultsOfUsersTests (Act_Action_t Action) /********************** Generate self-assessment test ************************/ /*****************************************************************************/ -void Tst_ShowNewTestExam (void) +void Tst_ShowNewTest (void) { extern const char *Hlp_ASSESSMENT_Tests; extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_No_questions_found_matching_your_search_criteria; extern const char *Txt_Test; - extern const char *Txt_Allow_teachers_to_consult_this_exam; - extern const char *Txt_Done_assess_exam; + extern const char *Txt_Allow_teachers_to_consult_this_test; + extern const char *Txt_Done_assess_test; MYSQL_RES *mysql_res; unsigned long NumRows; unsigned NumAccessesTst; @@ -401,7 +401,7 @@ void Tst_ShowNewTestExam (void) if (Tst_GetParamsTst ()) // Get parameters from form { /***** Get questions *****/ - if ((NumRows = Tst_GetQuestionsForExam (&mysql_res)) == 0) // Query database + if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database { Lay_ShowAlert (Lay_INFO,Txt_No_questions_found_matching_your_search_criteria); Tst_ShowFormAskTst (); // Show the form again @@ -431,7 +431,7 @@ void Tst_ShowNewTestExam (void) Tst_ShowTestQuestionsWhenSeeing (mysql_res); fprintf (Gbl.F.Out,""); - /***** Exam will be saved? *****/ + /***** Test result will be saved? *****/ fprintf (Gbl.F.Out,"
" "%s" "
", - Txt_Allow_teachers_to_consult_this_exam); + Txt_Allow_teachers_to_consult_this_test); /***** End form *****/ - Lay_PutConfirmButton (Txt_Done_assess_exam); + Lay_PutConfirmButton (Txt_Done_assess_test); Act_FormEnd (); /***** End frame *****/ @@ -469,10 +469,10 @@ void Tst_ShowNewTestExam (void) } /*****************************************************************************/ -/****************************** Assess a test exam ***************************/ +/******************************** Assess a test ******************************/ /*****************************************************************************/ -void Tst_AssessTestExam (void) +void Tst_AssessTest (void) { extern const char *Hlp_ASSESSMENT_Tests; extern const char *Txt_Test_result; @@ -499,15 +499,15 @@ void Tst_AssessTestExam (void) /* Get number of questions */ Tst_GetParamNumQst (); - /***** Get if exam must be saved *****/ + /***** Get if test must be saved *****/ Par_GetParToText ("Save",YN,1); Gbl.Test.AllowTeachers = (Str_ConvertToUpperLetter (YN[0]) == 'Y'); - /***** Get questions and answers from form to assess an exam *****/ + /***** Get questions and answers from form to assess a test *****/ Tst_GetQuestionsAndAnswersFromForm (); - /***** Create new test exam in database to store the result *****/ - TstCod = Tst_CreateTestExamInDB (); + /***** Create new test in database to store the result *****/ + TstCod = Tst_CreateTestResultInDB (); /***** Start frame *****/ Lay_StartRoundFrame (NULL,Txt_Test_result,NULL,Hlp_ASSESSMENT_Tests); @@ -526,7 +526,7 @@ void Tst_AssessTestExam (void) /***** Write answers and solutions *****/ fprintf (Gbl.F.Out,""); - Tst_ShowTstResultAfterAssess (TstCod,&NumQstsNotBlank,&TotalScore); + Tst_ShowTestResultAfterAssess (TstCod,&NumQstsNotBlank,&TotalScore); fprintf (Gbl.F.Out,"
"); /***** Write total mark of test *****/ @@ -537,7 +537,7 @@ void Tst_AssessTestExam (void) Lay_EndRoundFrame (); /***** Store test result in database *****/ - Tst_StoreScoreOfTestExamInDB (TstCod, + Tst_StoreScoreOfTestResultInDB (TstCod, NumQstsNotBlank,TotalScore); /***** Set test status *****/ @@ -557,7 +557,7 @@ void Tst_AssessTestExam (void) } /*****************************************************************************/ -/********** Get questions and answers from form to assess an exam ************/ +/*********** Get questions and answers from form to assess a test ************/ /*****************************************************************************/ static void Tst_GetQuestionsAndAnswersFromForm (void) @@ -588,7 +588,7 @@ static void Tst_GetQuestionsAndAnswersFromForm (void) } /*****************************************************************************/ -/************************ Show total mark of a test exam *********************/ +/************************** Show total mark of a test ************************/ /*****************************************************************************/ static void Tst_ShowTstTotalMark (double TotalScore) @@ -808,17 +808,17 @@ static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res) if ((QstCod = Str_ConvertStrCodToLongCod (row[0])) < 0) Lay_ShowErrorAndExit ("Wrong code of question."); - Tst_WriteQstAndAnsExam (NumQst,QstCod,row, + Tst_WriteQstAndAnsTest (NumQst,QstCod,row, &ScoreThisQst, // Not used here &AnswerIsNotBlank); // Not used here } } /*****************************************************************************/ -/************************ Show test tags in this exam ************************/ +/******************** Show test tags in this test result *********************/ /*****************************************************************************/ -static void Tst_ShowTstTagsPresentInAnExam (long TstCod) +static void Tst_ShowTstTagsPresentInATestResult (long TstCod) { extern const char *Txt_no_tags; char Query[512]; @@ -827,7 +827,7 @@ static void Tst_ShowTstTagsPresentInAnExam (long TstCod) unsigned long NumRows; unsigned long NumRow; - /***** Get all tags of questions in this test exam *****/ + /***** Get all tags of questions in this test *****/ sprintf (Query,"SELECT tst_tags.TagTxt FROM" " (SELECT DISTINCT(tst_question_tags.TagCod)" " FROM tst_question_tags,tst_exam_questions" @@ -837,7 +837,7 @@ static void Tst_ShowTstTagsPresentInAnExam (long TstCod) " WHERE TagsCods.TagCod=tst_tags.TagCod" " ORDER BY tst_tags.TagTxt", TstCod); - if ((NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get tags present in a test exam"))) + if ((NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get tags present in a test result"))) { /***** Write the tags *****/ fprintf (Gbl.F.Out,"