mirror of https://github.com/acanas/swad-core.git
Version 16.86.10
This commit is contained in:
parent
9517f63bc8
commit
f4fd3ff255
|
@ -70,12 +70,11 @@ static void QR_ImageQRCode (const char *QRString);
|
||||||
/***************** Put a link to a print view of a QR code *******************/
|
/***************** Put a link to a print view of a QR code *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText)
|
void QR_PutLinkToPrintQRCode (bool PrintText)
|
||||||
{
|
{
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
|
|
||||||
/***** Link to print QR *****/
|
/***** Link to print QR *****/
|
||||||
Gbl.Usrs.NicknameForQR = Nickname;
|
|
||||||
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,
|
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,
|
||||||
"qr64x64.gif",
|
"qr64x64.gif",
|
||||||
Txt_QR_code,PrintText ? Txt_QR_code :
|
Txt_QR_code,PrintText ? Txt_QR_code :
|
||||||
|
@ -89,10 +88,7 @@ void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText)
|
||||||
|
|
||||||
static void QR_PutParamQRString (void)
|
static void QR_PutParamQRString (void)
|
||||||
{
|
{
|
||||||
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
Par_PutHiddenParamString ("QRString",Gbl.QR.Str);
|
||||||
|
|
||||||
sprintf (NicknameWithArroba,"@%s",Gbl.Usrs.NicknameForQR);
|
|
||||||
Par_PutHiddenParamString ("QRString",NicknameWithArroba);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText);
|
void QR_PutLinkToPrintQRCode (bool PrintText);
|
||||||
void QR_PrintQRCode (void);
|
void QR_PrintQRCode (void);
|
||||||
|
|
||||||
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
|
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
|
||||||
|
|
|
@ -140,6 +140,8 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
||||||
|
|
||||||
void Att_SeeAttEvents (void)
|
void Att_SeeAttEvents (void)
|
||||||
{
|
{
|
||||||
|
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
||||||
|
|
||||||
/***** Get parameters *****/
|
/***** Get parameters *****/
|
||||||
Att_GetParamAttOrderType ();
|
Att_GetParamAttOrderType ();
|
||||||
Grp_GetParamWhichGrps ();
|
Grp_GetParamWhichGrps ();
|
||||||
|
@ -171,7 +173,11 @@ void Att_SeeAttEvents (void)
|
||||||
|
|
||||||
/* Put link to my QR code */
|
/* Put link to my QR code */
|
||||||
if (Gbl.Usrs.Me.UsrDat.Nickname[0])
|
if (Gbl.Usrs.Me.UsrDat.Nickname[0])
|
||||||
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,true);
|
{
|
||||||
|
sprintf (NicknameWithArroba,"@%s",Gbl.Usrs.Me.UsrDat.Nickname);
|
||||||
|
Gbl.QR.Str = NicknameWithArroba;
|
||||||
|
QR_PutLinkToPrintQRCode (true);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,17 +179,20 @@
|
||||||
// TODO: When teacher sees "No hay estudiantes", put a button to add students
|
// TODO: When teacher sees "No hay estudiantes", put a button to add students
|
||||||
// TODO: When admin sees "No hay profesores", put a button to add teachers
|
// TODO: When admin sees "No hay profesores", put a button to add teachers
|
||||||
|
|
||||||
|
// TODO: Al entrar sin identificar a ver una agenda, por ejemplo, https://localhost/swad/pt?agd=@rms, el idioma cambia ¿?
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.86.9 (2016-12-05)"
|
#define Log_PLATFORM_VERSION "SWAD 16.86.10 (2016-12-05)"
|
||||||
#define CSS_FILE "swad16.86.5.css"
|
#define CSS_FILE "swad16.86.5.css"
|
||||||
#define JS_FILE "swad16.84.2.js"
|
#define JS_FILE "swad16.84.2.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.86.10: Dec 05, 2016 Code refactoring related to user's QR (nickname). (209904 lines)
|
||||||
Version 16.86.9: Dec 05, 2016 Link to QR in user's agenda. Not finished. (209889 lines)
|
Version 16.86.9: Dec 05, 2016 Link to QR in user's agenda. Not finished. (209889 lines)
|
||||||
Version 16.86.8: Dec 05, 2016 Changes in layout of user's agenda. (209864 lines)
|
Version 16.86.8: Dec 05, 2016 Changes in layout of user's agenda. (209864 lines)
|
||||||
Version 16.86.7: Dec 05, 2016 Changes in icons for open/closed and public/private. (209852 lines)
|
Version 16.86.7: Dec 05, 2016 Changes in icons for open/closed and public/private. (209852 lines)
|
||||||
|
|
|
@ -398,7 +398,6 @@ struct Globals
|
||||||
} Connected;
|
} Connected;
|
||||||
char FileNamePhoto[NAME_MAX+1]; // File name (with no path and no .jpg) of the temporary file with the selected face
|
char FileNamePhoto[NAME_MAX+1]; // File name (with no path and no .jpg) of the temporary file with the selected face
|
||||||
bool Error; // To signal that an error has happened
|
bool Error; // To signal that an error has happened
|
||||||
const char *NicknameForQR; // Used as parameter in contextual links
|
|
||||||
} Usrs;
|
} Usrs;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -730,6 +729,10 @@ struct Globals
|
||||||
float MaxPercent;
|
float MaxPercent;
|
||||||
} DegPhotos;
|
} DegPhotos;
|
||||||
} Stat;
|
} Stat;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char *Str;
|
||||||
|
} QR;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -196,6 +196,7 @@ void Nck_ShowFormChangeUsrNickname (void)
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumNicks;
|
unsigned NumNicks;
|
||||||
unsigned NumNick;
|
unsigned NumNick;
|
||||||
|
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
||||||
|
|
||||||
/***** Get my nicknames *****/
|
/***** Get my nicknames *****/
|
||||||
sprintf (Query,"SELECT Nickname FROM usr_nicknames"
|
sprintf (Query,"SELECT Nickname FROM usr_nicknames"
|
||||||
|
@ -250,7 +251,11 @@ void Nck_ShowFormChangeUsrNickname (void)
|
||||||
|
|
||||||
/* Link to QR code */
|
/* Link to QR code */
|
||||||
if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0])
|
if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0])
|
||||||
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,false);
|
{
|
||||||
|
sprintf (NicknameWithArroba,"@%s",Gbl.Usrs.Me.UsrDat.Nickname);
|
||||||
|
Gbl.QR.Str = NicknameWithArroba;
|
||||||
|
QR_PutLinkToPrintQRCode (false);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
|
|
@ -2591,6 +2591,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat)
|
||||||
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
||||||
{
|
{
|
||||||
extern const char *Txt_View_public_profile;
|
extern const char *Txt_View_public_profile;
|
||||||
|
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"REC_C2_MID REC_NAME LEFT_BOTTOM\">"
|
"<td class=\"REC_C2_MID REC_NAME LEFT_BOTTOM\">"
|
||||||
|
@ -2611,7 +2612,9 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
/* Link to QR code */
|
/* Link to QR code */
|
||||||
QR_PutLinkToPrintQRCode (UsrDat->Nickname,false);
|
sprintf (NicknameWithArroba,"@%s",UsrDat->Nickname);
|
||||||
|
Gbl.QR.Str = NicknameWithArroba;
|
||||||
|
QR_PutLinkToPrintQRCode (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
fprintf (Gbl.F.Out,"</div>"
|
||||||
|
|
Loading…
Reference in New Issue