mirror of https://github.com/acanas/swad-core.git
Version 15.20.1
This commit is contained in:
parent
5936cfac19
commit
3fad46233d
|
@ -2821,7 +2821,7 @@ static void Att_ListEventsToSelect (void)
|
|||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Update_attendance_according_to_selected_events;
|
||||
extern const char *Txt_Update_attendance;
|
||||
static unsigned UniqueId = 0;
|
||||
unsigned UniqueId;
|
||||
unsigned NumAttEvent;
|
||||
|
||||
/***** Start form to update the attendance
|
||||
|
@ -2849,12 +2849,10 @@ static void Att_ListEventsToSelect (void)
|
|||
Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]);
|
||||
|
||||
/***** List the events *****/
|
||||
for (NumAttEvent = 0, Gbl.RowEvenOdd = 0;
|
||||
for (NumAttEvent = 0, UniqueId = 1, Gbl.RowEvenOdd = 0;
|
||||
NumAttEvent < Gbl.AttEvents.Num;
|
||||
NumAttEvent++)
|
||||
NumAttEvent++, UniqueId++, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
|
||||
{
|
||||
UniqueId++;
|
||||
|
||||
/* Get data of the attendance event from database */
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Gbl.AttEvents.Lst[NumAttEvent]);
|
||||
Att_GetNumStdsTotalWhoAreInAttEvent (&Gbl.AttEvents.Lst[NumAttEvent]);
|
||||
|
@ -2890,8 +2888,6 @@ static void Att_ListEventsToSelect (void)
|
|||
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
||||
/***** Put button to refresh *****/
|
||||
|
@ -3176,10 +3172,10 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
|||
extern const char *Txt_Absent;
|
||||
extern const char *Txt_Student_comment;
|
||||
extern const char *Txt_Teachers_comment;
|
||||
static unsigned UniqueId = 0;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
bool ShowPhoto;
|
||||
unsigned NumAttEvent;
|
||||
unsigned UniqueId;
|
||||
bool Present;
|
||||
char CommentStd[Cns_MAX_BYTES_TEXT+1];
|
||||
char CommentTch[Cns_MAX_BYTES_TEXT+1];
|
||||
|
@ -3230,9 +3226,9 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
|||
UsrDat->FirstName);
|
||||
|
||||
/***** List the events with students *****/
|
||||
for (NumAttEvent = 0;
|
||||
for (NumAttEvent = 0, UniqueId = 1;
|
||||
NumAttEvent < Gbl.AttEvents.Num;
|
||||
NumAttEvent++)
|
||||
NumAttEvent++, UniqueId++)
|
||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||
{
|
||||
/***** Get data of the attendance event from database *****/
|
||||
|
@ -3243,7 +3239,6 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
|||
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Gbl.AttEvents.Lst[NumAttEvent].AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
|
||||
|
||||
/***** Write a row for this event *****/
|
||||
UniqueId++;
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"COLOR%u\"></td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
|
||||
|
|
|
@ -108,11 +108,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.20 (2015/10/24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.20.1 (2015/10/24)"
|
||||
|
||||
// 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 15.20.1: Oct 24, 2015 Detailed clics are displayed in client local date-time. (186333 lines)
|
||||
Version 15.20: Oct 24, 2015 Date-times in notifications, messages and forums are displayed in client local date-time. (186334 lines)
|
||||
Version 15.19: Oct 23, 2015 Surveys date-times are displayed in client local date-time. (186309 lines)
|
||||
Version 15.18: Oct 23, 2015 Attendance date-times are displayed in client local date-time.
|
||||
|
|
|
@ -3227,9 +3227,9 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
|
|||
extern const char *Txt_There_are_new_posts;
|
||||
extern const char *Txt_No_new_posts;
|
||||
extern const char *Txt_Move_thread;
|
||||
static unsigned UniqueId = 0;
|
||||
unsigned NumThr;
|
||||
unsigned NumThrInScreen; // From 0 to Pag_ITEMS_PER_PAGE-1
|
||||
unsigned UniqueId;
|
||||
struct ForumThread Thr;
|
||||
struct UsrData UsrDat;
|
||||
For_ForumOrderType_t Order;
|
||||
|
@ -3248,7 +3248,7 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
|
|||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
||||
for (NumThr = PaginationThrs->FirstItemVisible, NumThrInScreen = 0, Gbl.RowEvenOdd = 0;
|
||||
for (NumThr = PaginationThrs->FirstItemVisible, NumThrInScreen = 0, UniqueId = 0, Gbl.RowEvenOdd = 0;
|
||||
NumThr <= PaginationThrs->LastItemVisible;
|
||||
NumThr++, NumThrInScreen++, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
|
||||
{
|
||||
|
|
|
@ -1023,7 +1023,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
switch (Gbl.Stat.ClicksGroupedBy)
|
||||
{
|
||||
case Sta_CLICKS_CRS_DETAILED_LIST:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE LogCod,UsrCod,Role,DATE_FORMAT(ClickTime,'%%Y%%m%%d%%H%%i%%S') AS F,ActCod FROM %s",
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE LogCod,UsrCod,Role,"
|
||||
"UNIX_TIMESTAMP(ClickTime) AS F,ActCod FROM %s",
|
||||
LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_USR:
|
||||
|
@ -1476,6 +1477,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
MYSQL_ROW row;
|
||||
long LogCod;
|
||||
Rol_Role_t RoleFromLog;
|
||||
unsigned UniqueId;
|
||||
long ActCod;
|
||||
char ActTxt[Act_MAX_LENGTH_ACTION_TXT+1];
|
||||
|
||||
|
@ -1617,9 +1619,9 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Txt_LOG_More_info);
|
||||
|
||||
/***** Write rows back *****/
|
||||
for (NumRow = LastRow, Gbl.RowEvenOdd = 0;
|
||||
for (NumRow = LastRow, UniqueId = 1, Gbl.RowEvenOdd = 0;
|
||||
NumRow >= FirstRow;
|
||||
NumRow--, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
|
||||
NumRow--, UniqueId++, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd)
|
||||
{
|
||||
mysql_data_seek (mysql_res, (my_ulonglong) (NumRow-1));
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
@ -1662,14 +1664,13 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] :
|
||||
"?");
|
||||
|
||||
/* Write the date (in row[3] is the date in YYYYMMDDHHMMSS format) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Dat_WriteDate (row[3]);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
Dat_WriteHourMinute (&row[3][8]);
|
||||
fprintf (Gbl.F.Out,":%c%c </td>",
|
||||
row[3][12],row[3][13]);
|
||||
/* Write the date-time (row[3]) */
|
||||
fprintf (Gbl.F.Out,"<td id=\"date_%u\" class=\"LOG CENTER_TOP COLOR%u\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateTimeFromUTC('date_%u',%ld,' ');"
|
||||
"</script>",
|
||||
UniqueId,Gbl.RowEvenOdd,
|
||||
UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]));
|
||||
|
||||
/* Write the action */
|
||||
if (sscanf (row[4],"%ld",&ActCod) != 1)
|
||||
|
|
Loading…
Reference in New Issue