mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-22 00:00:40 +02:00
Version 18.11.11
This commit is contained in:
parent
041715432f
commit
2540212d8c
16
swad_MFU.c
16
swad_MFU.c
|
@ -107,10 +107,10 @@ void MFU_GetMFUActions (struct MFU_ListMFUActions *ListMFUActions,unsigned MaxAc
|
||||||
Act_Action_t Action;
|
Act_Action_t Action;
|
||||||
|
|
||||||
/***** Get most frequently used actions *****/
|
/***** Get most frequently used actions *****/
|
||||||
DB_BuildQuery ("SELECT ActCod FROM actions_MFU"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get most frequently used actions",
|
||||||
|
"SELECT ActCod FROM actions_MFU"
|
||||||
" WHERE UsrCod=%ld ORDER BY Score DESC,LastClick DESC",
|
" WHERE UsrCod=%ld ORDER BY Score DESC,LastClick DESC",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get most frequently used actions");
|
|
||||||
|
|
||||||
/***** Write list of frequently used actions *****/
|
/***** Write list of frequently used actions *****/
|
||||||
for (NumRow = 0, ListMFUActions->NumActions = 0;
|
for (NumRow = 0, ListMFUActions->NumActions = 0;
|
||||||
|
@ -150,11 +150,13 @@ Act_Action_t MFU_GetMyLastActionInCurrentTab (void)
|
||||||
if (Gbl.Usrs.Me.UsrDat.UsrCod > 0)
|
if (Gbl.Usrs.Me.UsrDat.UsrCod > 0)
|
||||||
{
|
{
|
||||||
/***** Get my most frequently used actions *****/
|
/***** Get my most frequently used actions *****/
|
||||||
DB_BuildQuery ("SELECT ActCod FROM actions_MFU"
|
NumActions =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get"
|
||||||
|
" most frequently used actions",
|
||||||
|
"SELECT ActCod FROM actions_MFU"
|
||||||
" WHERE UsrCod=%ld"
|
" WHERE UsrCod=%ld"
|
||||||
" ORDER BY LastClick DESC,Score DESC",
|
" ORDER BY LastClick DESC,Score DESC",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumActions = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get most frequently used actions");
|
|
||||||
|
|
||||||
/***** Loop over list of frequently used actions *****/
|
/***** Loop over list of frequently used actions *****/
|
||||||
for (NumAct = 0;
|
for (NumAct = 0;
|
||||||
|
@ -352,10 +354,10 @@ void MFU_UpdateMFUActions (void)
|
||||||
Str_SetDecimalPointToUS (); // To get the decimal point as a dot
|
Str_SetDecimalPointToUS (); // To get the decimal point as a dot
|
||||||
|
|
||||||
/***** Get current score *****/
|
/***** Get current score *****/
|
||||||
DB_BuildQuery ("SELECT Score FROM actions_MFU"
|
if (DB_QuerySELECT (&mysql_res,"can not get score for current action",
|
||||||
|
"SELECT Score FROM actions_MFU"
|
||||||
" WHERE UsrCod=%ld AND ActCod=%ld",
|
" WHERE UsrCod=%ld AND ActCod=%ld",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod))
|
||||||
if (DB_QuerySELECT_new (&mysql_res,"can not get score for current action"))
|
|
||||||
{
|
{
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
if (sscanf (row[0],"%f",&Score) != 1)
|
if (sscanf (row[0],"%f",&Score) != 1)
|
||||||
|
|
|
@ -355,10 +355,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.11.10 (2018-11-01)"
|
#define Log_PLATFORM_VERSION "SWAD 18.11.11 (2018-11-01)"
|
||||||
#define CSS_FILE "swad18.4.css"
|
#define CSS_FILE "swad18.4.css"
|
||||||
#define JS_FILE "swad17.17.1.js"
|
#define JS_FILE "swad17.17.1.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.11.11: Nov 01, 2018 Joining building and performing query into one function. (235896 lines)
|
||||||
Version 18.11.10: Nov 01, 2018 Joining building and performing query into one function. (235861 lines)
|
Version 18.11.10: Nov 01, 2018 Joining building and performing query into one function. (235861 lines)
|
||||||
Version 18.11.9: Oct 31, 2018 Joining building and performing query into one function. (235847 lines)
|
Version 18.11.9: Oct 31, 2018 Joining building and performing query into one function. (235847 lines)
|
||||||
Version 18.11.8: Oct 31, 2018 Joining building and performing query into one function. (235810 lines)
|
Version 18.11.8: Oct 31, 2018 Joining building and performing query into one function. (235810 lines)
|
||||||
|
|
|
@ -2659,18 +2659,18 @@ static void Msg_GetMsgSntData (long MsgCod,long *CrsCod,long *UsrCod,
|
||||||
|
|
||||||
/***** Get data of message from table msg_snt *****/
|
/***** Get data of message from table msg_snt *****/
|
||||||
*Deleted = false;
|
*Deleted = false;
|
||||||
DB_BuildQuery ("SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a message",
|
||||||
|
"SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
|
||||||
" FROM msg_snt WHERE MsgCod=%ld",
|
" FROM msg_snt WHERE MsgCod=%ld",
|
||||||
MsgCod);
|
MsgCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get data of a message");
|
|
||||||
|
|
||||||
if (NumRows == 0) // If not result ==> sent message is deleted
|
if (NumRows == 0) // If not result ==> sent message is deleted
|
||||||
{
|
{
|
||||||
/***** Get data of message from table msg_snt_deleted *****/
|
/***** Get data of message from table msg_snt_deleted *****/
|
||||||
DB_BuildQuery ("SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a message",
|
||||||
|
"SELECT CrsCod,UsrCod,UNIX_TIMESTAMP(CreatTime)"
|
||||||
" FROM msg_snt_deleted WHERE MsgCod=%ld",
|
" FROM msg_snt_deleted WHERE MsgCod=%ld",
|
||||||
MsgCod);
|
MsgCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get data of a message");
|
|
||||||
|
|
||||||
*Deleted = true;
|
*Deleted = true;
|
||||||
}
|
}
|
||||||
|
@ -2708,10 +2708,10 @@ void Msg_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1])
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
/***** Get subject of message from database *****/
|
/***** Get subject of message from database *****/
|
||||||
DB_BuildQuery ("SELECT Subject FROM msg_content WHERE MsgCod=%ld",MsgCod);
|
if (DB_QuerySELECT (&mysql_res,"can not get the subject of a message",
|
||||||
|
"SELECT Subject FROM msg_content"
|
||||||
/***** Result should have a unique row *****/
|
" WHERE MsgCod=%ld",
|
||||||
if (DB_QuerySELECT_new (&mysql_res,"can not get the subject of a message") == 1)
|
MsgCod) == 1) // Result should have a unique row
|
||||||
{
|
{
|
||||||
/***** Get subject *****/
|
/***** Get subject *****/
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -2737,10 +2737,10 @@ static void Msg_GetMsgContent (long MsgCod,char Content[Cns_MAX_BYTES_LONG_TEXT
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
|
||||||
/***** Get content of message from database *****/
|
/***** Get content of message from database *****/
|
||||||
DB_BuildQuery ("SELECT Content,ImageName,ImageTitle,ImageURL"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get the content of a message",
|
||||||
|
"SELECT Content,ImageName,ImageTitle,ImageURL"
|
||||||
" FROM msg_content WHERE MsgCod=%ld",
|
" FROM msg_content WHERE MsgCod=%ld",
|
||||||
MsgCod);
|
MsgCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get the content of a message");
|
|
||||||
|
|
||||||
/***** Result should have a unique row *****/
|
/***** Result should have a unique row *****/
|
||||||
if (NumRows != 1)
|
if (NumRows != 1)
|
||||||
|
@ -2771,10 +2771,11 @@ static void Msg_GetStatusOfSentMsg (long MsgCod,bool *Expanded)
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
|
||||||
/***** Get if sent message has been replied/expanded from database *****/
|
/***** Get if sent message has been replied/expanded from database *****/
|
||||||
DB_BuildQuery ("SELECT Expanded FROM msg_snt"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get if a sent message"
|
||||||
|
" has been replied/expanded",
|
||||||
|
"SELECT Expanded FROM msg_snt"
|
||||||
" WHERE MsgCod=%ld AND UsrCod=%ld",
|
" WHERE MsgCod=%ld AND UsrCod=%ld",
|
||||||
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get if a sent message has been replied/expanded");
|
|
||||||
|
|
||||||
/***** Result should have a unique row *****/
|
/***** Result should have a unique row *****/
|
||||||
if (NumRows != 1)
|
if (NumRows != 1)
|
||||||
|
@ -2801,10 +2802,11 @@ static void Msg_GetStatusOfReceivedMsg (long MsgCod,bool *Open,bool *Replied,boo
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
|
||||||
/***** Get if received message has been replied/expanded from database *****/
|
/***** Get if received message has been replied/expanded from database *****/
|
||||||
DB_BuildQuery ("SELECT Open,Replied,Expanded FROM msg_rcv"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get if a received message"
|
||||||
|
" has been replied/expanded",
|
||||||
|
"SELECT Open,Replied,Expanded FROM msg_rcv"
|
||||||
" WHERE MsgCod=%ld AND UsrCod=%ld",
|
" WHERE MsgCod=%ld AND UsrCod=%ld",
|
||||||
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumRows = DB_QuerySELECT_new (&mysql_res,"can not get if a received message has been replied/expanded");
|
|
||||||
|
|
||||||
/***** Result should have a unique row *****/
|
/***** Result should have a unique row *****/
|
||||||
if (NumRows != 1)
|
if (NumRows != 1)
|
||||||
|
@ -3021,11 +3023,11 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
// This function may be called inside a web service, so don't report error
|
// This function may be called inside a web service, so don't report error
|
||||||
|
|
||||||
/***** Get subject of message from database *****/
|
/***** Get subject of message from database *****/
|
||||||
DB_BuildQuery ("SELECT Subject,Content FROM msg_content"
|
if (DB_QuerySELECT (&mysql_res,"can not get subject and content"
|
||||||
|
" of a message",
|
||||||
|
"SELECT Subject,Content FROM msg_content"
|
||||||
" WHERE MsgCod=%ld",
|
" WHERE MsgCod=%ld",
|
||||||
MsgCod);
|
MsgCod) == 1) // Result should have a unique row
|
||||||
|
|
||||||
if (DB_QuerySELECT_new (&mysql_res,"can not get subject and content of a message") == 1) // Result should have a unique row
|
|
||||||
{
|
{
|
||||||
/***** Get subject and content of the message *****/
|
/***** Get subject and content of the message *****/
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -3378,18 +3380,29 @@ static void Msg_WriteMsgTo (long MsgCod)
|
||||||
NumRecipientsTotal = (unsigned) DB_QueryCOUNT_new ("can not get number of recipients");
|
NumRecipientsTotal = (unsigned) DB_QueryCOUNT_new ("can not get number of recipients");
|
||||||
|
|
||||||
/***** Get recipients of a message from database *****/
|
/***** Get recipients of a message from database *****/
|
||||||
DB_BuildQuery ("(SELECT msg_rcv.UsrCod,'N',msg_rcv.Open,"
|
NumRecipientsKnown =
|
||||||
"usr_data.Surname1 AS S1,usr_data.Surname2 AS S2,usr_data.FirstName AS FN"
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get recipients of a message",
|
||||||
|
"(SELECT msg_rcv.UsrCod,"
|
||||||
|
"'N',"
|
||||||
|
"msg_rcv.Open,"
|
||||||
|
"usr_data.Surname1 AS S1,"
|
||||||
|
"usr_data.Surname2 AS S2,"
|
||||||
|
"usr_data.FirstName AS FN"
|
||||||
" FROM msg_rcv,usr_data"
|
" FROM msg_rcv,usr_data"
|
||||||
" WHERE msg_rcv.MsgCod=%ld AND msg_rcv.UsrCod=usr_data.UsrCod)"
|
" WHERE msg_rcv.MsgCod=%ld"
|
||||||
|
" AND msg_rcv.UsrCod=usr_data.UsrCod)"
|
||||||
" UNION "
|
" UNION "
|
||||||
"(SELECT msg_rcv_deleted.UsrCod,'Y',msg_rcv_deleted.Open,"
|
"(SELECT msg_rcv_deleted.UsrCod,"
|
||||||
"usr_data.Surname1 AS S1,usr_data.Surname2 AS S2,usr_data.FirstName AS FN"
|
"'Y',"
|
||||||
|
"msg_rcv_deleted.Open,"
|
||||||
|
"usr_data.Surname1 AS S1,"
|
||||||
|
"usr_data.Surname2 AS S2,"
|
||||||
|
"usr_data.FirstName AS FN"
|
||||||
" FROM msg_rcv_deleted,usr_data"
|
" FROM msg_rcv_deleted,usr_data"
|
||||||
" WHERE msg_rcv_deleted.MsgCod=%ld AND msg_rcv_deleted.UsrCod=usr_data.UsrCod)"
|
" WHERE msg_rcv_deleted.MsgCod=%ld"
|
||||||
|
" AND msg_rcv_deleted.UsrCod=usr_data.UsrCod)"
|
||||||
" ORDER BY S1,S2,FN",
|
" ORDER BY S1,S2,FN",
|
||||||
MsgCod,MsgCod);
|
MsgCod,MsgCod);
|
||||||
NumRecipientsKnown = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get recipients of a message");
|
|
||||||
|
|
||||||
/***** Check number of recipients *****/
|
/***** Check number of recipients *****/
|
||||||
if (NumRecipientsTotal)
|
if (NumRecipientsTotal)
|
||||||
|
@ -3748,12 +3761,15 @@ void Msg_ListBannedUsrs (void)
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
|
|
||||||
/***** Get my banned users *****/
|
/***** Get my banned users *****/
|
||||||
DB_BuildQuery ("SELECT msg_banned.FromUsrCod FROM msg_banned,usr_data"
|
NumUsrs = (unsigned) DB_QuerySELECT (&mysql_res,"can not get banned users",
|
||||||
|
"SELECT msg_banned.FromUsrCod"
|
||||||
|
" FROM msg_banned,usr_data"
|
||||||
" WHERE msg_banned.ToUsrCod=%ld"
|
" WHERE msg_banned.ToUsrCod=%ld"
|
||||||
" AND msg_banned.FromUsrCod=usr_data.UsrCod"
|
" AND msg_banned.FromUsrCod=usr_data.UsrCod"
|
||||||
" ORDER BY usr_data.Surname1,usr_data.Surname2,usr_data.FirstName",
|
" ORDER BY usr_data.Surname1,"
|
||||||
|
"usr_data.Surname2,"
|
||||||
|
"usr_data.FirstName",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
NumUsrs = (unsigned) DB_QuerySELECT_new (&mysql_res,"can not get banned users");
|
|
||||||
|
|
||||||
if (NumUsrs == 0) // If not result ==> sent message is deleted
|
if (NumUsrs == 0) // If not result ==> sent message is deleted
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender);
|
Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender);
|
||||||
|
|
|
@ -222,13 +222,11 @@ void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat)
|
||||||
NumURL < Net_NUM_WEBS_AND_SOCIAL_NETWORKS;
|
NumURL < Net_NUM_WEBS_AND_SOCIAL_NETWORKS;
|
||||||
NumURL++)
|
NumURL++)
|
||||||
{
|
{
|
||||||
/***** Get user's web / social network from database *****/
|
|
||||||
DB_BuildQuery ("SELECT URL FROM usr_webs"
|
|
||||||
" WHERE UsrCod=%ld AND Web='%s'",
|
|
||||||
UsrDat->UsrCod,Net_WebsAndSocialNetworksDB[NumURL]);
|
|
||||||
|
|
||||||
/***** Check if exists the web / social network for this user *****/
|
/***** Check if exists the web / social network for this user *****/
|
||||||
if (DB_QuerySELECT_new (&mysql_res,"can not get user's web / social network"))
|
if (DB_QuerySELECT (&mysql_res,"can not get user's web / social network",
|
||||||
|
"SELECT URL FROM usr_webs"
|
||||||
|
" WHERE UsrCod=%ld AND Web='%s'",
|
||||||
|
UsrDat->UsrCod,Net_WebsAndSocialNetworksDB[NumURL]))
|
||||||
{
|
{
|
||||||
/* Get URL */
|
/* Get URL */
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -301,13 +299,11 @@ void Net_ShowFormMyWebsAndSocialNets (void)
|
||||||
NumURL++)
|
NumURL++)
|
||||||
{
|
{
|
||||||
/***** Get user's web / social network from database *****/
|
/***** Get user's web / social network from database *****/
|
||||||
DB_BuildQuery ("SELECT URL FROM usr_webs"
|
if (DB_QuerySELECT (&mysql_res,"can not get user's web / social network",
|
||||||
|
"SELECT URL FROM usr_webs"
|
||||||
" WHERE UsrCod=%ld AND Web='%s'",
|
" WHERE UsrCod=%ld AND Web='%s'",
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Net_WebsAndSocialNetworksDB[NumURL]);
|
Net_WebsAndSocialNetworksDB[NumURL]))
|
||||||
|
|
||||||
/***** Check number of rows in result *****/
|
|
||||||
if (DB_QuerySELECT_new (&mysql_res,"can not get user's web / social network"))
|
|
||||||
{
|
{
|
||||||
/***** Read the data comunes a all the users *****/
|
/***** Read the data comunes a all the users *****/
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -437,7 +433,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
extern const char *Txt_PERCENT_of_users;
|
extern const char *Txt_PERCENT_of_users;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumRows;
|
unsigned NumRows = 0; // Initialized to avoid warning
|
||||||
unsigned NumRow;
|
unsigned NumRow;
|
||||||
Net_WebsAndSocialNetworks_t Web;
|
Net_WebsAndSocialNetworks_t Web;
|
||||||
char NetName[Net_MAX_BYTES_NETWORK_NAME + 1];
|
char NetName[Net_MAX_BYTES_NETWORK_NAME + 1];
|
||||||
|
@ -455,13 +451,19 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
switch (Gbl.Scope.Current)
|
switch (Gbl.Scope.Current)
|
||||||
{
|
{
|
||||||
case Sco_SCOPE_SYS:
|
case Sco_SCOPE_SYS:
|
||||||
DB_BuildQuery ("SELECT Web,COUNT(*) AS N"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT Web,COUNT(*) AS N"
|
||||||
" FROM usr_webs"
|
" FROM usr_webs"
|
||||||
" GROUP BY Web"
|
" GROUP BY Web"
|
||||||
" ORDER BY N DESC,Web");
|
" ORDER BY N DESC,Web");
|
||||||
break;
|
break;
|
||||||
case Sco_SCOPE_CTY:
|
case Sco_SCOPE_CTY:
|
||||||
DB_BuildQuery ("SELECT usr_webs.Web,"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT usr_webs.Web,"
|
||||||
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
||||||
" FROM institutions,centres,degrees,courses,crs_usr,usr_webs"
|
" FROM institutions,centres,degrees,courses,crs_usr,usr_webs"
|
||||||
" WHERE institutions.CtyCod=%ld"
|
" WHERE institutions.CtyCod=%ld"
|
||||||
|
@ -475,7 +477,10 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
Gbl.CurrentCty.Cty.CtyCod);
|
Gbl.CurrentCty.Cty.CtyCod);
|
||||||
break;
|
break;
|
||||||
case Sco_SCOPE_INS:
|
case Sco_SCOPE_INS:
|
||||||
DB_BuildQuery ("SELECT usr_webs.Web,"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT usr_webs.Web,"
|
||||||
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
||||||
" FROM centres,degrees,courses,crs_usr,usr_webs"
|
" FROM centres,degrees,courses,crs_usr,usr_webs"
|
||||||
" WHERE centres.InsCod=%ld"
|
" WHERE centres.InsCod=%ld"
|
||||||
|
@ -488,7 +493,10 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
Gbl.CurrentIns.Ins.InsCod);
|
Gbl.CurrentIns.Ins.InsCod);
|
||||||
break;
|
break;
|
||||||
case Sco_SCOPE_CTR:
|
case Sco_SCOPE_CTR:
|
||||||
DB_BuildQuery ("SELECT usr_webs.Web,"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT usr_webs.Web,"
|
||||||
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
||||||
" FROM degrees,courses,crs_usr,usr_webs"
|
" FROM degrees,courses,crs_usr,usr_webs"
|
||||||
" WHERE degrees.CtrCod=%ld"
|
" WHERE degrees.CtrCod=%ld"
|
||||||
|
@ -500,7 +508,10 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
Gbl.CurrentCtr.Ctr.CtrCod);
|
Gbl.CurrentCtr.Ctr.CtrCod);
|
||||||
break;
|
break;
|
||||||
case Sco_SCOPE_DEG:
|
case Sco_SCOPE_DEG:
|
||||||
DB_BuildQuery ("SELECT usr_webs.Web,"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT usr_webs.Web,"
|
||||||
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
||||||
" FROM courses,crs_usr,usr_webs"
|
" FROM courses,crs_usr,usr_webs"
|
||||||
" WHERE courses.DegCod=%ld"
|
" WHERE courses.DegCod=%ld"
|
||||||
|
@ -511,7 +522,10 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
Gbl.CurrentDeg.Deg.DegCod);
|
Gbl.CurrentDeg.Deg.DegCod);
|
||||||
break;
|
break;
|
||||||
case Sco_SCOPE_CRS:
|
case Sco_SCOPE_CRS:
|
||||||
DB_BuildQuery ("SELECT usr_webs.Web,"
|
NumRows =
|
||||||
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get number of users"
|
||||||
|
" with webs / social networks",
|
||||||
|
"SELECT usr_webs.Web,"
|
||||||
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
"COUNT(DISTINCT usr_webs.UsrCod) AS N"
|
||||||
" FROM crs_usr,usr_webs"
|
" FROM crs_usr,usr_webs"
|
||||||
" WHERE crs_usr.CrsCod=%ld"
|
" WHERE crs_usr.CrsCod=%ld"
|
||||||
|
@ -524,8 +538,6 @@ void Net_ShowWebAndSocialNetworksStats (void)
|
||||||
Lay_WrongScopeExit ();
|
Lay_WrongScopeExit ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
NumRows = (unsigned) DB_QuerySELECT_new (&mysql_res,
|
|
||||||
"can not get number of users with webs / social networks");
|
|
||||||
|
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_SOCIAL_NETWORKS],NULL,
|
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_SOCIAL_NETWORKS],NULL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user