mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 10:45:23 +02:00
Version 22.11: Sep 20, 2022 Links to attendance events in program.
This commit is contained in:
parent
60ba3add0f
commit
1d448bc687
|
@ -1417,6 +1417,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActHidAtt ] = {1069,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_HideAttEvent ,NULL},
|
||||
[ActUnhAtt ] = {1070,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_UnhideAttEvent ,NULL},
|
||||
[ActSeeOneAtt ] = {1071,-1,TabUnk,ActSeeAtt ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_SeeOneAttEvent ,NULL},
|
||||
[ActReqLnkAtt ] = {1938,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_GetLinkToEvent ,NULL},
|
||||
[ActRecAttStd ] = {1072,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterStudentsInAttEvent ,NULL},
|
||||
[ActRecAttMe ] = {1076,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterMeAsStdInAttEvent ,NULL},
|
||||
|
||||
|
@ -3785,6 +3786,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActReqLnkGam, // #1935
|
||||
ActReqLnkExa, // #1936
|
||||
ActReqLnkSvy, // #1937
|
||||
ActReqLnkAtt, // #1938
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
203
swad_action.h
203
swad_action.h
|
@ -65,7 +65,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 1937
|
||||
#define Act_MAX_ACTION_COD 1938
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -1359,122 +1359,123 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActHidAtt (ActRemOldBrf + 74)
|
||||
#define ActUnhAtt (ActRemOldBrf + 75)
|
||||
#define ActSeeOneAtt (ActRemOldBrf + 76)
|
||||
#define ActRecAttStd (ActRemOldBrf + 77)
|
||||
#define ActRecAttMe (ActRemOldBrf + 78)
|
||||
#define ActReqLnkAtt (ActRemOldBrf + 77)
|
||||
#define ActRecAttStd (ActRemOldBrf + 78)
|
||||
#define ActRecAttMe (ActRemOldBrf + 79)
|
||||
|
||||
#define ActSignUp (ActRemOldBrf + 79)
|
||||
#define ActUpdSignUpReq (ActRemOldBrf + 80)
|
||||
#define ActReqRejSignUp (ActRemOldBrf + 81)
|
||||
#define ActRejSignUp (ActRemOldBrf + 82)
|
||||
#define ActSignUp (ActRemOldBrf + 80)
|
||||
#define ActUpdSignUpReq (ActRemOldBrf + 81)
|
||||
#define ActReqRejSignUp (ActRemOldBrf + 82)
|
||||
#define ActRejSignUp (ActRemOldBrf + 83)
|
||||
|
||||
#define ActReqMdfOneOth (ActRemOldBrf + 83)
|
||||
#define ActReqMdfOneStd (ActRemOldBrf + 84)
|
||||
#define ActReqMdfOneTch (ActRemOldBrf + 85)
|
||||
#define ActReqMdfOneOth (ActRemOldBrf + 84)
|
||||
#define ActReqMdfOneStd (ActRemOldBrf + 85)
|
||||
#define ActReqMdfOneTch (ActRemOldBrf + 86)
|
||||
|
||||
#define ActReqMdfOth (ActRemOldBrf + 86)
|
||||
#define ActReqMdfStd (ActRemOldBrf + 87)
|
||||
#define ActReqMdfNET (ActRemOldBrf + 88)
|
||||
#define ActReqMdfTch (ActRemOldBrf + 89)
|
||||
#define ActReqMdfOth (ActRemOldBrf + 87)
|
||||
#define ActReqMdfStd (ActRemOldBrf + 88)
|
||||
#define ActReqMdfNET (ActRemOldBrf + 89)
|
||||
#define ActReqMdfTch (ActRemOldBrf + 90)
|
||||
|
||||
#define ActReqOthPho (ActRemOldBrf + 90)
|
||||
#define ActReqStdPho (ActRemOldBrf + 91)
|
||||
#define ActReqTchPho (ActRemOldBrf + 92)
|
||||
#define ActDetOthPho (ActRemOldBrf + 93)
|
||||
#define ActDetStdPho (ActRemOldBrf + 94)
|
||||
#define ActDetTchPho (ActRemOldBrf + 95)
|
||||
#define ActUpdOthPho (ActRemOldBrf + 96)
|
||||
#define ActUpdStdPho (ActRemOldBrf + 97)
|
||||
#define ActUpdTchPho (ActRemOldBrf + 98)
|
||||
#define ActReqRemOthPho (ActRemOldBrf + 99)
|
||||
#define ActReqRemStdPho (ActRemOldBrf + 100)
|
||||
#define ActReqRemTchPho (ActRemOldBrf + 101)
|
||||
#define ActRemOthPho (ActRemOldBrf + 102)
|
||||
#define ActRemStdPho (ActRemOldBrf + 103)
|
||||
#define ActRemTchPho (ActRemOldBrf + 104)
|
||||
#define ActCreOth (ActRemOldBrf + 105)
|
||||
#define ActCreStd (ActRemOldBrf + 106)
|
||||
#define ActCreNET (ActRemOldBrf + 107)
|
||||
#define ActCreTch (ActRemOldBrf + 108)
|
||||
#define ActUpdOth (ActRemOldBrf + 109)
|
||||
#define ActUpdStd (ActRemOldBrf + 110)
|
||||
#define ActUpdNET (ActRemOldBrf + 111)
|
||||
#define ActUpdTch (ActRemOldBrf + 112)
|
||||
#define ActReqOthPho (ActRemOldBrf + 91)
|
||||
#define ActReqStdPho (ActRemOldBrf + 92)
|
||||
#define ActReqTchPho (ActRemOldBrf + 93)
|
||||
#define ActDetOthPho (ActRemOldBrf + 94)
|
||||
#define ActDetStdPho (ActRemOldBrf + 95)
|
||||
#define ActDetTchPho (ActRemOldBrf + 96)
|
||||
#define ActUpdOthPho (ActRemOldBrf + 97)
|
||||
#define ActUpdStdPho (ActRemOldBrf + 98)
|
||||
#define ActUpdTchPho (ActRemOldBrf + 99)
|
||||
#define ActReqRemOthPho (ActRemOldBrf + 100)
|
||||
#define ActReqRemStdPho (ActRemOldBrf + 101)
|
||||
#define ActReqRemTchPho (ActRemOldBrf + 102)
|
||||
#define ActRemOthPho (ActRemOldBrf + 103)
|
||||
#define ActRemStdPho (ActRemOldBrf + 104)
|
||||
#define ActRemTchPho (ActRemOldBrf + 105)
|
||||
#define ActCreOth (ActRemOldBrf + 106)
|
||||
#define ActCreStd (ActRemOldBrf + 107)
|
||||
#define ActCreNET (ActRemOldBrf + 108)
|
||||
#define ActCreTch (ActRemOldBrf + 109)
|
||||
#define ActUpdOth (ActRemOldBrf + 110)
|
||||
#define ActUpdStd (ActRemOldBrf + 111)
|
||||
#define ActUpdNET (ActRemOldBrf + 112)
|
||||
#define ActUpdTch (ActRemOldBrf + 113)
|
||||
|
||||
#define ActReqAccEnrStd (ActRemOldBrf + 113)
|
||||
#define ActReqAccEnrNET (ActRemOldBrf + 114)
|
||||
#define ActReqAccEnrTch (ActRemOldBrf + 115)
|
||||
#define ActAccEnrStd (ActRemOldBrf + 116)
|
||||
#define ActAccEnrNET (ActRemOldBrf + 117)
|
||||
#define ActAccEnrTch (ActRemOldBrf + 118)
|
||||
#define ActRemMe_Std (ActRemOldBrf + 119)
|
||||
#define ActRemMe_NET (ActRemOldBrf + 120)
|
||||
#define ActRemMe_Tch (ActRemOldBrf + 121)
|
||||
#define ActReqAccEnrStd (ActRemOldBrf + 114)
|
||||
#define ActReqAccEnrNET (ActRemOldBrf + 115)
|
||||
#define ActReqAccEnrTch (ActRemOldBrf + 116)
|
||||
#define ActAccEnrStd (ActRemOldBrf + 117)
|
||||
#define ActAccEnrNET (ActRemOldBrf + 118)
|
||||
#define ActAccEnrTch (ActRemOldBrf + 119)
|
||||
#define ActRemMe_Std (ActRemOldBrf + 120)
|
||||
#define ActRemMe_NET (ActRemOldBrf + 121)
|
||||
#define ActRemMe_Tch (ActRemOldBrf + 122)
|
||||
|
||||
#define ActNewAdmIns (ActRemOldBrf + 122)
|
||||
#define ActRemAdmIns (ActRemOldBrf + 123)
|
||||
#define ActNewAdmCtr (ActRemOldBrf + 124)
|
||||
#define ActRemAdmCtr (ActRemOldBrf + 125)
|
||||
#define ActNewAdmDeg (ActRemOldBrf + 126)
|
||||
#define ActRemAdmDeg (ActRemOldBrf + 127)
|
||||
#define ActNewAdmIns (ActRemOldBrf + 123)
|
||||
#define ActRemAdmIns (ActRemOldBrf + 124)
|
||||
#define ActNewAdmCtr (ActRemOldBrf + 125)
|
||||
#define ActRemAdmCtr (ActRemOldBrf + 126)
|
||||
#define ActNewAdmDeg (ActRemOldBrf + 127)
|
||||
#define ActRemAdmDeg (ActRemOldBrf + 128)
|
||||
|
||||
#define ActRcvFrmEnrSevStd (ActRemOldBrf + 128)
|
||||
#define ActRcvFrmEnrSevNET (ActRemOldBrf + 129)
|
||||
#define ActRcvFrmEnrSevTch (ActRemOldBrf + 130)
|
||||
#define ActRcvFrmEnrSevStd (ActRemOldBrf + 129)
|
||||
#define ActRcvFrmEnrSevNET (ActRemOldBrf + 130)
|
||||
#define ActRcvFrmEnrSevTch (ActRemOldBrf + 131)
|
||||
|
||||
#define ActCnfID_Oth (ActRemOldBrf + 131)
|
||||
#define ActCnfID_Std (ActRemOldBrf + 132)
|
||||
#define ActCnfID_Tch (ActRemOldBrf + 133)
|
||||
#define ActCnfID_Oth (ActRemOldBrf + 132)
|
||||
#define ActCnfID_Std (ActRemOldBrf + 133)
|
||||
#define ActCnfID_Tch (ActRemOldBrf + 134)
|
||||
|
||||
#define ActFrmAccOth (ActRemOldBrf + 134)
|
||||
#define ActFrmAccStd (ActRemOldBrf + 135)
|
||||
#define ActFrmAccTch (ActRemOldBrf + 136)
|
||||
#define ActFrmAccOth (ActRemOldBrf + 135)
|
||||
#define ActFrmAccStd (ActRemOldBrf + 136)
|
||||
#define ActFrmAccTch (ActRemOldBrf + 137)
|
||||
|
||||
#define ActRemOldNicOth (ActRemOldBrf + 137)
|
||||
#define ActRemOldNicStd (ActRemOldBrf + 138)
|
||||
#define ActRemOldNicTch (ActRemOldBrf + 139)
|
||||
#define ActChgNicOth (ActRemOldBrf + 140)
|
||||
#define ActChgNicStd (ActRemOldBrf + 141)
|
||||
#define ActChgNicTch (ActRemOldBrf + 142)
|
||||
#define ActRemOldNicOth (ActRemOldBrf + 138)
|
||||
#define ActRemOldNicStd (ActRemOldBrf + 139)
|
||||
#define ActRemOldNicTch (ActRemOldBrf + 140)
|
||||
#define ActChgNicOth (ActRemOldBrf + 141)
|
||||
#define ActChgNicStd (ActRemOldBrf + 142)
|
||||
#define ActChgNicTch (ActRemOldBrf + 143)
|
||||
|
||||
#define ActRemID_Oth (ActRemOldBrf + 143)
|
||||
#define ActRemID_Std (ActRemOldBrf + 144)
|
||||
#define ActRemID_Tch (ActRemOldBrf + 145)
|
||||
#define ActNewID_Oth (ActRemOldBrf + 146)
|
||||
#define ActNewID_Std (ActRemOldBrf + 147)
|
||||
#define ActNewID_Tch (ActRemOldBrf + 148)
|
||||
#define ActChgPwdOth (ActRemOldBrf + 149)
|
||||
#define ActChgPwdStd (ActRemOldBrf + 150)
|
||||
#define ActChgPwdTch (ActRemOldBrf + 151)
|
||||
#define ActRemMaiOth (ActRemOldBrf + 152)
|
||||
#define ActRemMaiStd (ActRemOldBrf + 153)
|
||||
#define ActRemMaiTch (ActRemOldBrf + 154)
|
||||
#define ActNewMaiOth (ActRemOldBrf + 155)
|
||||
#define ActNewMaiStd (ActRemOldBrf + 156)
|
||||
#define ActNewMaiTch (ActRemOldBrf + 157)
|
||||
#define ActRemID_Oth (ActRemOldBrf + 144)
|
||||
#define ActRemID_Std (ActRemOldBrf + 145)
|
||||
#define ActRemID_Tch (ActRemOldBrf + 146)
|
||||
#define ActNewID_Oth (ActRemOldBrf + 147)
|
||||
#define ActNewID_Std (ActRemOldBrf + 148)
|
||||
#define ActNewID_Tch (ActRemOldBrf + 149)
|
||||
#define ActChgPwdOth (ActRemOldBrf + 150)
|
||||
#define ActChgPwdStd (ActRemOldBrf + 151)
|
||||
#define ActChgPwdTch (ActRemOldBrf + 152)
|
||||
#define ActRemMaiOth (ActRemOldBrf + 153)
|
||||
#define ActRemMaiStd (ActRemOldBrf + 154)
|
||||
#define ActRemMaiTch (ActRemOldBrf + 155)
|
||||
#define ActNewMaiOth (ActRemOldBrf + 156)
|
||||
#define ActNewMaiStd (ActRemOldBrf + 157)
|
||||
#define ActNewMaiTch (ActRemOldBrf + 158)
|
||||
|
||||
#define ActRemStdCrs (ActRemOldBrf + 158)
|
||||
#define ActRemNETCrs (ActRemOldBrf + 159)
|
||||
#define ActRemTchCrs (ActRemOldBrf + 160)
|
||||
#define ActRemUsrGbl (ActRemOldBrf + 161)
|
||||
#define ActRemStdCrs (ActRemOldBrf + 159)
|
||||
#define ActRemNETCrs (ActRemOldBrf + 160)
|
||||
#define ActRemTchCrs (ActRemOldBrf + 161)
|
||||
#define ActRemUsrGbl (ActRemOldBrf + 162)
|
||||
|
||||
#define ActReqRemAllStdCrs (ActRemOldBrf + 162)
|
||||
#define ActRemAllStdCrs (ActRemOldBrf + 163)
|
||||
#define ActReqRemAllStdCrs (ActRemOldBrf + 163)
|
||||
#define ActRemAllStdCrs (ActRemOldBrf + 164)
|
||||
|
||||
#define ActReqRemOldUsr (ActRemOldBrf + 164)
|
||||
#define ActRemOldUsr (ActRemOldBrf + 165)
|
||||
#define ActReqRemOldUsr (ActRemOldBrf + 165)
|
||||
#define ActRemOldUsr (ActRemOldBrf + 166)
|
||||
|
||||
#define ActLstDupUsr (ActRemOldBrf + 166)
|
||||
#define ActLstSimUsr (ActRemOldBrf + 167)
|
||||
#define ActRemDupUsr (ActRemOldBrf + 168)
|
||||
#define ActLstDupUsr (ActRemOldBrf + 167)
|
||||
#define ActLstSimUsr (ActRemOldBrf + 168)
|
||||
#define ActRemDupUsr (ActRemOldBrf + 169)
|
||||
|
||||
#define ActReqFolSevStd (ActRemOldBrf + 169)
|
||||
#define ActReqFolSevTch (ActRemOldBrf + 170)
|
||||
#define ActReqUnfSevStd (ActRemOldBrf + 171)
|
||||
#define ActReqUnfSevTch (ActRemOldBrf + 172)
|
||||
#define ActFolSevStd (ActRemOldBrf + 173)
|
||||
#define ActFolSevTch (ActRemOldBrf + 174)
|
||||
#define ActUnfSevStd (ActRemOldBrf + 175)
|
||||
#define ActUnfSevTch (ActRemOldBrf + 176)
|
||||
#define ActReqFolSevStd (ActRemOldBrf + 170)
|
||||
#define ActReqFolSevTch (ActRemOldBrf + 171)
|
||||
#define ActReqUnfSevStd (ActRemOldBrf + 172)
|
||||
#define ActReqUnfSevTch (ActRemOldBrf + 173)
|
||||
#define ActFolSevStd (ActRemOldBrf + 174)
|
||||
#define ActFolSevTch (ActRemOldBrf + 175)
|
||||
#define ActUnfSevStd (ActRemOldBrf + 176)
|
||||
#define ActUnfSevTch (ActRemOldBrf + 177)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Messages tab ********************************/
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_program_database.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
|
@ -116,6 +117,7 @@ static void Att_CreateGroups (long AttCod);
|
|||
static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct Att_Event *Event);
|
||||
|
||||
static void Att_ShowEvent (struct Att_Events *Events);
|
||||
static void Att_PutIconsOneAtt (void *Events);
|
||||
|
||||
static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event);
|
||||
static void Att_ListAttStudents (struct Att_Events *Events,
|
||||
|
@ -1482,7 +1484,7 @@ static void Att_ShowEvent (struct Att_Events *Events)
|
|||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_Event,
|
||||
NULL,NULL,
|
||||
Att_PutIconsOneAtt,Events,
|
||||
Hlp_USERS_Attendance,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Show attendance event *****/
|
||||
|
@ -1508,6 +1510,18 @@ static void Att_ShowEvent (struct Att_Events *Events)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Put contextual icons in an attendance event *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutIconsOneAtt (void *Events)
|
||||
{
|
||||
/***** Put icon to get resource link *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
|
||||
Ico_PutContextualIconToGetLink (ActReqLnkAtt,NULL,
|
||||
Att_PutParams,Events);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** List me as student in one event *********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -3280,3 +3294,79 @@ static void Att_ListAttEventsForAStd (const struct Att_Events *Events,
|
|||
|
||||
The_ChangeRowColor ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Get link to attendance event ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_GetLinkToEvent (void)
|
||||
{
|
||||
extern const char *Txt_Link_to_resource_X_copied_into_clipboard;
|
||||
long AttCod;
|
||||
char Title[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1];
|
||||
|
||||
/***** Get attendance event code *****/
|
||||
if ((AttCod = Att_GetParamAttCod ()) < 0)
|
||||
Err_WrongEventExit ();
|
||||
|
||||
/***** Get attendance event title *****/
|
||||
Att_DB_GetAttEventTitle (AttCod,Title);
|
||||
|
||||
/***** Copy link to attendance event into resource clipboard *****/
|
||||
Prg_DB_CopyToClipboard (PrgRsc_ATTENDANCE_EVENT,AttCod);
|
||||
|
||||
/***** Write sucess message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,
|
||||
Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Write attendance event in course program *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_WriteAttEventInCrsProgram (long AttCod,bool PutFormToGo)
|
||||
{
|
||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||
char Title[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1];
|
||||
|
||||
/***** Get game title *****/
|
||||
Att_DB_GetAttEventTitle (AttCod,Title);
|
||||
|
||||
/***** Begin form to go to game *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
Frm_BeginForm (ActSeeOneAtt);
|
||||
Att_PutParamAttCod (AttCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[ActSeeOneAtt],
|
||||
"class=\"LM BT_LINK PRG_RSC_%s\"",
|
||||
The_GetSuffix ());
|
||||
}
|
||||
|
||||
/***** Write attendance event title *****/
|
||||
HTM_Txt (Title);
|
||||
|
||||
/***** End form to download file *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
/* End form */
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get attendance event title from game code *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_GetTitleFromAttCod (long AttCod,char *Title,size_t TitleSize)
|
||||
{
|
||||
char TitleFromDB[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1];
|
||||
|
||||
/***** Get attendance event title *****/
|
||||
Att_DB_GetAttEventTitle (AttCod,TitleFromDB);
|
||||
Str_Copy (Title,TitleFromDB,TitleSize);
|
||||
}
|
||||
|
|
|
@ -109,4 +109,9 @@ void Att_PrintMyAttendanceCrs (void);
|
|||
void Att_ListUsrsAttendanceCrs (void);
|
||||
void Att_PrintUsrsAttendanceCrs (void);
|
||||
|
||||
//--------------------------- Program resources -------------------------------
|
||||
void Att_GetLinkToEvent (void);
|
||||
void Att_WriteAttEventInCrsProgram (long AttCod,bool PutFormToGo);
|
||||
void Att_GetTitleFromAttCod (long AttCod,char *Title,size_t TitleSize);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -186,18 +186,34 @@ unsigned Att_DB_GetDataOfAttEventByCod (MYSQL_RES **mysql_res,long AttCod)
|
|||
AttCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Get attendance event title from database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_DB_GetAttEventTitle (long AttCod,
|
||||
char Title[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1])
|
||||
{
|
||||
DB_QuerySELECTString (Title,Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE,
|
||||
"can not get attendance event title",
|
||||
"SELECT Title" // row[0]
|
||||
" FROM att_events"
|
||||
" WHERE AttCod=%ld"
|
||||
" AND CrsCod=%ld", // Extra check
|
||||
AttCod,
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Get attendance event text from database *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_DB_GetAttEventDescription (long AttCod,char Description[Cns_MAX_BYTES_TEXT + 1])
|
||||
{
|
||||
/***** Get text of attendance event from database *****/
|
||||
DB_QuerySELECTString (Description,Cns_MAX_BYTES_TEXT,"can not get attendance event text",
|
||||
"SELECT Txt"
|
||||
"SELECT Txt" // row[0]
|
||||
" FROM att_events"
|
||||
" WHERE AttCod=%ld"
|
||||
" AND CrsCod=%ld",
|
||||
" AND CrsCod=%ld", // Extra check
|
||||
AttCod,
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ unsigned Att_DB_GetListAttEventsAllGrps (MYSQL_RES **mysql_res,
|
|||
Att_OrderNewestOldest_t OrderNewestOldest);
|
||||
unsigned Att_DB_GetDataOfAllAttEvents (MYSQL_RES **mysql_res,long CrsCod);
|
||||
unsigned Att_DB_GetDataOfAttEventByCod (MYSQL_RES **mysql_res,long AttCod);
|
||||
void Att_DB_GetAttEventTitle (long AttCod,
|
||||
char Title[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1]);
|
||||
void Att_DB_GetAttEventDescription (long AttCod,char Description[Cns_MAX_BYTES_TEXT + 1]);
|
||||
|
||||
bool Att_DB_CheckIfSimilarAttEventExists (const char *Field,const char *Value,long AttCod);
|
||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
|||
|
||||
TODO: Attach pdf files in multimedia.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.10.1 (2022-09-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.11 (2022-09-20)"
|
||||
#define CSS_FILE "swad22.7.css"
|
||||
#define JS_FILE "swad21.100.js"
|
||||
/*
|
||||
Version 22.11: Sep 20, 2022 Links to attendance events in program. (330907 lines)
|
||||
Version 22.10.1: Sep 19, 2022 Code refactoring in program. (330789 lines)
|
||||
Version 22.10: Sep 19, 2022 Links to surveys in program. (330822 lines)
|
||||
Version 22.9.1: Sep 19, 2022 Text for icons in program. (330725 lines)
|
||||
|
|
|
@ -2405,7 +2405,7 @@ void Gam_WriteGameInCrsProgram (long GamCod,bool PutFormToGo)
|
|||
The_GetSuffix ());
|
||||
}
|
||||
|
||||
/***** Write Name of the course and date of exam *****/
|
||||
/***** Write game title of exam *****/
|
||||
HTM_Txt (Title);
|
||||
|
||||
/***** End form to download file *****/
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <string.h> // For string functions
|
||||
|
||||
#include "swad_attendance.h"
|
||||
#include "swad_browser.h"
|
||||
#include "swad_call_for_exam.h"
|
||||
#include "swad_error.h"
|
||||
|
@ -461,7 +462,7 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
|||
struct Prg_Item *Item,
|
||||
bool EditLink)
|
||||
{
|
||||
extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
|
||||
extern const char *Txt_RESOURCE_TYPES[PrgRsc_NUM_TYPES];
|
||||
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -499,7 +500,7 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
|||
{
|
||||
/* Show current link */
|
||||
Ico_PutIconOn (Prg_ResourceTypesLogos[Item->Resource.Link.Type],Ico_BLACK,
|
||||
Prg_ResourceTypesDB[Item->Resource.Link.Type]);
|
||||
Txt_RESOURCE_TYPES[Item->Resource.Link.Type]);
|
||||
PrgRsc_WriteLinkName (&Item->Resource.Link,
|
||||
true); // Put form
|
||||
}
|
||||
|
@ -518,8 +519,6 @@ static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
|||
struct Prg_Item *Item,
|
||||
bool EditLink)
|
||||
{
|
||||
extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
|
||||
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
|
@ -978,6 +977,7 @@ static void PrgRsc_ShowClipboard (struct Prg_Item *Item)
|
|||
static void PrgRsc_WriteRowClipboard (bool SubmitOnClick,const struct Prg_Link *Link)
|
||||
{
|
||||
extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
|
||||
extern const char *Txt_RESOURCE_TYPES[PrgRsc_NUM_TYPES];
|
||||
|
||||
HTM_LI_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
|
||||
HTM_LABEL_Begin (NULL);
|
||||
|
@ -991,7 +991,7 @@ static void PrgRsc_WriteRowClipboard (bool SubmitOnClick,const struct Prg_Link *
|
|||
|
||||
/***** Type *****/
|
||||
Ico_PutIconOn (Prg_ResourceTypesLogos[Link->Type],Ico_BLACK,
|
||||
Prg_ResourceTypesDB[Link->Type]);
|
||||
Txt_RESOURCE_TYPES[Link->Type]);
|
||||
|
||||
/***** Name *****/
|
||||
PrgRsc_WriteLinkName (Link,
|
||||
|
@ -1017,7 +1017,7 @@ static void PrgRsc_WriteLinkName (const struct Prg_Link *Link,bool PutForm)
|
|||
[PrgRsc_SURVEY ] = Svy_WriteSurveyInCrsProgram,
|
||||
[PrgRsc_DOCUMENT ] = Brw_WriteFileNameInCrsProgram,
|
||||
[PrgRsc_MARKS ] = NULL,
|
||||
[PrgRsc_ATTENDANCE_EVENT] = NULL,
|
||||
[PrgRsc_ATTENDANCE_EVENT] = Att_WriteAttEventInCrsProgram,
|
||||
[PrgRsc_FORUM_THREAD ] = NULL,
|
||||
};
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ static void PrgRsc_GetResourceTitleFromLink (struct Prg_Item *Item)
|
|||
[PrgRsc_SURVEY ] = Svy_GetTitleFromSvyCod,
|
||||
[PrgRsc_DOCUMENT ] = Brw_GetFileNameFromFilCod,
|
||||
[PrgRsc_MARKS ] = NULL,
|
||||
[PrgRsc_ATTENDANCE_EVENT] = NULL,
|
||||
[PrgRsc_ATTENDANCE_EVENT] = Att_GetTitleFromAttCod,
|
||||
[PrgRsc_FORUM_THREAD ] = NULL,
|
||||
};
|
||||
|
||||
|
@ -1074,7 +1074,6 @@ static void PrgRsc_GetResourceTitleFromLink (struct Prg_Item *Item)
|
|||
|
||||
void PrgRsc_ChangeLink (void)
|
||||
{
|
||||
extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
|
||||
struct Prg_Item Item;
|
||||
char TypeCod[3 + 1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char TypeStr[3 + 1];
|
||||
|
|
|
@ -25866,6 +25866,29 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
"List students who attended to an event" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"List students who attended to an event" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActReqLnkAtt] =
|
||||
#if L==1 // ca
|
||||
"Copy link to attendance event" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"Copy link to attendance event" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Copy link to attendance event"
|
||||
#elif L==4 // es
|
||||
"Copiar enlace a evento de asistencia"
|
||||
#elif L==5 // fr
|
||||
"Copy link to attendance event" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"Copiar enlace a evento de asistencia" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Copy link to attendance event" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"Copy link to attendance event" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"Copy link to attendance event" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Copy link to attendance event" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActRecAttStd] =
|
||||
|
|
Loading…
Reference in New Issue
Block a user