mirror of https://github.com/acanas/swad-core.git
Version 18.6.7
This commit is contained in:
parent
86ed4799a8
commit
fba8af478f
|
@ -64,12 +64,12 @@ extern struct Globals Gbl;
|
|||
/***************** Put a link to a print view of a QR code *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void QR_PutLinkToPrintQRCode (Act_Action_t Action)
|
||||
void QR_PutLinkToPrintQRCode (Act_Action_t Action,void (*FuncParams) ())
|
||||
{
|
||||
extern const char *Txt_QR_code;
|
||||
|
||||
/***** Link to print QR *****/
|
||||
Lay_PutContextualLink (Action,NULL,QR_PutParamQRString,
|
||||
Lay_PutContextualLink (Action,NULL,FuncParams,
|
||||
"qr64x64.gif",
|
||||
Txt_QR_code,NULL,
|
||||
NULL);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void QR_PutLinkToPrintQRCode (Act_Action_t Action);
|
||||
void QR_PutLinkToPrintQRCode (Act_Action_t Action,void (*FuncParams) ());
|
||||
void QR_PutParamQRString (void);
|
||||
|
||||
void QR_PrintQRCode (void);
|
||||
|
|
|
@ -672,7 +672,7 @@ static void Agd_PutIconToShowQR (void)
|
|||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Usrs.Me.UsrDat.Nickname);
|
||||
Gbl.QR.Str = URL;
|
||||
QR_PutLinkToPrintQRCode (ActPrnAgdQR);
|
||||
QR_PutLinkToPrintQRCode (ActPrnAgdQR,QR_PutParamQRString);
|
||||
}
|
||||
|
||||
static void Agd_PutIconsOtherPublicAgenda (void)
|
||||
|
|
|
@ -75,6 +75,7 @@ typedef enum
|
|||
static void Att_ShowAllAttEvents (void);
|
||||
static void Att_PutFormToSelectWhichGroupsToShow (void);
|
||||
static void Att_ParamsWhichGroupsToShow (void);
|
||||
static void Att_PutIconsInListOfAttEvents (void);
|
||||
static void Att_PutIconToCreateNewAttEvent (void);
|
||||
static void Att_PutButtonToCreateNewAttEvent (void);
|
||||
static void Att_PutParamsToCreateNewAttEvent (void);
|
||||
|
@ -147,8 +148,6 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
|||
|
||||
void Att_SeeAttEvents (void)
|
||||
{
|
||||
extern const char *Txt_QR_code;
|
||||
|
||||
/***** Get parameters *****/
|
||||
Att_GetParamAttOrder ();
|
||||
Grp_GetParamWhichGrps ();
|
||||
|
@ -157,36 +156,26 @@ void Att_SeeAttEvents (void)
|
|||
/***** Get list of attendance events *****/
|
||||
Att_GetListAttEvents (Att_NEWEST_FIRST);
|
||||
|
||||
/***** Show contextual menu *****/
|
||||
if (Gbl.AttEvents.Num ||
|
||||
/***** Put link to show list of attendance *****/
|
||||
if (Gbl.AttEvents.Num &&
|
||||
Gbl.Usrs.Me.UsrDat.Nickname[0])
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
/* Put link to show list of attendance */
|
||||
if (Gbl.AttEvents.Num)
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_STD:
|
||||
Att_PutFormToListMyAttendance ();
|
||||
break;
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
Att_PutFormToListStdsAttendance ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Put link to my QR code */
|
||||
Lay_PutContextualLink (ActPrnUsrQR,NULL,Usr_PutParamMyUsrCodEncrypted,
|
||||
"qr64x64.gif",
|
||||
Txt_QR_code,Txt_QR_code,
|
||||
NULL);
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_STD:
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Att_PutFormToListMyAttendance ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
break;
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Att_PutFormToListStdsAttendance ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Show all the attendance events *****/
|
||||
Att_ShowAllAttEvents ();
|
||||
|
@ -224,8 +213,7 @@ static void Att_ShowAllAttEvents (void)
|
|||
&Pagination);
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox ("100%",Txt_Events,ICanEdit ? Att_PutIconToCreateNewAttEvent :
|
||||
NULL,
|
||||
Box_StartBox ("100%",Txt_Events,Att_PutIconsInListOfAttEvents,
|
||||
Hlp_USERS_Attendance,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
|
@ -313,6 +301,23 @@ static void Att_ParamsWhichGroupsToShow (void)
|
|||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Put contextual icons in list of attendance events *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutIconsInListOfAttEvents (void)
|
||||
{
|
||||
bool ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
|
||||
/***** Put icon to create a new attendance event *****/
|
||||
if (ICanEdit)
|
||||
Att_PutIconToCreateNewAttEvent ();
|
||||
|
||||
/***** Put icon to print my QR code *****/
|
||||
QR_PutLinkToPrintQRCode (ActPrnUsrQR,Usr_PutParamMyUsrCodEncrypted);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put icon to create a new attendance event ******************/
|
||||
/*****************************************************************************/
|
||||
|
@ -321,7 +326,7 @@ static void Att_PutIconToCreateNewAttEvent (void)
|
|||
{
|
||||
extern const char *Txt_New_event;
|
||||
|
||||
/***** Put form to create a new attendance event *****/
|
||||
/***** Put icon to create a new attendance event *****/
|
||||
Lay_PutContextualLink (ActFrmNewAtt,NULL,Att_PutParamsToCreateNewAttEvent,
|
||||
"plus64x64.png",
|
||||
Txt_New_event,NULL,
|
||||
|
|
|
@ -355,13 +355,12 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.6.6 (2018-10-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.6.7 (2018-10-17)"
|
||||
#define CSS_FILE "swad18.4.css"
|
||||
#define JS_FILE "swad17.17.1.js"
|
||||
/*
|
||||
*
|
||||
* Código QR no sale en la ficha cuando no estoy en una asignatura!!!!!
|
||||
Version 18.6.6: Oct 17, 2018 Some sprintf changed by snprintf. (236560 lines)
|
||||
Version 18.6.7: Oct 18, 2018 Changes related to QR codes. (236556 lines)
|
||||
Version 18.6.6: Oct 18, 2018 Some sprintf changed by snprintf. (236560 lines)
|
||||
Version 18.6.5: Oct 17, 2018 Some sprintf changed by snprintf or asprintf. (236125 lines)
|
||||
Version 18.6.4: Oct 17, 2018 Some sprintf changed by snprintf or asprintf. (236034 lines)
|
||||
Version 18.6.3: Oct 17, 2018 Some sprintf changed by snprintf or asprintf. (235954 lines)
|
||||
|
|
|
@ -222,7 +222,6 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
|||
extern const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname;
|
||||
extern const char *Txt_Current_nickname;
|
||||
extern const char *Txt_Other_nicknames;
|
||||
extern const char *Txt_QR_code;
|
||||
extern const char *Txt_Use_this_nickname;
|
||||
extern const char *Txt_New_nickname;
|
||||
extern const char *Txt_Change_nickname;
|
||||
|
@ -331,11 +330,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
|||
|
||||
/* Link to QR code */
|
||||
if (NumNick == 1 && UsrDat->Nickname[0])
|
||||
Lay_PutContextualLink (ActPrnUsrQR,NULL,Usr_PutParamMyUsrCodEncrypted,
|
||||
"qr64x64.gif",
|
||||
Txt_QR_code,NULL,
|
||||
NULL);
|
||||
|
||||
QR_PutLinkToPrintQRCode (ActPrnUsrQR,Usr_PutParamMyUsrCodEncrypted);
|
||||
|
||||
/* Form to change the nickname */
|
||||
if (NumNick > 1)
|
||||
|
|
|
@ -2538,7 +2538,6 @@ static void Rec_PutIconsCommands (void)
|
|||
extern const char *Txt_View_record_and_office_hours;
|
||||
extern const char *Txt_Show_agenda;
|
||||
extern const char *Txt_Administer_user;
|
||||
extern const char *Txt_QR_code;
|
||||
extern const char *Txt_Write_a_message;
|
||||
extern const char *Txt_View_homework;
|
||||
extern const char *Txt_View_test_results;
|
||||
|
@ -2680,14 +2679,11 @@ static void Rec_PutIconsCommands (void)
|
|||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/***** Button to print QR code *****/
|
||||
Lay_PutContextualLink (ActPrnUsrQR,NULL,Rec_PutParamUsrCodEncrypted,
|
||||
"qr64x64.gif",
|
||||
Txt_QR_code,NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/***** Button to print QR code *****/
|
||||
QR_PutLinkToPrintQRCode (ActPrnUsrQR,Rec_PutParamUsrCodEncrypted);
|
||||
|
||||
/***** Button to send a message *****/
|
||||
Lay_PutContextualLink (ActReqMsgUsr,NULL,Rec_PutParamsMsgUsr,
|
||||
"msg64x64.gif",
|
||||
|
|
Loading…
Reference in New Issue