diff --git a/swad_QR.c b/swad_QR.c
index 17fbd5de..01733308 100644
--- a/swad_QR.c
+++ b/swad_QR.c
@@ -112,21 +112,19 @@ void QR_PrintQRCode (void)
static void QR_ImageQRCode (const char *QRString)
{
- fprintf (Gbl.F.Out,"
"
+ fprintf (Gbl.F.Out,"
"
"
"
- "
"
- "
%s"
"
",
QR_CODE_SIZE,
QR_CODE_SIZE,QR_CODE_SIZE,
QRString,
QRString,
QRString,
- QR_CODE_SIZE,QR_CODE_SIZE,
- QRString);
+ QR_CODE_SIZE,QR_CODE_SIZE);
}
/*****************************************************************************/
diff --git a/swad_QR.h b/swad_QR.h
index 9776ec8d..e2b050fe 100644
--- a/swad_QR.h
+++ b/swad_QR.h
@@ -40,6 +40,7 @@
/*****************************************************************************/
void QR_PutLinkToPrintQRCode (Act_Action_t Action,bool PrintText);
+
void QR_PrintQRCode (void);
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
diff --git a/swad_action.c b/swad_action.c
index 9d3449fa..dc552e24 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -2817,7 +2817,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActPrvEvtMyAgd */{1609,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_MakeEventPrivate ,NULL},
/* ActPubEvtMyAgd */{1610,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_MakeEventPublic ,NULL},
/* ActSeeMyPubAgd */{1617,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyPublicAgenda ,NULL},
- /* ActPrnAgdQR */{1618,-1,TabUnk,ActSeeMyAgd ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,QR_PrintQRCode ,NULL},
+ /* ActPrnAgdQR */{1618,-1,TabUnk,ActSeeMyAgd ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Agd_PrintAgdQRCode ,NULL},
/* ActChkUsrAcc */{1584,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_CheckIfEmptyAccountExists ,NULL},
/* ActCreUsrAcc */{1163,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_AfterCreationNewAccount ,NULL},
@@ -2874,7 +2874,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActChgMnu */{1243,-1,TabUnk,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL},
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL},
- /* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,QR_PrintQRCode ,NULL},
+ /* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Usr_PrintUsrQRCode ,NULL},
/* ActPrnMyTT */{ 409,-1,TabUnk,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,TT_ShowClassTimeTable ,NULL},
/* ActEdiTut */{ 65,-1,TabUnk,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,TT_EditMyTutTimeTable ,NULL},
diff --git a/swad_agenda.c b/swad_agenda.c
index 486b4522..558f5e10 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -1757,3 +1757,22 @@ unsigned Agd_GetNumEvents (Sco_Scope_t Scope)
return NumEvents;
}
+
+/*****************************************************************************/
+/************************** Show an agenda QR code ***************************/
+/*****************************************************************************/
+
+void Agd_PrintAgdQRCode (void)
+ {
+ extern const char *Txt_Where_s_USER;
+
+ /***** Start frame *****/
+ sprintf (Gbl.Title,Txt_Where_s_USER,Gbl.Usrs.Me.UsrDat.FullName);
+ Lay_StartRoundFrame (NULL,Gbl.Title,NULL,NULL);
+
+ /***** Print QR code ****/
+ QR_PrintQRCode ();
+
+ /***** End frame *****/
+ Lay_EndRoundFrame ();
+ }
diff --git a/swad_agenda.h b/swad_agenda.h
index bcd7c8ac..0737f818 100644
--- a/swad_agenda.h
+++ b/swad_agenda.h
@@ -105,4 +105,6 @@ unsigned Agd_GetNumEventsFromUsr (long UsrCod);
unsigned Agd_GetNumUsrsWithEvents (Sco_Scope_t Scope);
unsigned Agd_GetNumEvents (Sco_Scope_t Scope);
+void Agd_PrintAgdQRCode (void);
+
#endif
diff --git a/swad_changelog.h b/swad_changelog.h
index 05827556..acd8a786 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -183,13 +183,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.90.3 (2016-12-06)"
+#define Log_PLATFORM_VERSION "SWAD 16.91 (2016-12-06)"
#define CSS_FILE "swad16.86.5.css"
#define JS_FILE "swad16.90.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.91: Dec 06, 2016 Changes in QR codes. (210204 lines)
Version 16.90.3: Dec 06, 2016 Changes related with agenda QR. (210156 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1618','es','N','Imprimir código QR agenda');
diff --git a/swad_text.c b/swad_text.c
index 33c922e2..2231d679 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -51029,6 +51029,27 @@ const char *Txt_What_would_you_like_to_do =
"O que você faria?";
#endif
+const char *Txt_Where_s_USER =
+#if L==1
+ "On és %s?";
+#elif L==2
+ "Wo ist %s?";
+#elif L==3
+ "Where's %s";
+#elif L==4
+ "¿Dónde está %s?";
+#elif L==5
+ "Où est %s?";
+#elif L==6
+ "¿Dónde está %s?"; // Okoteve traducción
+#elif L==7
+ "Dove è %s?";
+#elif L==8
+ "Gdzie jest %s?";
+#elif L==9
+ "Onde está %s?";
+#endif
+
const char *Txt_Who_to_follow =
#if L==1
"A qui seguir";
diff --git a/swad_user.c b/swad_user.c
index dcbdc8e5..d90c8740 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -54,6 +54,7 @@
#include "swad_parameter.h"
#include "swad_password.h"
#include "swad_preference.h"
+#include "swad_QR.h"
#include "swad_record.h"
#include "swad_tab.h"
#include "swad_user.h"
@@ -8095,3 +8096,19 @@ void Usr_RemoveUsrFromUsrBanned (long UsrCod)
UsrCod);
DB_QueryDELETE (Query,"can not remove user from users banned");
}
+
+/*****************************************************************************/
+/**************************** Show a user QR code ****************************/
+/*****************************************************************************/
+
+void Usr_PrintUsrQRCode (void)
+ {
+ /***** Start frame *****/
+ Lay_StartRoundFrame (NULL,Gbl.Usrs.Me.UsrDat.FullName,NULL,NULL);
+
+ /***** Print QR code ****/
+ QR_PrintQRCode ();
+
+ /***** End frame *****/
+ Lay_EndRoundFrame ();
+ }
diff --git a/swad_user.h b/swad_user.h
index a9f924e2..1b337835 100644
--- a/swad_user.h
+++ b/swad_user.h
@@ -386,4 +386,6 @@ void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role);
bool Usr_CheckIfUsrBanned (long UsrCod);
void Usr_RemoveUsrFromUsrBanned (long UsrCod);
+void Usr_PrintUsrQRCode (void);
+
#endif