diff --git a/swad_changelog.h b/swad_changelog.h index 5ab2d3f89..b178b4399 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,13 +223,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.194.21 (2017-04-29)" +#define Log_PLATFORM_VERSION "SWAD 16.194.22 (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.22:Apr 29, 2017 Changes in edition of groups. (218433 lines) 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) diff --git a/swad_group.c b/swad_group.c index 0b3606b42..04af789ff 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1337,8 +1337,9 @@ static void Grp_ListGroupsForEdition (void) /* Write icon to open/close group */ fprintf (Gbl.F.Out,""); - Act_FormStart (Grp->Open ? ActCloGrp : - ActOpeGrp); + Act_FormStartAnchor (Grp->Open ? ActCloGrp : + ActOpeGrp, + "groups"); Grp_PutParamGrpCod (Grp->GrpCod); sprintf (Gbl.Title, Grp->Open ? Txt_Group_X_open_click_to_close_it : @@ -1357,8 +1358,9 @@ static void Grp_ListGroupsForEdition (void) /* Write icon to activate file zones for this group */ fprintf (Gbl.F.Out,""); - Act_FormStart (Grp->FileZones ? ActDisFilZonGrp : - ActEnaFilZonGrp); + Act_FormStartAnchor (Grp->FileZones ? ActDisFilZonGrp : + ActEnaFilZonGrp, + "groups"); Grp_PutParamGrpCod (Grp->GrpCod); sprintf (Gbl.Title, Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them : @@ -1377,7 +1379,7 @@ static void Grp_ListGroupsForEdition (void) /* Group type */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgGrpTyp); + Act_FormStartAnchor (ActChgGrpTyp,"groups"); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgMaxStdGrp); + Act_FormStartAnchor (ActChgMaxStdGrp,"groups"); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out," Grp_MAX_STUDENTS_IN_A_GROUP) sprintf (Gbl.Message,Txt_The_group_X_now_has_no_limit_of_students, GrpDat.GrpName); else sprintf (Gbl.Message,Txt_The_maximum_number_of_students_in_the_group_X_is_now_Y, GrpDat.GrpName,NewMaxStds); - Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); } /***** Show the form again *****/ Gbl.CurrentCrs.Grps.MaxStudents = NewMaxStds; - Grp_ReqEditGroups (); + Grp_ReqEditGroupsInternal (AlertType,Gbl.Message); } /*****************************************************************************/ @@ -4114,6 +4111,7 @@ void Grp_RenameGroup (void) struct GroupData GrpDat; char Query[128 + Grp_MAX_BYTES_GROUP_NAME]; char NewNameGrp[Grp_MAX_BYTES_GROUP_NAME + 1]; + Lay_AlertType_t AlertType; /***** Get parameters from form *****/ /* Get the code of the group */ @@ -4130,9 +4128,9 @@ void Grp_RenameGroup (void) /***** Check if new name is empty *****/ if (!NewNameGrp[0]) { + AlertType = Lay_WARNING; sprintf (Gbl.Message,Txt_You_can_not_leave_the_name_of_the_group_X_empty, GrpDat.GrpName); - Lay_ShowAlert (Lay_ERROR,Gbl.Message); } else { @@ -4142,9 +4140,8 @@ void Grp_RenameGroup (void) /***** If group was in database... *****/ if (Grp_CheckIfGroupNameExists (GrpDat.GrpTypCod,NewNameGrp,Gbl.CurrentCrs.Grps.GrpCod)) { - sprintf (Gbl.Message,Txt_The_group_X_already_exists, - NewNameGrp); - Lay_ShowAlert (Lay_WARNING,Gbl.Message); + AlertType = Lay_WARNING; + sprintf (Gbl.Message,Txt_The_group_X_already_exists,NewNameGrp); } else { @@ -4154,23 +4151,23 @@ void Grp_RenameGroup (void) DB_QueryUPDATE (Query,"can not update the name of a group"); /***** Write message to show the change made *****/ + AlertType = Lay_SUCCESS; sprintf (Gbl.Message,Txt_The_group_X_has_been_renamed_as_Y, GrpDat.GrpName,NewNameGrp); - Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); } } else // The same name { + AlertType = Lay_INFO; sprintf (Gbl.Message,Txt_The_name_of_the_group_X_has_not_changed, NewNameGrp); - Lay_ShowAlert (Lay_INFO,Gbl.Message); } } /***** Show the form again *****/ Str_Copy (Gbl.CurrentCrs.Grps.GrpName,NewNameGrp, Grp_MAX_BYTES_GROUP_NAME); - Grp_ReqEditGroups (); + Grp_ReqEditGroupsInternal (AlertType,Gbl.Message); } /*****************************************************************************/