mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-20 00:02:42 +02:00
Version 14.79.3
This commit is contained in:
parent
b4a0867448
commit
c2e8ff6567
81
swad_QR.c
81
swad_QR.c
|
@ -138,87 +138,20 @@ static void QR_ImageQRCode (const char *QRString)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********** Show QR code with direct link to the current country ************/
|
/*************** Show QR code with direct link (shortcut URL) ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void QR_LinkToCountry (unsigned Size)
|
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Shortcut_to_this_country;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
|
|
||||||
/***** Show QR code with direct link to the current centre *****/
|
/***** Show QR code with direct link to the current centre *****/
|
||||||
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/?CtyCod=%ld\""
|
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/%s?%s=%ld\""
|
||||||
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
||||||
Size,Size,
|
Size,Size,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],ParamStr,Cod,
|
||||||
Txt_Shortcut_to_this_country,
|
Txt_Shortcut,
|
||||||
Size,Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********* Show QR code with direct link to the current institution **********/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void QR_LinkToInstitution (unsigned Size)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Shortcut_to_this_institution;
|
|
||||||
|
|
||||||
/***** Show QR code with direct link to the current institution *****/
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/?InsCod=%ld\""
|
|
||||||
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
|
||||||
Size,Size,
|
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod,
|
|
||||||
Txt_Shortcut_to_this_institution,
|
|
||||||
Size,Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************ Show QR code with direct link to the current centre ************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void QR_LinkToCentre (unsigned Size)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Shortcut_to_this_centre;
|
|
||||||
|
|
||||||
/***** Show QR code with direct link to the current centre *****/
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/?CtrCod=%ld\""
|
|
||||||
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
|
||||||
Size,Size,
|
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod,
|
|
||||||
Txt_Shortcut_to_this_centre,
|
|
||||||
Size,Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************ Show QR code with direct link to the current degree ************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void QR_LinkToDegree (unsigned Size)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Shortcut_to_this_degree;
|
|
||||||
|
|
||||||
/***** Show QR code with direct link to the current degree *****/
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/?DegCod=%ld\""
|
|
||||||
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
|
||||||
Size,Size,
|
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod,
|
|
||||||
Txt_Shortcut_to_this_degree,
|
|
||||||
Size,Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************ Show QR code with direct link to the current course ************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void QR_LinkToCourse (unsigned Size)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Shortcut_to_this_course;
|
|
||||||
|
|
||||||
/***** Show QR code with direct link to the current course *****/
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/?CrsCod=%ld\""
|
|
||||||
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
|
|
||||||
Size,Size,
|
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,
|
|
||||||
Txt_Shortcut_to_this_course,
|
|
||||||
Size,Size);
|
Size,Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,11 +51,7 @@ typedef enum
|
||||||
void QR_PutLinkToPrintQRCode (QR_QRType_t QRType,struct UsrData *UsrDat,bool PrintText);
|
void QR_PutLinkToPrintQRCode (QR_QRType_t QRType,struct UsrData *UsrDat,bool PrintText);
|
||||||
void QR_PrintQRCode (void);
|
void QR_PrintQRCode (void);
|
||||||
|
|
||||||
void QR_LinkToCountry (unsigned Size);
|
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
|
||||||
void QR_LinkToInstitution (unsigned Size);
|
|
||||||
void QR_LinkToCentre (unsigned Size);
|
|
||||||
void QR_LinkToDegree (unsigned Size);
|
|
||||||
void QR_LinkToCourse (unsigned Size);
|
|
||||||
void QR_ExamAnnnouncement (void);
|
void QR_ExamAnnnouncement (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -241,7 +241,8 @@ static void Ctr_Configuration (bool PrintView)
|
||||||
extern const char *Txt_Centre;
|
extern const char *Txt_Centre;
|
||||||
extern const char *Txt_Short_name;
|
extern const char *Txt_Short_name;
|
||||||
extern const char *Txt_Web;
|
extern const char *Txt_Web;
|
||||||
extern const char *Txt_Shortcut_to_this_centre;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
extern const char *Txt_Courses;
|
extern const char *Txt_Courses;
|
||||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
|
@ -426,15 +427,15 @@ static void Ctr_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"DAT\""
|
||||||
" style=\"text-align:left; vertical-align:middle;\">"
|
" style=\"text-align:left; vertical-align:middle;\">"
|
||||||
"<a href=\"%s/?CtrCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
"<a href=\"%s/%s?CtrCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
"%s/?CtrCod=%ld"
|
"%s/%s?CtrCod=%ld"
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_Shortcut_to_this_centre,
|
Txt_Shortcut,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCtr.Ctr.CtrCod,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCtr.Ctr.CtrCod);
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
{
|
{
|
||||||
|
@ -448,7 +449,7 @@ static void Ctr_Configuration (bool PrintView)
|
||||||
" vertical-align:middle;\">",
|
" vertical-align:middle;\">",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_QR_code);
|
Txt_QR_code);
|
||||||
QR_LinkToCentre (200);
|
QR_LinkTo (200,"CtrCod",Gbl.CurrentCtr.Ctr.CtrCod);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,11 +103,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.79.2 (2015/03/06)"
|
#define Log_PLATFORM_VERSION "SWAD 14.79.3 (2015/03/07)"
|
||||||
|
|
||||||
// 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 | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 14.79.3: Mar 07, 2015 Parameter "UsrNick" is renamed to "Usr".
|
||||||
|
URL is shown in public profile.
|
||||||
|
Language in direct URLs. (178677 lines)
|
||||||
Version 14.79.2: Mar 06, 2015 Public profile is shown depending on visibility. (178759 lines)
|
Version 14.79.2: Mar 06, 2015 Public profile is shown depending on visibility. (178759 lines)
|
||||||
Version 14.79.1: Mar 06, 2015 Add options to change visibility of public profile. (178769 lines)
|
Version 14.79.1: Mar 06, 2015 Add options to change visibility of public profile. (178769 lines)
|
||||||
3 changes necessary in database:
|
3 changes necessary in database:
|
||||||
|
|
|
@ -219,7 +219,8 @@ static void Cty_Configuration (bool PrintView)
|
||||||
extern const char *The_ClassFormul[The_NUM_THEMES];
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
extern const char *Txt_Institutions;
|
extern const char *Txt_Institutions;
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
extern const char *Txt_Shortcut_to_this_country;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
extern const char *Txt_Centres;
|
extern const char *Txt_Centres;
|
||||||
extern const char *Txt_Degrees;
|
extern const char *Txt_Degrees;
|
||||||
|
@ -343,13 +344,14 @@ static void Cty_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"DAT\""
|
||||||
" style=\"text-align:left; vertical-align:middle;\">"
|
" style=\"text-align:left; vertical-align:middle;\">"
|
||||||
"<a href=\"%s/?CtyCod=%ld\" class=\"DAT\" target=\"_blank\">%s/?CtyCod=%ld</a>"
|
"<a href=\"%s/%s?CtyCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
|
"%s/%s?CtyCod=%ld</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_Shortcut_to_this_country,
|
Txt_Shortcut,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCty.Cty.CtyCod,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCty.Cty.CtyCod);
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
{
|
{
|
||||||
|
@ -363,7 +365,7 @@ static void Cty_Configuration (bool PrintView)
|
||||||
" vertical-align:middle;\">",
|
" vertical-align:middle;\">",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_QR_code);
|
Txt_QR_code);
|
||||||
QR_LinkToCountry (200);
|
QR_LinkTo (200,"CtyCod",Gbl.CurrentCty.Cty.CtyCod);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,8 @@ static void Crs_Configuration (bool PrintView)
|
||||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||||
extern const char *Txt_Institutional_code;
|
extern const char *Txt_Institutional_code;
|
||||||
extern const char *Txt_Internal_code;
|
extern const char *Txt_Internal_code;
|
||||||
extern const char *Txt_Shortcut_to_this_course;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
extern const char *Txt_Indicators;
|
extern const char *Txt_Indicators;
|
||||||
|
@ -352,13 +353,14 @@ static void Crs_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"DAT\""
|
||||||
" style=\"text-align:left; vertical-align:middle;\">"
|
" style=\"text-align:left; vertical-align:middle;\">"
|
||||||
"<a href=\"%s/?CrsCod=%ld\" class=\"DAT\" target=\"_blank\">%s/?CrsCod=%ld</a>"
|
"<a href=\"%s/%s?CrsCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
|
"%s/%s?CrsCod=%ld</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_Shortcut_to_this_course,
|
Txt_Shortcut,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCrs.Crs.CrsCod,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
{
|
{
|
||||||
|
@ -372,7 +374,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
" style=\"text-align:left; vertical-align:middle;\">",
|
" style=\"text-align:left; vertical-align:middle;\">",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_QR_code);
|
Txt_QR_code);
|
||||||
QR_LinkToCourse (200);
|
QR_LinkTo (200,"CrsCod",Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,8 @@ static void Deg_Configuration (bool PrintView)
|
||||||
extern const char *Txt_Degree;
|
extern const char *Txt_Degree;
|
||||||
extern const char *Txt_Short_name;
|
extern const char *Txt_Short_name;
|
||||||
extern const char *Txt_Web;
|
extern const char *Txt_Web;
|
||||||
extern const char *Txt_Shortcut_to_this_degree;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
|
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
|
||||||
|
@ -410,15 +411,15 @@ static void Deg_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\" style=\"text-align:left;"
|
"<td class=\"DAT\" style=\"text-align:left;"
|
||||||
" vertical-align:middle;\">"
|
" vertical-align:middle;\">"
|
||||||
"<a href=\"%s/?DegCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
"<a href=\"%s/%s?DegCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
"%s/?DegCod=%ld"
|
"%s/%s?DegCod=%ld"
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_Shortcut_to_this_degree,
|
Txt_Shortcut,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentDeg.Deg.DegCod,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentDeg.Deg.DegCod);
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
{
|
{
|
||||||
|
@ -432,7 +433,7 @@ static void Deg_Configuration (bool PrintView)
|
||||||
" vertical-align:middle;\">",
|
" vertical-align:middle;\">",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_QR_code);
|
Txt_QR_code);
|
||||||
QR_LinkToDegree (200);
|
QR_LinkTo (200,"DegCod",Gbl.CurrentDeg.Deg.DegCod);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,8 @@ static void Ins_Configuration (bool PrintView)
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
extern const char *Txt_Short_name;
|
extern const char *Txt_Short_name;
|
||||||
extern const char *Txt_Web;
|
extern const char *Txt_Web;
|
||||||
extern const char *Txt_Shortcut_to_this_institution;
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
extern const char *Txt_Degrees;
|
extern const char *Txt_Degrees;
|
||||||
extern const char *Txt_Courses;
|
extern const char *Txt_Courses;
|
||||||
|
@ -349,15 +350,15 @@ static void Ins_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\" style=\"text-align:left;"
|
"<td class=\"DAT\" style=\"text-align:left;"
|
||||||
" vertical-align:middle;\">"
|
" vertical-align:middle;\">"
|
||||||
"<a href=\"%s/?InsCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
"<a href=\"%s/%s?InsCod=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
"%s/?InsCod=%ld"
|
"%s/%s?InsCod=%ld"
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_Shortcut_to_this_institution,
|
Txt_Shortcut,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod,
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentIns.Ins.InsCod,
|
||||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod);
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentIns.Ins.InsCod);
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
{
|
{
|
||||||
|
@ -371,7 +372,7 @@ static void Ins_Configuration (bool PrintView)
|
||||||
" vertical-align:middle;\">",
|
" vertical-align:middle;\">",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
Txt_QR_code);
|
Txt_QR_code);
|
||||||
QR_LinkToInstitution (200);
|
QR_LinkTo (200,"InsCod",Gbl.CurrentIns.Ins.InsCod);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,18 +299,11 @@ void Par_GetMainParameters (void)
|
||||||
|
|
||||||
/***** Get user's nickname, if exists
|
/***** Get user's nickname, if exists
|
||||||
(this nickname is used to go to a user's profile, not to get the logged user) *****/
|
(this nickname is used to go to a user's profile, not to get the logged user) *****/
|
||||||
Par_GetParToText ("UsrNick",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
|
Par_GetParToText ("Usr",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
|
||||||
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
|
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
|
||||||
{
|
{
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
|
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
|
||||||
Gbl.CurrentAct = ActSeePubPrf;
|
Gbl.CurrentAct = ActSeePubPrf;
|
||||||
/*
|
|
||||||
Gbl.CurrentCty.Cty.CtyCod =
|
|
||||||
Gbl.CurrentIns.Ins.InsCod =
|
|
||||||
Gbl.CurrentCtr.Ctr.CtrCod =
|
|
||||||
Gbl.CurrentDeg.Deg.DegCod =
|
|
||||||
Gbl.CurrentCrs.Crs.CrsCod = -1L;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Get tab to activate *****/
|
/***** Get tab to activate *****/
|
||||||
|
@ -419,7 +412,7 @@ static unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
||||||
strcmp (ParamName,"CtrCod" ) && // To enter directly to a centre
|
strcmp (ParamName,"CtrCod" ) && // To enter directly to a centre
|
||||||
strcmp (ParamName,"DegCod" ) && // To enter directly to a degree
|
strcmp (ParamName,"DegCod" ) && // To enter directly to a degree
|
||||||
strcmp (ParamName,"CrsCod" ) && // To enter directly to a course
|
strcmp (ParamName,"CrsCod" ) && // To enter directly to a course
|
||||||
strcmp (ParamName,"UsrNick") && // To enter directly to a user
|
strcmp (ParamName,"Usr" ) && // To enter directly to a user
|
||||||
strcmp (ParamName,"ActCod" ) && // To execute directly an action (allowed only for fully public actions)
|
strcmp (ParamName,"ActCod" ) && // To execute directly an action (allowed only for fully public actions)
|
||||||
strcmp (ParamName,"Layout" ) && // To change the layout of the page (wide or narrow)
|
strcmp (ParamName,"Layout" ) && // To change the layout of the page (wide or narrow)
|
||||||
strcmp (ParamName,"IdSes" ) && // To use an open session when redirecting from one language to another
|
strcmp (ParamName,"IdSes" ) && // To use an open session when redirecting from one language to another
|
||||||
|
|
|
@ -2027,6 +2027,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
extern const char *Txt_First_name;
|
extern const char *Txt_First_name;
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
extern const char *Txt_Another_country;
|
extern const char *Txt_Another_country;
|
||||||
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
extern const char *Txt_Place_of_origin;
|
extern const char *Txt_Place_of_origin;
|
||||||
extern const char *Txt_Date_of_birth;
|
extern const char *Txt_Date_of_birth;
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
|
@ -2063,6 +2065,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
(TypeOfView == Rec_FORM_MODIFY_RECORD_OTHER_EXISTING_USR &&
|
(TypeOfView == Rec_FORM_MODIFY_RECORD_OTHER_EXISTING_USR &&
|
||||||
!(IAmTeacher && HeIsTeacher))); // A teacher can not modify another teacher's data
|
!(IAmTeacher && HeIsTeacher))); // A teacher can not modify another teacher's data
|
||||||
bool GoToPublicProfileForm = (TypeOfView == Rec_RECORD_LIST ||
|
bool GoToPublicProfileForm = (TypeOfView == Rec_RECORD_LIST ||
|
||||||
|
TypeOfView == Rec_RECORD_PUBLIC ||
|
||||||
TypeOfView == Rec_OTHER_USR_COMMON_RECORD_CHECK);
|
TypeOfView == Rec_OTHER_USR_COMMON_RECORD_CHECK);
|
||||||
bool CommandForms = GoToPublicProfileForm && Gbl.Usrs.Me.Logged;
|
bool CommandForms = GoToPublicProfileForm && Gbl.Usrs.Me.Logged;
|
||||||
bool ShowEmail = (IAmDegAdmin || IAmSuperuser || DataForm ||
|
bool ShowEmail = (IAmDegAdmin || IAmSuperuser || DataForm ||
|
||||||
|
@ -2681,6 +2684,25 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
|
/***** Shortcut to the user's profile *****/
|
||||||
|
if (TypeOfView == Rec_RECORD_PUBLIC)
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"%s\""
|
||||||
|
" style=\"width:%upx; text-align:left;\">"
|
||||||
|
"%s:"
|
||||||
|
"</td>"
|
||||||
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
|
" style=\"width:%upx; text-align:left;\">"
|
||||||
|
"<a href=\"%s/%s?Usr=@%s\" class=\"DAT\" target=\"_blank\">"
|
||||||
|
"%s/%s?Usr=@%s"
|
||||||
|
"</a>"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
ClassForm,Col1Width,Txt_Shortcut,
|
||||||
|
ClassData,Cols2and3Width,
|
||||||
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
|
||||||
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
|
||||||
|
|
||||||
if (ShowAddressRows)
|
if (ShowAddressRows)
|
||||||
{
|
{
|
||||||
/* Origin place */
|
/* Origin place */
|
||||||
|
|
104
swad_text.c
104
swad_text.c
|
@ -34049,109 +34049,25 @@ const char *Txt_Short_BR_Name =
|
||||||
"Nome<br />abreviado";
|
"Nome<br />abreviado";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Shortcut_to_this_course =
|
const char *Txt_Shortcut =
|
||||||
#if L==0
|
#if L==0
|
||||||
"Acceso directo a la asignatura"; // Necessita traduccio
|
"Accés directe";
|
||||||
#elif L==1
|
#elif L==1
|
||||||
"Shortcut to this course"; // Need Übersetzung
|
"Direktzugriff";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Shortcut to this course";
|
"Shortcut";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"Acceso directo a la asignatura";
|
"Acceso directo";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Shortcut to this course"; // Besoin de traduction
|
"Accès direct";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Acceso directo a la asignatura"; // Okoteve traducción
|
"Acceso directo"; // Okoteve traducción
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Accesso diretto al corso";
|
"Accesso diretto";
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Shortcut to this course"; // Potrzebujesz tlumaczenie
|
"Bezpośredni dostęp";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Shortcut to this course"; // Necessita de tradução
|
"Acesso directo";
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Shortcut_to_this_degree =
|
|
||||||
#if L==0
|
|
||||||
"Acceso directo a la titulación"; // Necessita traduccio
|
|
||||||
#elif L==1
|
|
||||||
"Shortcut to this degree"; // Need Übersetzung
|
|
||||||
#elif L==2
|
|
||||||
"Shortcut to this degree";
|
|
||||||
#elif L==3
|
|
||||||
"Acceso directo a la titulación";
|
|
||||||
#elif L==4
|
|
||||||
"Shortcut to this degree"; // Besoin de traduction
|
|
||||||
#elif L==5
|
|
||||||
"Acceso directo a la titulación"; // Okoteve traducción
|
|
||||||
#elif L==6
|
|
||||||
"Accesso diretto alla laurea";
|
|
||||||
#elif L==7
|
|
||||||
"Shortcut to this degree"; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==8
|
|
||||||
"Shortcut to this degree"; // Necessita de tradução
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Shortcut_to_this_centre =
|
|
||||||
#if L==0
|
|
||||||
"Acceso directo al centro"; // Necessita traduccio
|
|
||||||
#elif L==1
|
|
||||||
"Shortcut to this centre"; // Need Übersetzung
|
|
||||||
#elif L==2
|
|
||||||
"Shortcut to this centre";
|
|
||||||
#elif L==3
|
|
||||||
"Acceso directo al centro";
|
|
||||||
#elif L==4
|
|
||||||
"Shortcut to this centre"; // Besoin de traduction
|
|
||||||
#elif L==5
|
|
||||||
"Acceso directo al centro"; // Okoteve traducción
|
|
||||||
#elif L==6
|
|
||||||
"Accesso diretto al centro";
|
|
||||||
#elif L==7
|
|
||||||
"Shortcut to this centre"; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==8
|
|
||||||
"Shortcut to this centre"; // Necessita de tradução
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Shortcut_to_this_country =
|
|
||||||
#if L==0
|
|
||||||
"Acceso directo al país"; // Necessita traduccio
|
|
||||||
#elif L==1
|
|
||||||
"Shortcut to this country"; // Need Übersetzung
|
|
||||||
#elif L==2
|
|
||||||
"Shortcut to this country";
|
|
||||||
#elif L==3
|
|
||||||
"Acceso directo al país";
|
|
||||||
#elif L==4
|
|
||||||
"Shortcut to this country"; // Besoin de traduction
|
|
||||||
#elif L==5
|
|
||||||
"Acceso directo al país"; // Okoteve traducción
|
|
||||||
#elif L==6
|
|
||||||
"Accesso diretto al paese";
|
|
||||||
#elif L==7
|
|
||||||
"Shortcut to this country"; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==8
|
|
||||||
"Shortcut to this country"; // Necessita de tradução
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Shortcut_to_this_institution =
|
|
||||||
#if L==0
|
|
||||||
"Acceso directo a la institución"; // Necessita traduccio
|
|
||||||
#elif L==1
|
|
||||||
"Shortcut to this institution"; // Need Übersetzung
|
|
||||||
#elif L==2
|
|
||||||
"Shortcut to this institution";
|
|
||||||
#elif L==3
|
|
||||||
"Acceso directo a la institución";
|
|
||||||
#elif L==4
|
|
||||||
"Shortcut to this institution"; // Besoin de traduction
|
|
||||||
#elif L==5
|
|
||||||
"Acceso directo a la institución"; // Okoteve traducción
|
|
||||||
#elif L==6
|
|
||||||
"Accesso diretto a l'istituzione";
|
|
||||||
#elif L==7
|
|
||||||
"Shortcut to this institution"; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==8
|
|
||||||
"Shortcut to this institution"; // Necessita de tradução
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Show =
|
const char *Txt_Show =
|
||||||
|
|
42
swad_user.c
42
swad_user.c
|
@ -7362,7 +7362,7 @@ void Usr_RequestUserProfile (void)
|
||||||
Act_FormStart (ActSeePubPrf);
|
Act_FormStart (ActSeePubPrf);
|
||||||
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:center;\">"
|
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:center;\">"
|
||||||
"%s: "
|
"%s: "
|
||||||
"<input type=\"text\" name=\"UsrNick\""
|
"<input type=\"text\" name=\"Usr\""
|
||||||
" size=\"20\" maxlength=\"%u\" />"
|
" size=\"20\" maxlength=\"%u\" />"
|
||||||
"</div>",
|
"</div>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
|
@ -7393,7 +7393,7 @@ void Usr_ShowUserProfile (void)
|
||||||
/***** Get user *****/
|
/***** Get user *****/
|
||||||
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0)
|
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0)
|
||||||
{
|
{
|
||||||
Par_GetParToText ("UsrNick",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
|
Par_GetParToText ("Usr",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
|
||||||
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
|
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
|
||||||
{
|
{
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
|
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
|
||||||
|
@ -7423,6 +7423,9 @@ void Usr_ShowUserProfile (void)
|
||||||
/***** Common record *****/
|
/***** Common record *****/
|
||||||
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
|
/***** Show details of user's profile *****/
|
||||||
|
// Usr_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -7467,3 +7470,38 @@ void Usr_ChangeProfileVisibility (void)
|
||||||
/***** Show form again *****/
|
/***** Show form again *****/
|
||||||
Pri_EditMyPrivacy ();
|
Pri_EditMyPrivacy ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************** Show details of user's profile ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
{
|
||||||
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
|
extern const char *Txt_Shortcut;
|
||||||
|
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
|
||||||
|
|
||||||
|
/***** Start table *****/
|
||||||
|
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||||
|
|
||||||
|
/***** Shortcut to the user's profile *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"%s\""
|
||||||
|
" style=\"text-align:right; vertical-align:middle;\">"
|
||||||
|
"%s:"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT\""
|
||||||
|
" style=\"text-align:left; vertical-align:middle;\">"
|
||||||
|
"<a href=\"%s/%s?Usr=@%s\" class=\"DAT\" target=\"_blank\">"
|
||||||
|
"%s/%s?Usr=@%s"
|
||||||
|
"</a>"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
The_ClassFormul[Gbl.Prefs.Theme],
|
||||||
|
Txt_Shortcut,
|
||||||
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
|
||||||
|
Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
|
||||||
|
|
||||||
|
/***** End of table *****/
|
||||||
|
Lay_EndRoundFrameTable10 ();
|
||||||
|
}
|
||||||
|
|
|
@ -327,5 +327,6 @@ void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role);
|
||||||
void Usr_RequestUserProfile (void);
|
void Usr_RequestUserProfile (void);
|
||||||
void Usr_ShowUserProfile (void);
|
void Usr_ShowUserProfile (void);
|
||||||
void Usr_ChangeProfileVisibility (void);
|
void Usr_ChangeProfileVisibility (void);
|
||||||
|
void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user