mirror of https://github.com/acanas/swad-core.git
Version19.222.2
This commit is contained in:
parent
a6012dc552
commit
11aedf74b7
|
@ -741,7 +741,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActRemExaQst ] = {1889,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RemoveQstFromSet ,NULL},
|
||||
|
||||
[ActSeeExaPrn ] = {1904,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaPrn_ShowExamPrint ,NULL},
|
||||
[ActReqAssExaPrn ] = {1905,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaPrn_ReceivePrintAnswer ,NULL},
|
||||
[ActAnsExaPrn ] = {1906,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,NULL ,ExaPrn_ReceivePrintAnswer ,NULL},
|
||||
[ActEndExaPrn ] = {1905,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaPrn_EndPrintAnswer ,NULL},
|
||||
|
||||
[ActSeeGam ] = {1650,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeOneGame ,NULL},
|
||||
|
||||
|
@ -3725,7 +3726,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActEdiOneExaEvt, // #1902
|
||||
ActChgExaEvt, // #1903
|
||||
ActSeeExaPrn, // #1904
|
||||
ActReqAssExaPrn, // #1905
|
||||
ActEndExaPrn, // #1905
|
||||
ActAnsExaPrn, // #1906
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
141
swad_action.h
141
swad_action.h
|
@ -64,7 +64,7 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_MAX_ACTION_COD 1905
|
||||
#define Act_MAX_ACTION_COD 1906
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -705,83 +705,84 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActRemExaQst (ActChgCrsTT1stDay + 175)
|
||||
|
||||
#define ActSeeExaPrn (ActChgCrsTT1stDay + 176)
|
||||
#define ActReqAssExaPrn (ActChgCrsTT1stDay + 177)
|
||||
#define ActAnsExaPrn (ActChgCrsTT1stDay + 177)
|
||||
#define ActEndExaPrn (ActChgCrsTT1stDay + 178)
|
||||
|
||||
#define ActSeeGam (ActChgCrsTT1stDay + 178)
|
||||
#define ActReqRemMch (ActChgCrsTT1stDay + 179)
|
||||
#define ActRemMch (ActChgCrsTT1stDay + 180)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 181)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 182)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 183)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 184)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 185)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 188)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 189)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 190)
|
||||
#define ActSeeGam (ActChgCrsTT1stDay + 179)
|
||||
#define ActReqRemMch (ActChgCrsTT1stDay + 180)
|
||||
#define ActRemMch (ActChgCrsTT1stDay + 181)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 182)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 183)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 184)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 185)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 188)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 189)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 190)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 191)
|
||||
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 191)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 192)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 193)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 194)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 195)
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 192)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 193)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 194)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 195)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 196)
|
||||
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 196)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 197)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 198)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 199)
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 197)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 198)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 199)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 200)
|
||||
|
||||
#define ActReqSeeAllMchRes (ActChgCrsTT1stDay + 200)
|
||||
#define ActSeeAllMchResCrs (ActChgCrsTT1stDay + 201)
|
||||
#define ActSeeAllMchResGam (ActChgCrsTT1stDay + 202)
|
||||
#define ActSeeAllMchResMch (ActChgCrsTT1stDay + 203)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 204)
|
||||
#define ActReqSeeAllMchRes (ActChgCrsTT1stDay + 201)
|
||||
#define ActSeeAllMchResCrs (ActChgCrsTT1stDay + 202)
|
||||
#define ActSeeAllMchResGam (ActChgCrsTT1stDay + 203)
|
||||
#define ActSeeAllMchResMch (ActChgCrsTT1stDay + 204)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 205)
|
||||
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 205)
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 206)
|
||||
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 206)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 207)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 208)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 209)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 210)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 211)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 212)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 213)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 214)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 215)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 216)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 217)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 218)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 219)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 220)
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 207)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 208)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 209)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 210)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 211)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 212)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 213)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 214)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 215)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 216)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 217)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 218)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 219)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 220)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 221)
|
||||
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 221)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 222)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 223)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 224)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 225)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 226)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 227)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 228)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 229)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 230)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 231)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 233)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 234)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 235)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 236)
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 222)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 223)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 224)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 225)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 226)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 227)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 228)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 229)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 230)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 231)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 233)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 234)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 235)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 236)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 237)
|
||||
|
||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 237)
|
||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 238)
|
||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 239)
|
||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 240)
|
||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 241)
|
||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 242)
|
||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 243)
|
||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 244)
|
||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 245)
|
||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 238)
|
||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 239)
|
||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 240)
|
||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 241)
|
||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 242)
|
||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 243)
|
||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 244)
|
||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 245)
|
||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 246)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
|
|
|
@ -548,10 +548,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.222.1 (2020-05-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.222.2 (2020-05-10)"
|
||||
#define CSS_FILE "swad19.217.css"
|
||||
#define JS_FILE "swad19.193.1.js"
|
||||
/*
|
||||
Version 19.222.2: May 10, 2020 Fixed bugs in exams. (302852 lines)
|
||||
Version 19.222.1: May 10, 2020 Code refactoring in exam prints. (302794 lines)
|
||||
Version 19.222: May 10, 2020 Changes in exam prints. (302787 lines)
|
||||
Version 19.221: May 09, 2020 Changes in exam prints. (302686 lines)
|
||||
|
|
|
@ -1691,13 +1691,16 @@ void ExaEvt_ReceiveFormEvent (void)
|
|||
|
||||
/***** Get event data from database *****/
|
||||
if (ItsANewEvent)
|
||||
{
|
||||
/* Initialize to empty event */
|
||||
ExaEvt_ResetEvent (&Event);
|
||||
Event.ExaCod = Exam.ExaCod;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Get event data from database */
|
||||
ExaEvt_GetDataOfEventByCod (&Event);
|
||||
if (Exam.ExaCod != Event.ExaCod)
|
||||
if (Event.ExaCod != Exam.ExaCod)
|
||||
Lay_WrongExamExit ();
|
||||
Exams.EvtCod = Event.EvtCod;
|
||||
}
|
||||
|
|
|
@ -169,20 +169,22 @@ void ExaPrn_ShowExamPrint (void)
|
|||
ExaEvt_GetAndCheckParameters (&Exams,&Exam,&Event);
|
||||
|
||||
/***** Get print data from database *****/
|
||||
Print.ExaCod = Event.ExaCod;
|
||||
Print.EvtCod = Event.EvtCod;
|
||||
Print.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
ExaPrn_GetPrintDataByEvtCodAndUsrCod (&Print);
|
||||
Print.ExaCod = Event.ExaCod;
|
||||
|
||||
if (Print.PrnCod > 0) // Print exists
|
||||
{
|
||||
Ale_ShowAlert (Ale_INFO,"El examen ya existe.");
|
||||
Ale_ShowAlert (Ale_INFO,"Examen existente.");
|
||||
|
||||
/***** Get questions and answers from database *****/
|
||||
ExaPrn_GetPrintQuestionsFromDB (&Print);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ale_ShowAlert (Ale_INFO,"Examen nuevo.");
|
||||
|
||||
/***** Get questions from database *****/
|
||||
ExaPrn_GetQuestionsForNewPrintFromDB (&Print);
|
||||
|
||||
|
@ -279,6 +281,8 @@ static void ExaPrn_GetQuestionsForNewPrintFromDB (struct ExaPrn_Print *Print)
|
|||
" ORDER BY SetInd",
|
||||
Print->ExaCod);
|
||||
|
||||
Ale_ShowAlert (Ale_INFO,"%u conjuntos de preguntas.",NumSets); // TODO: Remove this. Only for debug purpose.
|
||||
|
||||
/***** Get questions from all sets *****/
|
||||
Print->NumQsts = 0;
|
||||
if (NumSets)
|
||||
|
@ -576,7 +580,6 @@ static void ExaPrn_ShowExamPrintToFillIt (const char *Title,
|
|||
struct ExaPrn_Print *Print)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Exams;
|
||||
extern const char *Txt_Send;
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Title,
|
||||
|
@ -590,14 +593,14 @@ static void ExaPrn_ShowExamPrintToFillIt (const char *Title,
|
|||
if (Print->NumQsts)
|
||||
{
|
||||
/***** Begin form *****/
|
||||
Frm_StartForm (ActReqAssExaPrn);
|
||||
Frm_StartForm (ActEndExaPrn);
|
||||
ExaPrn_PutParamPrnCod (Print->PrnCod);
|
||||
|
||||
/***** Show table with questions to answer *****/
|
||||
ExaPrn_ShowTableWithQstsToFill (Print);
|
||||
|
||||
/***** Send button and end form *****/
|
||||
Btn_PutCreateButton (Txt_Send);
|
||||
Btn_PutCreateButton ("He terminado"); // TODO: Translate!!!
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -753,7 +756,7 @@ static void ExaPrn_WriteIntAnsSeeing (const struct ExaPrn_Print *Print,
|
|||
"Ans%010u",
|
||||
NumQst);
|
||||
HTM_INPUT_TEXT (StrAns,11,Print->PrintedQuestions[NumQst].StrAnswers,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"11\"");
|
||||
}
|
||||
|
||||
|
@ -904,6 +907,15 @@ void ExaPrn_ReceivePrintAnswer (void)
|
|||
Ale_ShowAlert (Ale_INFO,"Recepción del examen contestado.");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Receive answer to an exam print **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ExaPrn_EndPrintAnswer (void)
|
||||
{
|
||||
Ale_ShowAlert (Ale_INFO,"Terminar de contestar el examen.");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Write parameter with code of exam print *******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -39,5 +39,6 @@ void ExaPrn_ShowExamPrint (void);
|
|||
|
||||
void ExaPrn_ReceivePrintAnswer (void);
|
||||
|
||||
void ExaPrn_EndPrintAnswer (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1919,7 +1919,7 @@ static void ExaSet_PutIconToAddNewQuestions (void *Exams)
|
|||
|
||||
/***** Put form to create a new question *****/
|
||||
Ico_PutContextualIconToAdd (ActReqAddQstExaSet,NULL,
|
||||
Exa_PutParams,Exams,
|
||||
ExaSet_PutParamsOneSet,Exams,
|
||||
Txt_Add_questions);
|
||||
}
|
||||
|
||||
|
|
|
@ -11190,6 +11190,48 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActAnsExaPrn] =
|
||||
#if L==1 // ca
|
||||
"" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Answer exam print"
|
||||
#elif L==4 // es
|
||||
"Responder impresión de examen"
|
||||
#elif L==5 // fr
|
||||
"" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActEndExaPrn] =
|
||||
#if L==1 // ca
|
||||
"" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"End exam print"
|
||||
#elif L==4 // es
|
||||
"Finalizar impresión de examen"
|
||||
#elif L==5 // fr
|
||||
"" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActSeeGam] =
|
||||
|
|
Loading…
Reference in New Issue