mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-04 07:45:27 +02:00
Version19.12.4
This commit is contained in:
parent
4b27ee2917
commit
9ce04864ca
|
@ -470,10 +470,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.12.3 (2019-09-24)"
|
#define Log_PLATFORM_VERSION "SWAD 19.12.4 (2019-09-24)"
|
||||||
#define CSS_FILE "swad19.3.css"
|
#define CSS_FILE "swad19.3.css"
|
||||||
#define JS_FILE "swad18.130.2.js"
|
#define JS_FILE "swad18.130.2.js"
|
||||||
/*
|
/*
|
||||||
|
Version 19.12.4: Sep 24, 2019 Fixed bug in edition of games. (245963 lines)
|
||||||
Version 19.12.3: Sep 24, 2019 View matches results. Not finished. (245979 lines)
|
Version 19.12.3: Sep 24, 2019 View matches results. Not finished. (245979 lines)
|
||||||
Version 19.12.2: Sep 24, 2019 View matches results. Not finished. (245977 lines)
|
Version 19.12.2: Sep 24, 2019 View matches results. Not finished. (245977 lines)
|
||||||
Version 19.12.1: Sep 24, 2019 View matches results. Not finished. (245987 lines)
|
Version 19.12.1: Sep 24, 2019 View matches results. Not finished. (245987 lines)
|
||||||
|
|
10
swad_game.c
10
swad_game.c
|
@ -1554,13 +1554,6 @@ static void Gam_ListGameQuestions (struct Game *Game)
|
||||||
unsigned NumQsts;
|
unsigned NumQsts;
|
||||||
bool Editing = (Gbl.Action.Act == ActEdiOneGam ||
|
bool Editing = (Gbl.Action.Act == ActEdiOneGam ||
|
||||||
Gbl.Action.Act == ActAddOneGamQst); // TODO: Ampliar casos en los que se está editando para que se muestre el botón de Añadir preguntas
|
Gbl.Action.Act == ActAddOneGamQst); // TODO: Ampliar casos en los que se está editando para que se muestre el botón de Añadir preguntas
|
||||||
// Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions;
|
|
||||||
|
|
||||||
/***** How to show the questions ******/
|
|
||||||
// if (Editing)
|
|
||||||
// ActionToDoWithQuestions = Tst_SHOW_GAME_RESULT;
|
|
||||||
//else
|
|
||||||
// ActionToDoWithQuestions = Tst_SHOW_GAME_TO_ANSWER;
|
|
||||||
|
|
||||||
/***** Get data of questions from database *****/
|
/***** Get data of questions from database *****/
|
||||||
NumQsts = (unsigned) DB_QuerySELECT (&mysql_res,"can not get data of a question",
|
NumQsts = (unsigned) DB_QuerySELECT (&mysql_res,"can not get data of a question",
|
||||||
|
@ -1764,8 +1757,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
|
||||||
Tst_WriteQstFeedback (row[4],"TEST_EDI_LIGHT");
|
Tst_WriteQstFeedback (row[4],"TEST_EDI_LIGHT");
|
||||||
|
|
||||||
/* Show answers */
|
/* Show answers */
|
||||||
Tst_WriteAnswersMatchResult (-1L,QstInd,QstCod,
|
Tst_WriteAnswersEdit (Gbl.Test.QstCod);
|
||||||
"TEST_EDI",false); // Don't show result
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
|
@ -3494,7 +3494,7 @@ void Mch_ShowOneMchResult (void)
|
||||||
Txt_out_of_PART_OF_A_SCORE,Tst_SCORE_MAX);
|
Txt_out_of_PART_OF_A_SCORE,Tst_SCORE_MAX);
|
||||||
|
|
||||||
/***** Write answers and solutions *****/
|
/***** Write answers and solutions *****/
|
||||||
Tst_ShowTestResult (NumQsts,TimeUTC[Dat_START_TIME]);
|
Tst_ShowTestResult (UsrDat,NumQsts,TimeUTC[Dat_START_TIME]);
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
|
|
38
swad_test.c
38
swad_test.c
|
@ -157,7 +157,7 @@ static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res);
|
||||||
static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore);
|
static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore);
|
||||||
static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
|
static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
|
||||||
struct UsrData *UsrDat,
|
struct UsrData *UsrDat,
|
||||||
long MchCod,unsigned NumQst,long QstCod,MYSQL_ROW row,
|
unsigned NumQst,long QstCod,MYSQL_ROW row,
|
||||||
double *ScoreThisQst,bool *AnswerIsNotBlank);
|
double *ScoreThisQst,bool *AnswerIsNotBlank);
|
||||||
static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
||||||
bool OptionsDisabled);
|
bool OptionsDisabled);
|
||||||
|
@ -193,7 +193,6 @@ static void Tst_ListOneOrMoreQuestionsForSelection (long GamCod,
|
||||||
unsigned long NumRows,
|
unsigned long NumRows,
|
||||||
MYSQL_RES *mysql_res);
|
MYSQL_RES *mysql_res);
|
||||||
|
|
||||||
static void Tst_WriteAnswersEdit (long QstCod);
|
|
||||||
static void Tst_WriteAnswersTestToAnswer (unsigned NumQst,long QstCod,bool Shuffle);
|
static void Tst_WriteAnswersTestToAnswer (unsigned NumQst,long QstCod,bool Shuffle);
|
||||||
static void Tst_WriteAnswersTestResult (struct UsrData *UsrDat,
|
static void Tst_WriteAnswersTestResult (struct UsrData *UsrDat,
|
||||||
unsigned NumQst,long QstCod,
|
unsigned NumQst,long QstCod,
|
||||||
|
@ -861,7 +860,7 @@ static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res)
|
||||||
|
|
||||||
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_TO_ANSWER,
|
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_TO_ANSWER,
|
||||||
&Gbl.Usrs.Me.UsrDat,
|
&Gbl.Usrs.Me.UsrDat,
|
||||||
-1L,NumQst,QstCod,row,
|
NumQst,QstCod,row,
|
||||||
&ScoreThisQst, // Not used here
|
&ScoreThisQst, // Not used here
|
||||||
&AnswerIsNotBlank); // Not used here
|
&AnswerIsNotBlank); // Not used here
|
||||||
}
|
}
|
||||||
|
@ -963,7 +962,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank
|
||||||
/***** Write question and answers *****/
|
/***** Write question and answers *****/
|
||||||
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
|
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
|
||||||
&Gbl.Usrs.Me.UsrDat,
|
&Gbl.Usrs.Me.UsrDat,
|
||||||
-1L,NumQst,QstCod,row,
|
NumQst,QstCod,row,
|
||||||
&ScoreThisQst,&AnswerIsNotBlank);
|
&ScoreThisQst,&AnswerIsNotBlank);
|
||||||
|
|
||||||
/***** Store test result question in database *****/
|
/***** Store test result question in database *****/
|
||||||
|
@ -1004,7 +1003,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank
|
||||||
|
|
||||||
static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
|
static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
|
||||||
struct UsrData *UsrDat,
|
struct UsrData *UsrDat,
|
||||||
long MchCod,unsigned NumQst,long QstCod,MYSQL_ROW row,
|
unsigned NumQst,long QstCod,MYSQL_ROW row,
|
||||||
double *ScoreThisQst,bool *AnswerIsNotBlank)
|
double *ScoreThisQst,bool *AnswerIsNotBlank)
|
||||||
{
|
{
|
||||||
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
|
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
|
||||||
|
@ -1063,17 +1062,7 @@ static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWith
|
||||||
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
|
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
|
||||||
Tst_WriteQstFeedback (row[5],"TEST_EXA_LIGHT");
|
Tst_WriteQstFeedback (row[5],"TEST_EXA_LIGHT");
|
||||||
break;
|
break;
|
||||||
case Tst_EDIT_TEST:
|
default:
|
||||||
break;
|
|
||||||
case Tst_SELECT_QUESTIONS_FOR_GAME:
|
|
||||||
break;
|
|
||||||
case Tst_SHOW_GAME_TO_ANSWER:
|
|
||||||
Tst_WriteAnswersMatchResult (MchCod,NumQst,QstCod,
|
|
||||||
"MATCH_QST",false); // Don't show result
|
|
||||||
break;
|
|
||||||
case Tst_SHOW_GAME_RESULT:
|
|
||||||
Tst_WriteAnswersMatchResult (MchCod,NumQst,QstCod,
|
|
||||||
"MATCH_QST",true); // Show result
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
@ -3327,7 +3316,7 @@ void Tst_GetCorrectAnswersFromDB (long QstCod)
|
||||||
/**************** Get and write the answers of a test question ***************/
|
/**************** Get and write the answers of a test question ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Tst_WriteAnswersEdit (long QstCod)
|
void Tst_WriteAnswersEdit (long QstCod)
|
||||||
{
|
{
|
||||||
extern const char *Txt_TST_Answer_given_by_the_teachers;
|
extern const char *Txt_TST_Answer_given_by_the_teachers;
|
||||||
unsigned NumOpt;
|
unsigned NumOpt;
|
||||||
|
@ -8200,7 +8189,8 @@ void Tst_ShowOneTstResult (void)
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
/***** Write answers and solutions *****/
|
/***** Write answers and solutions *****/
|
||||||
Tst_ShowTestResult (Gbl.Test.NumQsts,TstTimeUTC);
|
Tst_ShowTestResult (&Gbl.Usrs.Other.UsrDat,
|
||||||
|
Gbl.Test.NumQsts,TstTimeUTC);
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
|
@ -8220,7 +8210,8 @@ void Tst_ShowOneTstResult (void)
|
||||||
/************************* Show the result of a test *************************/
|
/************************* Show the result of a test *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Tst_ShowTestResult (unsigned NumQsts,time_t TstTimeUTC)
|
void Tst_ShowTestResult (struct UsrData *UsrDat,
|
||||||
|
unsigned NumQsts,time_t TstTimeUTC)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Question_modified;
|
extern const char *Txt_Question_modified;
|
||||||
extern const char *Txt_Question_removed;
|
extern const char *Txt_Question_removed;
|
||||||
|
@ -8260,9 +8251,8 @@ void Tst_ShowTestResult (unsigned NumQsts,time_t TstTimeUTC)
|
||||||
==> don't show question ****/
|
==> don't show question ****/
|
||||||
EditTimeUTC = Dat_GetUNIXTimeFromStr (row[1]);
|
EditTimeUTC = Dat_GetUNIXTimeFromStr (row[1]);
|
||||||
ThisQuestionHasBeenEdited = false;
|
ThisQuestionHasBeenEdited = false;
|
||||||
// if (TstTimeUTC)
|
if (EditTimeUTC > TstTimeUTC)
|
||||||
if (EditTimeUTC > TstTimeUTC)
|
ThisQuestionHasBeenEdited = true;
|
||||||
ThisQuestionHasBeenEdited = true;
|
|
||||||
|
|
||||||
if (ThisQuestionHasBeenEdited)
|
if (ThisQuestionHasBeenEdited)
|
||||||
/***** Question has been edited *****/
|
/***** Question has been edited *****/
|
||||||
|
@ -8284,8 +8274,8 @@ void Tst_ShowTestResult (unsigned NumQsts,time_t TstTimeUTC)
|
||||||
|
|
||||||
/***** Write questions and answers *****/
|
/***** Write questions and answers *****/
|
||||||
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
|
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
|
||||||
&Gbl.Usrs.Other.UsrDat,
|
UsrDat,
|
||||||
-1L,NumQst,QstCod,row,
|
NumQst,QstCod,row,
|
||||||
&ScoreThisQst, // Not used here
|
&ScoreThisQst, // Not used here
|
||||||
&AnswerIsNotBlank); // Not used here
|
&AnswerIsNotBlank); // Not used here
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,6 @@ typedef enum
|
||||||
Tst_SHOW_TEST_RESULT, // Showing the assessment of a test
|
Tst_SHOW_TEST_RESULT, // Showing the assessment of a test
|
||||||
Tst_EDIT_TEST, // Editing test questions
|
Tst_EDIT_TEST, // Editing test questions
|
||||||
Tst_SELECT_QUESTIONS_FOR_GAME, // Selecting test questions for a game
|
Tst_SELECT_QUESTIONS_FOR_GAME, // Selecting test questions for a game
|
||||||
Tst_SHOW_GAME_TO_ANSWER, // Showing a game to a student
|
|
||||||
Tst_SHOW_GAME_RESULT, // Showing the assessment of a game
|
|
||||||
} Tst_ActionToDoWithQuestions_t;
|
} Tst_ActionToDoWithQuestions_t;
|
||||||
|
|
||||||
#define Tst_NUM_TYPES_FEEDBACK 5
|
#define Tst_NUM_TYPES_FEEDBACK 5
|
||||||
|
@ -156,6 +154,7 @@ void Tst_WriteParamEditQst (void);
|
||||||
unsigned Tst_GetNumAnswersQst (long QstCod);
|
unsigned Tst_GetNumAnswersQst (long QstCod);
|
||||||
unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle);
|
unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle);
|
||||||
void Tst_GetCorrectAnswersFromDB (long QstCod);
|
void Tst_GetCorrectAnswersFromDB (long QstCod);
|
||||||
|
void Tst_WriteAnswersEdit (long QstCod);
|
||||||
void Tst_WriteAnswersMatchResult (long MchCod,unsigned QstInd,long QstCod,
|
void Tst_WriteAnswersMatchResult (long MchCod,unsigned QstInd,long QstCod,
|
||||||
const char *Class,bool ShowResult);
|
const char *Class,bool ShowResult);
|
||||||
bool Tst_CheckIfQuestionIsValidForGame (long QstCod);
|
bool Tst_CheckIfQuestionIsValidForGame (long QstCod);
|
||||||
|
@ -212,7 +211,8 @@ void Tst_SelDatesToSeeMyTstResults (void);
|
||||||
void Tst_ShowMyTstResults (void);
|
void Tst_ShowMyTstResults (void);
|
||||||
void Tst_ShowUsrsTstResults (void);
|
void Tst_ShowUsrsTstResults (void);
|
||||||
void Tst_ShowOneTstResult (void);
|
void Tst_ShowOneTstResult (void);
|
||||||
void Tst_ShowTestResult (unsigned NumQsts,time_t TstTimeUTC);
|
void Tst_ShowTestResult (struct UsrData *UsrDat,
|
||||||
|
unsigned NumQsts,time_t TstTimeUTC);
|
||||||
void Tst_RemoveTestResultsMadeByUsrInAllCrss (long UsrCod);
|
void Tst_RemoveTestResultsMadeByUsrInAllCrss (long UsrCod);
|
||||||
void Tst_RemoveTestResultsMadeByUsrInCrs (long UsrCod,long CrsCod);
|
void Tst_RemoveTestResultsMadeByUsrInCrs (long UsrCod,long CrsCod);
|
||||||
void Tst_RemoveCrsTestResults (long CrsCod);
|
void Tst_RemoveCrsTestResults (long CrsCod);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user