diff --git a/soap/swad_web_service.h b/soap/swad_web_service.h index 0607f837f..195f40996 100644 --- a/soap/swad_web_service.h +++ b/soap/swad_web_service.h @@ -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, diff --git a/swad_changelog.h b/swad_changelog.h index 3397ef3ce..f82dee2a5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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: diff --git a/swad_config.h b/swad_config.h index f563a192e..d7486e877 100644 --- a/swad_config.h +++ b/swad_config.h @@ -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 /*****************************************************************************/ diff --git a/swad_web_service.c b/swad_web_service.c index d1e09b3c2..12617f29f 100644 --- a/swad_web_service.c +++ b/swad_web_service.c @@ -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; } diff --git a/swad_web_service.h b/swad_web_service.h index e83ce9573..812e040a3 100644 --- a/swad_web_service.h +++ b/swad_web_service.h @@ -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; /*****************************************************************************/