mirror of https://github.com/acanas/swad-core.git
Version 16.143.4
This commit is contained in:
parent
071d97df00
commit
08e7c7bc7e
|
@ -60,8 +60,6 @@ extern struct Globals Gbl;
|
|||
/***************************** Internal prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void QR_PutParamQRString (void);
|
||||
|
||||
static void QR_ImageQRCode (const char *QRString);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -84,7 +82,7 @@ void QR_PutLinkToPrintQRCode (Act_Action_t Action,bool PrintText)
|
|||
/************************* Put parameter QR string ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void QR_PutParamQRString (void)
|
||||
void QR_PutParamQRString (void)
|
||||
{
|
||||
Par_PutHiddenParamString ("QRString",Gbl.QR.Str);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
void QR_PutLinkToPrintQRCode (Act_Action_t Action,bool PrintText);
|
||||
void QR_PutParamQRString (void);
|
||||
|
||||
void QR_PrintQRCode (void);
|
||||
|
||||
|
|
|
@ -200,13 +200,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.143.3 (2017-02-28)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.143.4 (2017-03-01)"
|
||||
#define CSS_FILE "swad16.139.6.css"
|
||||
#define JS_FILE "swad16.143.2.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 16.143.4: Mar 01, 2017 New place for QR icon in user's record card. (213249 lines)
|
||||
Version 16.143.3: Feb 28, 2017 Changes in layout of page head. (213238 lines)
|
||||
Version 16.143.2: Feb 28, 2017 Fixed bug in user timeline. (213237 lines)
|
||||
Version 16.143.1: Feb 28, 2017 Changed link to help on timeline. (213232 lines)
|
||||
|
|
|
@ -157,11 +157,11 @@
|
|||
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
|
||||
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
|
||||
|
||||
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad-ugr128x64.png" // Logo displayed in the top of the page
|
||||
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad-ugr160x80.png" // Logo displayed in the top of the page
|
||||
#define Cfg_PLATFORM_LOGO_SMALL_WIDTH 80
|
||||
#define Cfg_PLATFORM_LOGO_SMALL_HEIGHT 40
|
||||
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "swad-ugr350x80.png"
|
||||
#define Cfg_PLATFORM_LOGO_BIG_WIDTH 175
|
||||
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "swad-ugr530x80.png"
|
||||
#define Cfg_PLATFORM_LOGO_BIG_WIDTH 265
|
||||
#define Cfg_PLATFORM_LOGO_BIG_HEIGHT 40
|
||||
|
||||
#define Cfg_PLATFORM_RESPONSIBLE_NAME "UGR" // Main responsible for the platform
|
||||
|
|
|
@ -2339,12 +2339,14 @@ 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;
|
||||
extern const char *Txt_View_attendance;
|
||||
extern const char *Txt_Following_unfollow;
|
||||
extern const char *Txt_Follow;
|
||||
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1];
|
||||
bool ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == Gbl.Record.UsrDat->UsrCod);
|
||||
bool IAmLoggedAsStudent = (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT); // My current role is student
|
||||
bool IAmLoggedAsTeacher = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER); // My current role is teacher
|
||||
|
@ -2463,6 +2465,20 @@ static void Rec_PutIconsCommands (void)
|
|||
NULL);
|
||||
}
|
||||
|
||||
/***** Button to print QR code *****/
|
||||
if (ItsMe || IAmLoggedAsSysAdm ||
|
||||
(Gbl.CurrentCrs.Crs.CrsCod > 0 && // A course is selected
|
||||
Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_STUDENT && // He/she is a student in the current course
|
||||
IAmLoggedAsTeacher)) // I am a teacher in the current course
|
||||
{
|
||||
sprintf (NicknameWithArroba,"@%s",Gbl.Record.UsrDat->Nickname);
|
||||
Gbl.QR.Str = NicknameWithArroba;
|
||||
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,
|
||||
"qr64x64.gif",
|
||||
Txt_QR_code,NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/***** Button to send a message *****/
|
||||
Lay_PutContextualLink (ActReqMsgUsr,Rec_PutParamsMsgUsr,
|
||||
"msg64x64.gif",
|
||||
|
@ -2619,7 +2635,6 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
{
|
||||
extern const char *Txt_My_public_profile;
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1];
|
||||
bool ItsMe;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -2643,11 +2658,6 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
{
|
||||
fprintf (Gbl.F.Out,"</a>");
|
||||
Act_FormEnd ();
|
||||
|
||||
/* Link to QR code */
|
||||
sprintf (NicknameWithArroba,"@%s",UsrDat->Nickname);
|
||||
Gbl.QR.Str = NicknameWithArroba;
|
||||
QR_PutLinkToPrintQRCode (ActPrnUsrQR,false);
|
||||
}
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
|
|
Loading…
Reference in New Issue