Version 14.93.3

This commit is contained in:
Antonio Cañas Vargas 2015-03-16 20:26:39 +01:00
parent 3b21f8c58e
commit 6adf5a04e0
4 changed files with 46 additions and 44 deletions

View File

@ -103,11 +103,12 @@
/****************************** 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:
// 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.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)

View File

@ -405,7 +405,7 @@ void Gbl_InitializeGlobals (void)
Gbl.Stat.Role = Sta_IDENTIFIED_USRS;
Gbl.Stat.NumAction = ActAll;
Gbl.Stat.RowsPerPage = 50;
Gbl.Stat.UseStatType = Sta_USERS;
Gbl.Stat.UseStatType = Sta_USRS_RANKING;
Gbl.Scope.Current = Sco_SCOPE_CRS;

View File

@ -1267,18 +1267,15 @@ static void Prf_GetAndShowRankingFigure (const char *FieldName)
}
/***** Show row *****/
if (UsrDat.Nickname[0])
{
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:right;\">#%u</td>"
"<td style=\"text-align:left;\">",
Rank);
Prf_ShowUsrInRanking (&UsrDat);
fprintf (Gbl.F.Out,"</td>"
"<td style=\"text-align:right;\">%ld</td>"
"</tr>",
Figure);
}
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:right;\">#%u</td>"
"<td style=\"text-align:left;\">",
Rank);
Prf_ShowUsrInRanking (&UsrDat);
fprintf (Gbl.F.Out,"</td>"
"<td style=\"text-align:right;\">%ld</td>"
"</tr>",
Figure);
}
fprintf (Gbl.F.Out,"</table>");
@ -1352,7 +1349,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
" AND degrees.DegCod=courses.DegCod"
" AND courses.CrsCod=crs_usr.CrsCod"
" 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",
Gbl.CurrentCtr.Ctr.CtrCod);
break;
@ -1409,19 +1406,16 @@ void Prf_GetAndShowRankingClicksPerDay (void)
}
/***** Show row *****/
if (UsrDat.Nickname[0])
{
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:right;\">#%u</td>"
"<td style=\"text-align:left;\">",
Rank);
Prf_ShowUsrInRanking (&UsrDat);
fprintf (Gbl.F.Out,"</td>"
"<td style=\"text-align:right;\">");
Str_WriteFloatNum (NumClicksPerDay);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:right;\">#%u</td>"
"<td style=\"text-align:left;\">",
Rank);
Prf_ShowUsrInRanking (&UsrDat);
fprintf (Gbl.F.Out,"</td>"
"<td style=\"text-align:right;\">");
Str_WriteFloatNum (NumClicksPerDay);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
fprintf (Gbl.F.Out,"</table>");
@ -1444,17 +1438,24 @@ static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat)
bool ShowPhoto;
char PhotoURL[PATH_MAX+1];
/***** User's photo *****/
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO18x24",Pho_ZOOM);
/***** Check if I can see the public profile *****/
if (Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod))
{
/***** User's photo *****/
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO18x24",Pho_ZOOM);
/***** Put form to go to public profile *****/
Act_FormStart (ActSeePubPrf);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_public_profile,"DAT_SMALL");
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
/***** Put form to go to public profile *****/
if (UsrDat->Nickname[0])
{
Act_FormStart (ActSeePubPrf);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_public_profile,"DAT_SMALL");
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
}
}
}

View File

@ -3673,14 +3673,14 @@ void Sta_ShowUseOfPlatform (void)
/***** Show the stat of use selected by user *****/
switch (Gbl.Stat.UseStatType)
{
case Sta_USERS:
/***** Number of users *****/
Sta_GetAndShowUsersStats ();
break;
case Sta_USRS_RANKING:
/***** Users ranking *****/
Sta_GetAndShowUsersRanking ();
break;
case Sta_USERS:
/***** Number of users *****/
Sta_GetAndShowUsersStats ();
break;
case Sta_DEGREES_AND_COURSES:
/***** Number of degrees and courses *****/
Sta_GetAndShowDegCrsStats ();