Version 15.256.2

This commit is contained in:
Antonio Cañas Vargas 2016-09-19 21:42:35 +02:00
parent da3750369e
commit 1c92aaa5a3
5 changed files with 19 additions and 9 deletions

View File

@ -299,6 +299,12 @@ struct swad__sendAttendanceEventOutput
int attendanceEventCode;
};
/* removeAttendanceEvent */
struct swad__removeAttendanceEventOutput
{
int attendanceEventCode;
};
/* getAttendanceUsers */
struct swad__attendanceUser
{
@ -422,7 +428,7 @@ int swad__getAttendanceEvents (char *wsKey,int courseCode,
int swad__sendAttendanceEvent (char *wsKey,int attendanceEventCode,int courseCode,int hidden,int startTime,int endTime,int commentsTeachersVisible,char *title,char *text,char *groups,
struct swad__sendAttendanceEventOutput *sendAttendanceEventOut);
int swad__removeAttendanceEvent (char *wsKey,int attendanceEventCode,
struct swad__sendAttendanceEventOutput *sendAttendanceEventOut);
struct swad__removeAttendanceEventOutput *removeAttendanceEventOut);
int swad__getAttendanceUsers (char *wsKey,int attendanceEventCode,
struct swad__getAttendanceUsersOutput *getAttendanceUsersOut);
int swad__sendAttendanceUsers (char *wsKey,int attendanceEventCode,char *users,int setOthersAsAbsent,

View File

@ -146,6 +146,7 @@
// 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.256.2: Sep 19, 2016 Fixed bug in web service function removeAttendanceEvent, reported by Rubén Martín Hidalgo. (? lines)
Version 15.256.1: Sep 19, 2016 Fixed bug in web service while sending a message.
Added default values in some database fields. (204741 lines)
6 changes necessary in database:

View File

@ -28,9 +28,9 @@
/** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
#define LOCALHOST_UBUNTU // Comment this line if not applicable
//#define OPENSWAD_ORG // Comment this line if not applicable
#define SWAD_UGR_ES // Comment this line if not applicable
//#define SWAD_UGR_ES // Comment this line if not applicable
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
/*****************************************************************************/

View File

@ -153,7 +153,9 @@ static const char *Svc_Functions[1+Svc_NUM_FUNCTIONS] =
"sendAttendanceUsers", // 22
"createAccount", // 23
"getMarks", // 24
"findUsers", // 25
"getTrivialQuestion", // 25
"findUsers", // 26
"removeAttendanceEvent", // 27
};
/* Web service roles (they do not match internal swad-core roles) */
@ -2379,15 +2381,15 @@ int swad__sendAttendanceEvent (struct soap *soap,
int swad__removeAttendanceEvent (struct soap *soap,
char *wsKey,int attendanceEventCode, // input
struct swad__sendAttendanceEventOutput *sendAttendanceEventOut) // output
struct swad__removeAttendanceEventOutput *removeAttendanceEventOut) // output
{
int ReturnCode;
struct AttendanceEvent Att;
/***** Initializations *****/
Gbl.soap = soap;
Gbl.WebService.Function = Svc_sendAttendanceEvent;
sendAttendanceEventOut->attendanceEventCode = 0;
Gbl.WebService.Function = Svc_removeAttendanceEvent;
removeAttendanceEventOut->attendanceEventCode = 0;
/***** Check web service key *****/
if ((ReturnCode = Svc_CheckWSKey (wsKey)) != SOAP_OK)
@ -2435,7 +2437,7 @@ int swad__removeAttendanceEvent (struct soap *soap,
/***** Remove the attendance event from database *****/
Att_RemoveAttEventFromDB (Att.AttCod);
sendAttendanceEventOut->attendanceEventCode = Att.AttCod;
removeAttendanceEventOut->attendanceEventCode = Att.AttCod;
return SOAP_OK;
}

View File

@ -31,7 +31,7 @@
/***************************** Public constants ******************************/
/*****************************************************************************/
#define Svc_NUM_FUNCTIONS 26
#define Svc_NUM_FUNCTIONS 27
/*****************************************************************************/
/******************************* Public types ********************************/
@ -67,6 +67,7 @@ typedef enum
Svc_getMarks = 24,
Svc_getTrivialQuestion = 25,
Svc_findUsers = 26,
Svc_removeAttendanceEvent = 27,
} Svc_Function_t;
/*****************************************************************************/