diff --git a/swad_action.c b/swad_action.c index eb07b8e66..fd2ebdd8f 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1317,7 +1317,7 @@ Messages: 1107. ActHidAnn Hide a global announcement that was active 1108. ActRevAnn Reveal a global announcement that was hidden 1109. ActRemAnn Remove global announcement - 1110. ActSeeOneNot Show (expand) a notice + 1110. ActSeeOneNot Show (expand) a notice 1111. ActWriNot Write a new notice 1112. ActRcvNot Receive and create a new notice 1113. ActHidNot Hide a notice that was active diff --git a/swad_changelog.h b/swad_changelog.h index b1606826c..5ab2d3f89 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,13 +223,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.194.20 (2017-04-28)" +#define Log_PLATFORM_VERSION "SWAD 16.194.21 (2017-04-29)" #define CSS_FILE "swad16.193.4.css" #define JS_FILE "swad16.181.js" // 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 16.194.21:Apr 29, 2017 Changes in edition of groups. (218435 lines) Version 16.194.20:Apr 28, 2017 Changes in edition of groups. (218420 lines) Version 16.194.19:Apr 28, 2017 Changed dialog to remove a non empty type of group. (218397 lines) Version 16.194.18:Apr 28, 2017 Changed dialog to remove a survey. (218388 lines) diff --git a/swad_group.c b/swad_group.c index ca1df3bed..0b3606b42 100644 --- a/swad_group.c +++ b/swad_group.c @@ -59,6 +59,8 @@ extern struct Globals Gbl; /*****************************************************************************/ static void Grp_ReqEditGroupsInternal (Lay_AlertType_t AlertType,const char *Message); +static void Grp_ReqEditGroupsInternal1 (void); +static void Grp_ReqEditGroupsInternal2 (void); static void Grp_EditGroupTypes (void); static void Grp_EditGroups (void); @@ -169,6 +171,20 @@ void Grp_ReqEditGroups (void) } static void Grp_ReqEditGroupsInternal (Lay_AlertType_t AlertType,const char *Message) + { + /***** Put form to edit group types *****/ + Grp_ReqEditGroupsInternal1 (); + + /***** Show optional alert *****/ + if (Message) + if (Message[0]) + Lay_ShowAlert (AlertType,Message); + + /***** Put form to edit groups *****/ + Grp_ReqEditGroupsInternal2 (); + } + +static void Grp_ReqEditGroupsInternal1 (void) { /***** Get list of groups types and groups in this course *****/ Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ALL_GROUP_TYPES); @@ -186,12 +202,10 @@ static void Grp_ReqEditGroupsInternal (Lay_AlertType_t AlertType,const char *Mes /***** Groups *****/ /* Start section */ fprintf (Gbl.F.Out,"
"); + } - /* Show optional alert */ - if (Message) - if (Message[0]) - Lay_ShowAlert (AlertType,Message); - +static void Grp_ReqEditGroupsInternal2 (void) + { /* Put form to edit groups */ if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types... Grp_EditGroups (); @@ -1315,7 +1329,7 @@ static void Grp_ListGroupsForEdition (void) /* Write icon to remove group */ fprintf (Gbl.F.Out,"" ""); - Act_FormStart (ActReqRemGrp); + Act_FormStartAnchor (ActReqRemGrp,"groups"); Grp_PutParamGrpCod (Grp->GrpCod); Lay_PutIconRemove (); Act_FormEnd (); @@ -3430,6 +3444,9 @@ static void Grp_AskConfirmRemGrp (void) struct GroupData GrpDat; unsigned NumStds; + /***** Put form to edit types of group *****/ + Grp_ReqEditGroupsInternal1 (); + /***** Get name of the group from database *****/ GrpDat.GrpCod = Gbl.CurrentCrs.Grps.GrpCod; Grp_GetDataOfGroupByCod (&GrpDat); @@ -3451,11 +3468,11 @@ static void Grp_AskConfirmRemGrp (void) Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Message); /* End alert */ - Lay_ShowAlertAndButton2 (ActRemGrp,NULL,Grp_PutParamRemGrp, + Lay_ShowAlertAndButton2 (ActRemGrp,"groups",Grp_PutParamRemGrp, Lay_REMOVE_BUTTON,Txt_Remove_group); - /***** Show the form again *****/ - Grp_ReqEditGroups (); + /***** Put form to edit groups *****/ + Grp_ReqEditGroupsInternal2 (); } /*****************************************************************************/