Version19.7.1

This commit is contained in:
Antonio Cañas Vargas 2019-09-18 23:49:07 +02:00
parent c1268b2f90
commit 8d53450993
8 changed files with 142 additions and 17 deletions

View File

@ -2152,7 +2152,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqSeeMyTstRes */{1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL}, /* ActReqSeeMyTstRes */{1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL},
/* ActSeeMyTstRes */{1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowMyTestResults ,NULL}, /* ActSeeMyTstRes */{1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowMyTestResults ,NULL},
/* ActSeeOneTstResMe */{1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneTstResMe */{1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL},
/* ActReqSeeUsrTstRes*/{1080,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelUsrsToSeeUsrsTestResults,NULL}, /* ActReqSeeUsrTstRes*/{1080,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelUsrsToViewUsrsTstResults,NULL},
/* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowUsrsTestResults ,NULL}, /* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowUsrsTestResults ,NULL},
/* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL},
@ -2178,7 +2178,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqSeeMyMchRes */{1795,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL}, /* ActReqSeeMyMchRes */{1795,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelDatesToSeeMyTestResults ,NULL},
/* ActSeeMyMchRes */{1796,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowMyTestResults ,NULL}, /* ActSeeMyMchRes */{1796,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowMyTestResults ,NULL},
/* ActSeeOneMchResMe */{1797,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneMchResMe */{1797,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL},
/* ActReqSeeUsrMchRes*/{1798,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Tst_SelUsrsToSeeUsrsTestResults,NULL}, /* ActReqSeeUsrMchRes*/{1798,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Mch_SelUsrsToViewUsrsMchResults,NULL},
/* ActSeeUsrMchRes */{1799,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowUsrsTestResults ,NULL}, /* ActSeeUsrMchRes */{1799,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowUsrsTestResults ,NULL},
/* ActSeeOneMchResOth*/{1800,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL}, /* ActSeeOneMchResOth*/{1800,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL},

View File

@ -462,11 +462,12 @@ 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.7 (2019-09-18)" #define Log_PLATFORM_VERSION "SWAD 19.7.1 (2019-09-18)"
#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.7: Sep 17, 2019 New actions to see the matches results. (244664 lines) Version 19.7.1: Sep 17, 2019 Users' selection to view the matches results. (244768 lines)
Version 19.7: Sep 17, 2019 New actions to view the matches results. (244664 lines)
6 changes necessary in database: 6 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1795','es','N','Seleccionar fechas para mis result. partidas'); INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1795','es','N','Seleccionar fechas para mis result. partidas');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1796','es','N','Ver mis resultados de partidas'); INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1796','es','N','Ver mis resultados de partidas');

View File

@ -160,12 +160,12 @@ static void Gam_ListAllGames (void)
switch (Gbl.Usrs.Me.Role.Logged) switch (Gbl.Usrs.Me.Role.Logged)
{ {
case Rol_STD: case Rol_STD:
Mch_PutFormToViewResultsOfMatches (ActReqSeeMyMchRes); Mch_PutFormToViewMchResults (ActReqSeeMyMchRes);
break; break;
case Rol_NET: case Rol_NET:
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
Mch_PutFormToViewResultsOfMatches (ActReqSeeUsrMchRes); Mch_PutFormToViewMchResults (ActReqSeeUsrMchRes);
break; break;
default: default:
break; break;

View File

@ -2442,7 +2442,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs
/****************** Write a form to go to result of matches ******************/ /****************** Write a form to go to result of matches ******************/
/*****************************************************************************/ /*****************************************************************************/
void Mch_PutFormToViewResultsOfMatches (Act_Action_t Action) void Mch_PutFormToViewMchResults (Act_Action_t Action)
{ {
extern const char *Txt_Results; extern const char *Txt_Results;
@ -2452,3 +2452,105 @@ void Mch_PutFormToViewResultsOfMatches (Act_Action_t Action)
Txt_Results); Txt_Results);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
/*****************************************************************************/
/*********** Select users and dates to show their matches results ************/
/*****************************************************************************/
void Mch_SelUsrsToViewUsrsMchResults (void)
{
extern const char *Hlp_ASSESSMENT_Tests_results; // TODO: Change to matches results
extern const char *The_ClassFormInBox[The_NUM_THEMES];
extern const char *Txt_Results;
extern const char *Txt_Users;
extern const char *Txt_View_matches_results;
unsigned NumTotalUsrs;
/***** Get and update type of list,
number of columns in class photo
and preference about viewing photos *****/
Usr_GetAndUpdatePrefsAboutUsrList ();
/***** Get groups to show ******/
Grp_GetParCodsSeveralGrpsToShowUsrs ();
/***** Get and order lists of users from this course *****/
Usr_GetListUsrs (Hie_CRS,Rol_STD);
Usr_GetListUsrs (Hie_CRS,Rol_NET);
Usr_GetListUsrs (Hie_CRS,Rol_TCH);
NumTotalUsrs = Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_NET].NumUsrs +
Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs;
/***** Start box *****/
Box_StartBox (NULL,Txt_Results,NULL,
Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE);
/***** Show form to select the groups *****/
Grp_ShowFormToSelectSeveralGroups (NULL,
Grp_ONLY_MY_GROUPS);
/***** Start section with user list *****/
Lay_StartSection (Usr_USER_LIST_SECTION_ID);
if (NumTotalUsrs)
{
if (Usr_GetIfShowBigList (NumTotalUsrs,NULL,NULL))
{
/***** Form to select type of list used for select several users *****/
Usr_ShowFormsToSelectUsrListType (NULL);
/***** Start form *****/
Frm_StartForm (ActSeeUsrMchRes);
Grp_PutParamsCodGrps ();
/***** Put list of users to select some of them *****/
Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
"<td colspan=\"2\" class=\"%s LEFT_TOP\">",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users,
The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartTable (2);
Usr_ListUsersToSelect (Rol_TCH);
Usr_ListUsersToSelect (Rol_NET);
Usr_ListUsersToSelect (Rol_STD);
Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Starting and ending dates in the search *****/
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (false);
Tbl_EndTable ();
/***** Send button *****/
Btn_PutConfirmButton (Txt_View_matches_results);
/***** End form *****/
Frm_EndForm ();
}
}
else // NumTotalUsrs == 0
/***** Show warning indicating no students found *****/
Usr_ShowWarningNoUsersFound (Rol_UNK);
/***** End section with user list *****/
Lay_EndSection ();
/***** End box *****/
Box_EndBox ();
/***** Free memory for users' list *****/
Usr_FreeUsrsList (Rol_TCH);
Usr_FreeUsrsList (Rol_NET);
Usr_FreeUsrsList (Rol_STD);
/***** Free memory used by list of selected users' codes *****/
Usr_FreeListsSelectedUsrsCods ();
/***** Free memory for list of selected groups *****/
Grp_FreeListCodSelectedGrps ();
}

View File

@ -67,6 +67,7 @@ void Mch_GetAndDrawBarNumUsrsWhoHaveChosenAns (long MchCod,unsigned QstInd,unsig
unsigned NumAnswerersQst,bool Correct); unsigned NumAnswerersQst,bool Correct);
unsigned Mch_GetNumUsrsWhoHaveAnswerQst (long MchCod,unsigned QstInd); unsigned Mch_GetNumUsrsWhoHaveAnswerQst (long MchCod,unsigned QstInd);
void Mch_PutFormToViewResultsOfMatches (Act_Action_t Action); void Mch_PutFormToViewMchResults (Act_Action_t Action);
void Mch_SelUsrsToViewUsrsMchResults (void);
#endif #endif

View File

@ -146,7 +146,7 @@ extern struct Globals Gbl;
/***************************** Internal prototypes ***************************/ /***************************** Internal prototypes ***************************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_PutFormToViewResultsOfUsersTests (Act_Action_t Action); static void Tst_PutFormToViewTstResults (Act_Action_t Action);
static void Tst_GetQuestionsAndAnswersFromForm (void); static void Tst_GetQuestionsAndAnswersFromForm (void);
static void Tst_ShowTstTotalMark (double TotalScore); static void Tst_ShowTstTotalMark (double TotalScore);
@ -327,12 +327,12 @@ void Tst_ShowFormAskTst (void)
switch (Gbl.Usrs.Me.Role.Logged) switch (Gbl.Usrs.Me.Role.Logged)
{ {
case Rol_STD: case Rol_STD:
Tst_PutFormToViewResultsOfUsersTests (ActReqSeeMyTstRes); Tst_PutFormToViewTstResults (ActReqSeeMyTstRes);
break; break;
case Rol_NET: case Rol_NET:
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
Tst_PutFormToViewResultsOfUsersTests (ActReqSeeUsrTstRes); Tst_PutFormToViewTstResults (ActReqSeeUsrTstRes);
break; break;
default: default:
break; break;
@ -407,7 +407,7 @@ void Tst_ShowFormAskTst (void)
/*************** Write a form to go to result of users' tests ****************/ /*************** Write a form to go to result of users' tests ****************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_PutFormToViewResultsOfUsersTests (Act_Action_t Action) static void Tst_PutFormToViewTstResults (Act_Action_t Action)
{ {
extern const char *Txt_Results; extern const char *Txt_Results;
@ -7316,7 +7316,7 @@ static unsigned Tst_GetNumCoursesWithPluggableTstQuestions (Hie_Level_t Scope,Ts
/************ Select users and dates to show their test results **************/ /************ Select users and dates to show their test results **************/
/*****************************************************************************/ /*****************************************************************************/
void Tst_SelUsrsToSeeUsrsTestResults (void) void Tst_SelUsrsToViewUsrsTstResults (void)
{ {
extern const char *Hlp_ASSESSMENT_Tests_results; extern const char *Hlp_ASSESSMENT_Tests_results;
extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_ClassFormInBox[The_NUM_THEMES];
@ -7525,7 +7525,7 @@ void Tst_ShowUsrsTestResults (void)
// ...write warning alert // ...write warning alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
// ...and show again the form // ...and show again the form
Tst_SelUsrsToSeeUsrsTestResults (); Tst_SelUsrsToViewUsrsTstResults ();
} }
/***** Free memory used by list of selected users' codes *****/ /***** Free memory used by list of selected users' codes *****/

View File

@ -195,7 +195,7 @@ void Tst_FreeTagsList (void);
void Tst_GetTestStats (Tst_AnswerType_t AnsType,struct Tst_Stats *Stats); void Tst_GetTestStats (Tst_AnswerType_t AnsType,struct Tst_Stats *Stats);
void Tst_SelUsrsToSeeUsrsTestResults (void); void Tst_SelUsrsToViewUsrsTstResults (void);
void Tst_SelDatesToSeeMyTestResults (void); void Tst_SelDatesToSeeMyTestResults (void);
void Tst_ShowUsrsTestResults (void); void Tst_ShowUsrsTestResults (void);
void Tst_ShowMyTestResults (void); void Tst_ShowMyTestResults (void);

View File

@ -52682,6 +52682,27 @@ const char *Txt_View_in_a_new_window =
"Ver em uma nova janela"; "Ver em uma nova janela";
#endif #endif
const char *Txt_View_matches_results =
#if L==1 // ca
"Veure resultats de partides";
#elif L==2 // de
"Siehe Spielergebnisse";
#elif L==3 // en
"View matches results";
#elif L==4 // es
"Ver resultados de partidas";
#elif L==5 // fr
"Voir r&eacute;sultats de matchs";
#elif L==6 // gn
"Ver resultados de partidas"; // Okoteve traducción
#elif L==7 // it
"Vedi risultati delle partite";
#elif L==8 // pl
"Zobacz wyniki mecze";
#elif L==9 // pt
"Ver resultados de partidas";
#endif
const char *Txt_View_record_and_office_hours = const char *Txt_View_record_and_office_hours =
#if L==1 // ca #if L==1 // ca
"Veure fitxa i horari de tutories"; "Veure fitxa i horari de tutories";
@ -52837,11 +52858,11 @@ const char *Txt_View_test_results =
#elif L==3 // en #elif L==3 // en
"View test results"; "View test results";
#elif L==4 // es #elif L==4 // es
"Ver resultados de los test"; "Ver resultados de test";
#elif L==5 // fr #elif L==5 // fr
"Voir r&eacute;sultats de tests"; "Voir r&eacute;sultats de tests";
#elif L==6 // gn #elif L==6 // gn
"Ver resultados de los test"; // Okoteve traducción "Ver resultados de test"; // Okoteve traducción
#elif L==7 // it #elif L==7 // it
"Vedi risultati dei test"; "Vedi risultati dei test";
#elif L==8 // pl #elif L==8 // pl