mirror of https://github.com/acanas/swad-core.git
Version 14.93.3
This commit is contained in:
parent
3b21f8c58e
commit
6adf5a04e0
|
@ -103,11 +103,12 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.93.2 (2015/03/16)"
|
#define Log_PLATFORM_VERSION "SWAD 14.93.3 (2015/03/16)"
|
||||||
|
|
||||||
// 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 14.93.3: Mar 16, 2015 Changes in rankings. (182630 lines)
|
||||||
Version 14.93.2: Mar 16, 2015 New rankings for downloads, forum posts and messages sent. (182628 lines)
|
Version 14.93.2: Mar 16, 2015 New rankings for downloads, forum posts and messages sent. (182628 lines)
|
||||||
Version 14.93.1: Mar 16, 2015 Photos and links to users' profiles in users' ranking. (182560 lines)
|
Version 14.93.1: Mar 16, 2015 Photos and links to users' profiles in users' ranking. (182560 lines)
|
||||||
Version 14.93: Mar 16, 2015 Users' ranking. (182527 lines)
|
Version 14.93: Mar 16, 2015 Users' ranking. (182527 lines)
|
||||||
|
|
|
@ -405,7 +405,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Stat.Role = Sta_IDENTIFIED_USRS;
|
Gbl.Stat.Role = Sta_IDENTIFIED_USRS;
|
||||||
Gbl.Stat.NumAction = ActAll;
|
Gbl.Stat.NumAction = ActAll;
|
||||||
Gbl.Stat.RowsPerPage = 50;
|
Gbl.Stat.RowsPerPage = 50;
|
||||||
Gbl.Stat.UseStatType = Sta_USERS;
|
Gbl.Stat.UseStatType = Sta_USRS_RANKING;
|
||||||
|
|
||||||
Gbl.Scope.Current = Sco_SCOPE_CRS;
|
Gbl.Scope.Current = Sco_SCOPE_CRS;
|
||||||
|
|
||||||
|
|
|
@ -1267,18 +1267,15 @@ static void Prf_GetAndShowRankingFigure (const char *FieldName)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show row *****/
|
/***** Show row *****/
|
||||||
if (UsrDat.Nickname[0])
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
{
|
"<td style=\"text-align:right;\">#%u</td>"
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
"<td style=\"text-align:left;\">",
|
||||||
"<td style=\"text-align:right;\">#%u</td>"
|
Rank);
|
||||||
"<td style=\"text-align:left;\">",
|
Prf_ShowUsrInRanking (&UsrDat);
|
||||||
Rank);
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
Prf_ShowUsrInRanking (&UsrDat);
|
"<td style=\"text-align:right;\">%ld</td>"
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
"</tr>",
|
||||||
"<td style=\"text-align:right;\">%ld</td>"
|
Figure);
|
||||||
"</tr>",
|
|
||||||
Figure);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</table>");
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
@ -1352,7 +1349,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
||||||
" AND degrees.DegCod=courses.DegCod"
|
" AND degrees.DegCod=courses.DegCod"
|
||||||
" AND courses.CrsCod=crs_usr.CrsCod"
|
" AND courses.CrsCod=crs_usr.CrsCod"
|
||||||
" AND crs_usr.UsrCod=usr_figures.UsrCod"
|
" AND crs_usr.UsrCod=usr_figures.UsrCod"
|
||||||
" AND usr_figures.FirstClickTime>0'"
|
" AND usr_figures.FirstClickTime>0"
|
||||||
" ORDER BY NumClicksPerDay DESC,usr_figures.UsrCod LIMIT 100",
|
" ORDER BY NumClicksPerDay DESC,usr_figures.UsrCod LIMIT 100",
|
||||||
Gbl.CurrentCtr.Ctr.CtrCod);
|
Gbl.CurrentCtr.Ctr.CtrCod);
|
||||||
break;
|
break;
|
||||||
|
@ -1409,19 +1406,16 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show row *****/
|
/***** Show row *****/
|
||||||
if (UsrDat.Nickname[0])
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
{
|
"<td style=\"text-align:right;\">#%u</td>"
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
"<td style=\"text-align:left;\">",
|
||||||
"<td style=\"text-align:right;\">#%u</td>"
|
Rank);
|
||||||
"<td style=\"text-align:left;\">",
|
Prf_ShowUsrInRanking (&UsrDat);
|
||||||
Rank);
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
Prf_ShowUsrInRanking (&UsrDat);
|
"<td style=\"text-align:right;\">");
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
Str_WriteFloatNum (NumClicksPerDay);
|
||||||
"<td style=\"text-align:right;\">");
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
Str_WriteFloatNum (NumClicksPerDay);
|
"</tr>");
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
|
||||||
"</tr>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</table>");
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
@ -1444,17 +1438,24 @@ static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat)
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX+1];
|
char PhotoURL[PATH_MAX+1];
|
||||||
|
|
||||||
/***** User's photo *****/
|
/***** Check if I can see the public profile *****/
|
||||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
if (Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod))
|
||||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
{
|
||||||
NULL,
|
/***** User's photo *****/
|
||||||
"PHOTO18x24",Pho_ZOOM);
|
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||||
|
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||||
|
NULL,
|
||||||
|
"PHOTO18x24",Pho_ZOOM);
|
||||||
|
|
||||||
/***** Put form to go to public profile *****/
|
/***** Put form to go to public profile *****/
|
||||||
Act_FormStart (ActSeePubPrf);
|
if (UsrDat->Nickname[0])
|
||||||
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
{
|
||||||
Act_LinkFormSubmit (Txt_View_public_profile,"DAT_SMALL");
|
Act_FormStart (ActSeePubPrf);
|
||||||
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
|
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
Act_LinkFormSubmit (Txt_View_public_profile,"DAT_SMALL");
|
||||||
Act_FormEnd ();
|
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
|
||||||
|
fprintf (Gbl.F.Out,"</a>");
|
||||||
|
Act_FormEnd ();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3673,14 +3673,14 @@ void Sta_ShowUseOfPlatform (void)
|
||||||
/***** Show the stat of use selected by user *****/
|
/***** Show the stat of use selected by user *****/
|
||||||
switch (Gbl.Stat.UseStatType)
|
switch (Gbl.Stat.UseStatType)
|
||||||
{
|
{
|
||||||
case Sta_USERS:
|
|
||||||
/***** Number of users *****/
|
|
||||||
Sta_GetAndShowUsersStats ();
|
|
||||||
break;
|
|
||||||
case Sta_USRS_RANKING:
|
case Sta_USRS_RANKING:
|
||||||
/***** Users ranking *****/
|
/***** Users ranking *****/
|
||||||
Sta_GetAndShowUsersRanking ();
|
Sta_GetAndShowUsersRanking ();
|
||||||
break;
|
break;
|
||||||
|
case Sta_USERS:
|
||||||
|
/***** Number of users *****/
|
||||||
|
Sta_GetAndShowUsersStats ();
|
||||||
|
break;
|
||||||
case Sta_DEGREES_AND_COURSES:
|
case Sta_DEGREES_AND_COURSES:
|
||||||
/***** Number of degrees and courses *****/
|
/***** Number of degrees and courses *****/
|
||||||
Sta_GetAndShowDegCrsStats ();
|
Sta_GetAndShowDegCrsStats ();
|
||||||
|
|
Loading…
Reference in New Issue