diff --git a/swad_account.c b/swad_account.c index 71f938b03..1e4b4946e 100644 --- a/swad_account.c +++ b/swad_account.c @@ -920,7 +920,7 @@ void Acc_AskIfRemoveMyAccount (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } static void Acc_AskIfRemoveOtherUsrAccount (void) @@ -946,7 +946,7 @@ static void Acc_AskIfRemoveOtherUsrAccount (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); diff --git a/swad_action.c b/swad_action.c index 7082714c1..3242f1a73 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4776,21 +4776,24 @@ void Act_FormGoToStart (Act_Action_t NextAction) void Act_FormStart (Act_Action_t NextAction) { - Act_FormStartAnchor (NextAction,NULL); + Act_FormStartAnchorOnSubmit (NextAction,NULL,NULL); } void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor) { - Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 - sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num); - Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor,NULL); // Do put now parameter location (if no open session) + Act_FormStartAnchorOnSubmit (NextAction,Anchor,NULL); } void Act_FormStartOnSubmit (Act_Action_t NextAction,const char *OnSubmit) + { + Act_FormStartAnchorOnSubmit (NextAction,NULL,OnSubmit); + } + +void Act_FormStartAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num); - Act_FormStartInternal (NextAction,true,Gbl.Form.Id,NULL,OnSubmit); // Do put now parameter location (if no open session) + Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session) } void Act_FormStartUnique (Act_Action_t NextAction) diff --git a/swad_action.h b/swad_action.h index 294d1a312..3970209b9 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1564,6 +1564,7 @@ char *Act_GetActionTextFromDB (long ActCod, void Act_FormGoToStart (Act_Action_t NextAction); void Act_FormStart (Act_Action_t NextAction); void Act_FormStartOnSubmit (Act_Action_t NextAction,const char *OnSubmit); +void Act_FormStartAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); void Act_FormStartUnique (Act_Action_t NextAction); void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor); void Act_FormStartUniqueAnchor (Act_Action_t NextAction,const char *Anchor); diff --git a/swad_agenda.c b/swad_agenda.c index a213d7787..1d11fd90b 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -1302,7 +1302,8 @@ void Agd_AskRemEvent (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_event_X, AgdEvent.Event); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, + ActRemEvtMyAgd,NULL,NULL, + Agd_PutCurrentParamsMyAgenda, Lay_REMOVE_BUTTON,Txt_Remove_event); /***** Show events again *****/ diff --git a/swad_assignment.c b/swad_assignment.c index 15978d9fe..ff7580d51 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -974,7 +974,7 @@ void Asg_ReqRemAssignment (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_assignment_X, Asg.Title); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemAsg,NULL,Asg_PutParams, + ActRemAsg,NULL,NULL,Asg_PutParams, Lay_REMOVE_BUTTON,Txt_Remove_assignment); /***** Show assignments again *****/ diff --git a/swad_centre.c b/swad_centre.c index f39efecb6..757d62444 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -2162,7 +2162,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void) /***** Alert with button to go to centre *****/ sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Ctrs.EditingCtr.ShrtName); Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt, - ActSeeDeg,NULL,Ctr_PutParamGoToCtr, + ActSeeDeg,NULL,NULL,Ctr_PutParamGoToCtr, Lay_CONFIRM_BUTTON,Gbl.Title); } else diff --git a/swad_changelog.h b/swad_changelog.h index e952dc374..83c9172bb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -231,19 +231,18 @@ // TODO: Statistics of hits in course accessible by non-editing teachers. -// TODO: "Mostrar de todos modos" button integrated in alert - /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.224.1 (2017-05-25)" +#define Log_PLATFORM_VERSION "SWAD 16.224.2 (2017-05-25)" #define CSS_FILE "swad16.222.css" #define JS_FILE "swad16.206.3.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.224.2: May 25, 2017 Button to show big list of users/courses integrated in alert. (220465 lines) Version 16.224.1: May 25, 2017 User lists are shown when changing type of listing. (220463 lines) Version 16.224: May 25, 2017 Code refactoring related to sections. (220459 lines) Version 16.223.2: May 25, 2017 User lists are shown when clicking on "Update students". (220435 lines) diff --git a/swad_course.c b/swad_course.c index cf0f6640f..65a1f8a6f 100644 --- a/swad_course.c +++ b/swad_course.c @@ -2802,7 +2802,7 @@ void Crs_ContEditAfterChgCrs (void) } /***** End alert *****/ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); /***** Show the form again *****/ Crs_EditCourses (); diff --git a/swad_degree.c b/swad_degree.c index 871f0d214..98548d8f9 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -2276,7 +2276,7 @@ void Deg_ShowAlertAndButtonToGoToDeg (void) /***** Alert with button to go to degree *****/ sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Degs.EditingDeg.ShrtName); Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt, - ActSeeCrs,NULL,Deg_PutParamGoToDeg, + ActSeeCrs,NULL,NULL,Deg_PutParamGoToDeg, Lay_CONFIRM_BUTTON,Gbl.Title); } else diff --git a/swad_enrolment.c b/swad_enrolment.c index 5a510eb97..c945c22d3 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -1854,7 +1854,7 @@ void Enr_AskRemAllStdsThisCrs (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else /***** Show warning indicating no students found *****/ @@ -2143,7 +2143,7 @@ void Enr_AskIfRejectSignUp (void) Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (ActRejSignUp,NULL, + Ale_ShowAlertAndButton2 (ActRejSignUp,NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_REMOVE_BUTTON,Txt_Reject); } @@ -3647,7 +3647,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName) Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL, + Ale_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_CREATE_BUTTON,Txt_Register_user_IN_A_COURSE_OR_DEGREE); } @@ -4079,7 +4079,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -4179,7 +4179,7 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL, + Ale_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_REMOVE_BUTTON, ItsMe ? Txt_Remove_me_as_an_administrator : diff --git a/swad_exam.c b/swad_exam.c index 00ae1f024..00b8282f5 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -372,7 +372,7 @@ void Exa_ReqRemoveExamAnnouncement (void) Exa_FreeMemExamAnnouncement (); /* End alert */ - Ale_ShowAlertAndButton2 (ActRemExaAnn,NULL,Exa_PutParamExaCodToEdit, + Ale_ShowAlertAndButton2 (ActRemExaAnn,NULL,NULL,Exa_PutParamExaCodToEdit, Lay_REMOVE_BUTTON,Txt_Remove); } diff --git a/swad_file_browser.c b/swad_file_browser.c index 21bf27172..0f5125f17 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -6241,7 +6241,7 @@ void Brw_AskRemFileFromTree (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X, FileNameToShow); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - Brw_ActRemoveFile[Gbl.FileBrowser.Type],NULL, + Brw_ActRemoveFile[Gbl.FileBrowser.Type],NULL,NULL, Brw_PutParamsRemFile, Lay_REMOVE_BUTTON, Gbl.FileBrowser.FileType == Brw_IS_FILE ? Txt_Remove_file : @@ -6386,7 +6386,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_folder_X, Gbl.FileBrowser.FilFolLnkName); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - Brw_ActRemoveFolderNotEmpty[Gbl.FileBrowser.Type],NULL, + Brw_ActRemoveFolderNotEmpty[Gbl.FileBrowser.Type],NULL,NULL, Brw_PutParamsRemFolder, Lay_REMOVE_BUTTON,Txt_Remove_folder); } diff --git a/swad_forum.c b/swad_forum.c index d188a0f8d..39410b570 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -4156,7 +4156,7 @@ void For_RequestRemoveThread (void) Txt_Do_you_really_want_to_remove_the_entire_thread); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, For_ActionsDelThrFor[Gbl.Forum.ForumSelected.Type], - For_FORUM_THREADS_SECTION_ID, + For_FORUM_THREADS_SECTION_ID,NULL, For_PutAllHiddenParamsRemThread, Lay_REMOVE_BUTTON,Txt_Remove_thread); Lay_EndSection (); diff --git a/swad_group.c b/swad_group.c index d61a568fa..714222a9b 100644 --- a/swad_group.c +++ b/swad_group.c @@ -3509,7 +3509,7 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_, Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NumGrps); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID, + ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL, Grp_PutParamRemGrpTyp, Lay_REMOVE_BUTTON,Txt_Remove_type_of_group); @@ -3562,7 +3562,8 @@ static void Grp_AskConfirmRemGrp (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_, GrpDat.GrpName,NumStds); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemGrp,Grp_GROUPS_SECTION_ID,Grp_PutParamRemGrp, + ActRemGrp,Grp_GROUPS_SECTION_ID,NULL, + Grp_PutParamRemGrp, Lay_REMOVE_BUTTON,Txt_Remove_group); /***** Show the form to edit groups again *****/ diff --git a/swad_indicator.c b/swad_indicator.c index 2036844b2..a99ab4b96 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -65,6 +65,7 @@ static void Ind_GetParamNumIndicators (void); static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res); static bool Ind_GetIfShowBigList (unsigned NumCrss); static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss); +static void Ind_PutParamsConfirmIWantToSeeBigList (void); static void Ind_GetNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 + Ind_NUM_INDICATORS], unsigned NumCrss,MYSQL_RES *mysql_res); @@ -517,26 +518,23 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss) extern const char *Txt_The_list_of_X_courses_is_too_large_to_be_displayed; extern const char *Txt_Show_anyway; - fprintf (Gbl.F.Out,"