mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-09 10:15:24 +02:00
Version 16.111.14
This commit is contained in:
parent
178e648523
commit
ff0a98979f
|
@ -701,9 +701,12 @@ void Asg_GetDataOfAssignmentByCod (struct Assignment *Asg)
|
||||||
Asg_GetDataOfAssignment (Asg,Query);
|
Asg_GetDataOfAssignment (Asg,Query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
/***** Clear all assignment data *****/
|
/***** Clear all assignment data *****/
|
||||||
|
Asg->AsgCod = -1L;
|
||||||
Asg_ResetAssignment (Asg);
|
Asg_ResetAssignment (Asg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Get assignment data using its folder name *******************/
|
/*************** Get assignment data using its folder name *******************/
|
||||||
|
@ -729,9 +732,12 @@ void Asg_GetDataOfAssignmentByFolder (struct Assignment *Asg)
|
||||||
Asg_GetDataOfAssignment (Asg,Query);
|
Asg_GetDataOfAssignment (Asg,Query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
/***** Clear all assignment data *****/
|
/***** Clear all assignment data *****/
|
||||||
|
Asg->AsgCod = -1L;
|
||||||
Asg_ResetAssignment (Asg);
|
Asg_ResetAssignment (Asg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************* Get assignment data *******************************/
|
/************************* Get assignment data *******************************/
|
||||||
|
@ -741,15 +747,12 @@ static void Asg_GetDataOfAssignment (struct Assignment *Asg,const char *Query)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned long NumRows;
|
|
||||||
|
|
||||||
/***** Clear all assignment data *****/
|
/***** Clear all assignment data *****/
|
||||||
Asg_ResetAssignment (Asg);
|
Asg_ResetAssignment (Asg);
|
||||||
|
|
||||||
/***** Get data of assignment from database *****/
|
/***** Get data of assignment from database *****/
|
||||||
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get assignment data");
|
if (DB_QuerySELECT (Query,&mysql_res,"can not get assignment data")) // Assignment found...
|
||||||
|
|
||||||
if (NumRows) // Assignment found...
|
|
||||||
{
|
{
|
||||||
/* Get row */
|
/* Get row */
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -793,6 +796,8 @@ static void Asg_GetDataOfAssignment (struct Assignment *Asg,const char *Query)
|
||||||
|
|
||||||
static void Asg_ResetAssignment (struct Assignment *Asg)
|
static void Asg_ResetAssignment (struct Assignment *Asg)
|
||||||
{
|
{
|
||||||
|
if (Asg->AsgCod <= 0) // If > 0 ==> keep value
|
||||||
|
Asg->AsgCod = -1L;
|
||||||
Asg->AsgCod = -1L;
|
Asg->AsgCod = -1L;
|
||||||
Asg->Hidden = false;
|
Asg->Hidden = false;
|
||||||
Asg->UsrCod = -1L;
|
Asg->UsrCod = -1L;
|
||||||
|
@ -1298,8 +1303,11 @@ void Asg_RecFormAssignment (void)
|
||||||
ItsANewAssignment = (NewAsg.AsgCod < 0);
|
ItsANewAssignment = (NewAsg.AsgCod < 0);
|
||||||
|
|
||||||
if (ItsANewAssignment)
|
if (ItsANewAssignment)
|
||||||
|
{
|
||||||
/***** Reset old (current, not existing) assignment data *****/
|
/***** Reset old (current, not existing) assignment data *****/
|
||||||
|
OldAsg.AsgCod = -1L;
|
||||||
Asg_ResetAssignment (&OldAsg);
|
Asg_ResetAssignment (&OldAsg);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Get data of the old (current) assignment from database *****/
|
/***** Get data of the old (current) assignment from database *****/
|
||||||
|
|
|
@ -736,11 +736,13 @@ bool Att_GetDataOfAttEventByCod (struct AttendanceEvent *Att)
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
bool Found;
|
bool Found = false;
|
||||||
|
|
||||||
/***** Reset attendance event data *****/
|
/***** Reset attendance event data *****/
|
||||||
Att_ResetAttendanceEvent (Att);
|
Att_ResetAttendanceEvent (Att);
|
||||||
|
|
||||||
|
if (Att->AttCod > 0)
|
||||||
|
{
|
||||||
/***** Build query *****/
|
/***** Build query *****/
|
||||||
sprintf (Query,"SELECT AttCod,CrsCod,Hidden,UsrCod,"
|
sprintf (Query,"SELECT AttCod,CrsCod,Hidden,UsrCod,"
|
||||||
"UNIX_TIMESTAMP(StartTime),"
|
"UNIX_TIMESTAMP(StartTime),"
|
||||||
|
@ -788,6 +790,7 @@ bool Att_GetDataOfAttEventByCod (struct AttendanceEvent *Att)
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
}
|
||||||
|
|
||||||
return Found;
|
return Found;
|
||||||
}
|
}
|
||||||
|
@ -798,6 +801,7 @@ bool Att_GetDataOfAttEventByCod (struct AttendanceEvent *Att)
|
||||||
|
|
||||||
static void Att_ResetAttendanceEvent (struct AttendanceEvent *Att)
|
static void Att_ResetAttendanceEvent (struct AttendanceEvent *Att)
|
||||||
{
|
{
|
||||||
|
if (Att->AttCod <= 0) // If > 0 ==> keep value
|
||||||
Att->AttCod = -1L;
|
Att->AttCod = -1L;
|
||||||
Att->CrsCod = -1L;
|
Att->CrsCod = -1L;
|
||||||
Att->Hidden = false;
|
Att->Hidden = false;
|
||||||
|
@ -834,13 +838,14 @@ void Att_FreeListAttEvents (void)
|
||||||
|
|
||||||
static void Att_GetAttEventTxtFromDB (long AttCod,char *Txt)
|
static void Att_GetAttEventTxtFromDB (long AttCod,char *Txt)
|
||||||
{
|
{
|
||||||
char Query[512];
|
char Query[256];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
|
||||||
/***** Get text of attendance event from database *****/
|
/***** Get text of attendance event from database *****/
|
||||||
sprintf (Query,"SELECT Txt FROM att_events WHERE AttCod='%ld' AND CrsCod='%ld'",
|
sprintf (Query,"SELECT Txt FROM att_events"
|
||||||
|
" WHERE AttCod='%ld' AND CrsCod='%ld'",
|
||||||
AttCod,Gbl.CurrentCrs.Crs.CrsCod);
|
AttCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get attendance event text");
|
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get attendance event text");
|
||||||
|
|
||||||
|
@ -1123,6 +1128,7 @@ void Att_RequestCreatOrEditAttEvent (void)
|
||||||
if (ItsANewAttEvent)
|
if (ItsANewAttEvent)
|
||||||
{
|
{
|
||||||
/* Reset attendance event data */
|
/* Reset attendance event data */
|
||||||
|
Att.AttCod = -1L;
|
||||||
Att_ResetAttendanceEvent (&Att);
|
Att_ResetAttendanceEvent (&Att);
|
||||||
|
|
||||||
/* Initialize some fields */
|
/* Initialize some fields */
|
||||||
|
|
|
@ -189,13 +189,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.111.13 (2016-12-29)"
|
#define Log_PLATFORM_VERSION "SWAD 16.111.14 (2016-12-29)"
|
||||||
#define CSS_FILE "swad16.111.5.css"
|
#define CSS_FILE "swad16.111.5.css"
|
||||||
#define JS_FILE "swad16.101.js"
|
#define JS_FILE "swad16.101.js"
|
||||||
|
|
||||||
// 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 16.111.14:Dec 29, 2016 Fixed bug in attendance events. (211189 lines)
|
||||||
Version 16.111.13:Dec 29, 2016 Fixed bug in attendance events, reported by Coverity. (211173 lines)
|
Version 16.111.13:Dec 29, 2016 Fixed bug in attendance events, reported by Coverity. (211173 lines)
|
||||||
Version 16.111.12:Dec 29, 2016 Fixed minor bug in groups, reported by Coverity. (? lines)
|
Version 16.111.12:Dec 29, 2016 Fixed minor bug in groups, reported by Coverity. (? lines)
|
||||||
Version 16.111.11:Dec 29, 2016 Fixed minor bug inserting links to nicknames, reported by Coverity. (211149 lines)
|
Version 16.111.11:Dec 29, 2016 Fixed minor bug inserting links to nicknames, reported by Coverity. (211149 lines)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user