diff --git a/swad_ID.c b/swad_ID.c index 66114bd5..a1445fb1 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -494,7 +494,7 @@ void ID_PutLinkToChangeUsrIDs (void) /***** Link for changing the password *****/ if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me - Lay_PutContextualLink (ActFrmMyAcc,NULL, + Lay_PutContextualLink (ActFrmMyAcc,NULL,NULL, "arroba64x64.gif", Txt_Change_IDs,Txt_Change_IDs, NULL); @@ -502,7 +502,7 @@ void ID_PutLinkToChangeUsrIDs (void) Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActFrmIDsStd : (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActFrmIDsTch : ActFrmIDsOth), // Guest, visitor or admin - Usr_PutParamOtherUsrCodEncrypted, + NULL,Usr_PutParamOtherUsrCodEncrypted, "arroba64x64.gif", Txt_Change_IDs,Txt_Change_IDs, NULL); diff --git a/swad_QR.c b/swad_QR.c index 96270427..6d2f0de9 100644 --- a/swad_QR.c +++ b/swad_QR.c @@ -69,7 +69,7 @@ void QR_PutLinkToPrintQRCode (Act_Action_t Action) extern const char *Txt_QR_code; /***** Link to print QR *****/ - Lay_PutContextualLink (Action,QR_PutParamQRString, + Lay_PutContextualLink (Action,NULL,QR_PutParamQRString, "qr64x64.gif", Txt_QR_code,NULL, NULL); diff --git a/swad_account.c b/swad_account.c index 36a91f2e..852b699f 100644 --- a/swad_account.c +++ b/swad_account.c @@ -97,7 +97,7 @@ void Acc_PutLinkToCreateAccount (void) { extern const char *Txt_Create_account; - Lay_PutContextualLink (ActFrmMyAcc,NULL, + Lay_PutContextualLink (ActFrmMyAcc,NULL,NULL, "arroba64x64.gif", Txt_Create_account,Txt_Create_account, NULL); @@ -512,7 +512,7 @@ static void Acc_PutLinkToRemoveMyAccount (void) { extern const char *Txt_Remove_account; - Lay_PutContextualLink (ActReqRemMyAcc,Acc_PutParamsToRemoveMyAccount, + Lay_PutContextualLink (ActReqRemMyAcc,NULL,Acc_PutParamsToRemoveMyAccount, "remove-on64x64.png", Txt_Remove_account,Txt_Remove_account, NULL); diff --git a/swad_agenda.c b/swad_agenda.c index 9618caed..a46f2853 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -644,7 +644,7 @@ static void Agd_PutIconToCreateNewEvent (void) /***** Put form to create a new event *****/ Gbl.Agenda.AgdCodToEdit = -1L; - Lay_PutContextualLink (ActFrmNewEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActFrmNewEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "plus64x64.png", Txt_New_event,NULL, NULL); @@ -655,7 +655,7 @@ static void Agd_PutIconToViewEditMyFullAgenda (void) extern const char *Txt_Edit; /***** Put form to create a new event *****/ - Lay_PutContextualLink (ActSeeMyAgd,NULL, + Lay_PutContextualLink (ActSeeMyAgd,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); @@ -683,8 +683,8 @@ static void Agd_PutIconsOtherPublicAgenda (void) /***** Button to view user's public profile *****/ if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility, &Gbl.Usrs.Other.UsrDat)) - Lay_PutContextualLink (ActSeeOthPubPrf, - Usr_PutParamOtherUsrCodEncrypted, + Lay_PutContextualLink (ActSeeOthPubPrf,NULL, + Usr_PutParamOtherUsrCodEncrypted, "usr64x64.gif", Txt_Another_user_s_profile,NULL, NULL); @@ -692,13 +692,13 @@ static void Agd_PutIconsOtherPublicAgenda (void) /***** Button to view user's record card *****/ if (Usr_CheckIfICanViewRecordStd (&Gbl.Usrs.Other.UsrDat)) /* View student's records: common record card and course record card */ - Lay_PutContextualLink (ActSeeRecOneStd, - Usr_PutParamOtherUsrCodEncrypted, + Lay_PutContextualLink (ActSeeRecOneStd,NULL, + Usr_PutParamOtherUsrCodEncrypted, "card64x64.gif", Txt_View_record_for_this_course,NULL, NULL); else if (Usr_CheckIfICanViewRecordTch (&Gbl.Usrs.Other.UsrDat)) - Lay_PutContextualLink (ActSeeRecOneTch, + Lay_PutContextualLink (ActSeeRecOneTch,NULL, Usr_PutParamOtherUsrCodEncrypted, "card64x64.gif", Txt_View_record_and_office_hours,NULL, @@ -853,37 +853,37 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent) Gbl.Agenda.AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links /***** Put form to remove event *****/ - Lay_PutContextualLink (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActReqRemEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "remove-on64x64.png", Txt_Remove,NULL, NULL); /***** Put form to hide/show event *****/ if (AgdEvent->Hidden) - Lay_PutContextualLink (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActShoEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "eye-slash-on64x64.png", Txt_Show,NULL, NULL); else - Lay_PutContextualLink (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActHidEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "eye-on64x64.png", Txt_Hide,NULL, NULL); /***** Put form to edit event *****/ - Lay_PutContextualLink (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActEdiOneEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "edit64x64.png", Txt_Edit,NULL, NULL); /***** Put form to make event public/private *****/ if (AgdEvent->Public) - Lay_PutContextualLink (ActPrvEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActPrvEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "unlock-on64x64.png", Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private,NULL, NULL); else - Lay_PutContextualLink (ActPubEvtMyAgd,Agd_PutCurrentParamsMyAgenda, + Lay_PutContextualLink (ActPubEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, "lock-on64x64.png", Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses,NULL, NULL); diff --git a/swad_announcement.c b/swad_announcement.c index f5d9c8fe..70e0b2ab 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -181,7 +181,7 @@ static void Ann_PutIconToAddNewAnnouncement (void) { extern const char *Txt_New_announcement; - Lay_PutContextualLink (ActWriAnn,NULL, + Lay_PutContextualLink (ActWriAnn,NULL,NULL, "plus64x64.png", Txt_New_announcement,NULL, NULL); @@ -308,7 +308,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, if (ICanEdit) { /***** Put form to remove announcement *****/ - Lay_PutContextualLink (ActRemAnn,Ann_PutParams, + Lay_PutContextualLink (ActRemAnn,NULL,Ann_PutParams, "remove-on64x64.png", Txt_Remove,NULL, NULL); @@ -317,13 +317,13 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, switch (Status) { case Ann_ACTIVE_ANNOUNCEMENT: - Lay_PutContextualLink (ActHidAnn,Ann_PutParams, + Lay_PutContextualLink (ActHidAnn,NULL,Ann_PutParams, "eye-on64x64.png", Txt_NOTICE_Active_Mark_as_obsolete,NULL, NULL); break; case Ann_OBSOLETE_ANNOUNCEMENT: - Lay_PutContextualLink (ActRevAnn,Ann_PutParams, + Lay_PutContextualLink (ActRevAnn,NULL,Ann_PutParams, "eye-slash-on64x64.png", Txt_NOTICE_Obsolete_Mark_as_active,NULL, NULL); @@ -361,7 +361,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, } else /***** Put form to mark announcement as seen *****/ - Lay_PutContextualLink (ActAnnSee,Ann_PutParams, + Lay_PutContextualLink (ActAnnSee,NULL,Ann_PutParams, "remove-on64x64.png", Txt_Do_not_show_again,Txt_Do_not_show_again, NULL); diff --git a/swad_assignment.c b/swad_assignment.c index 526de652..58e92f17 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -249,7 +249,7 @@ static void Asg_PutIconToCreateNewAsg (void) extern const char *Txt_New_assignment; /***** Put form to create a new assignment *****/ - Lay_PutContextualLink (ActFrmNewAsg,Asg_PutParamsToCreateNewAsg, + Lay_PutContextualLink (ActFrmNewAsg,NULL,Asg_PutParamsToCreateNewAsg, "plus64x64.png", Txt_New_assignment,NULL, NULL); @@ -522,25 +522,25 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) Gbl.Asgs.AsgCodToEdit = AsgCod; // Used as parameter in contextual links /***** Put form to remove assignment *****/ - Lay_PutContextualLink (ActReqRemAsg,Asg_PutParams, + Lay_PutContextualLink (ActReqRemAsg,NULL,Asg_PutParams, "remove-on64x64.png", Txt_Remove,NULL, NULL); /***** Put form to hide/show assignment *****/ if (Hidden) - Lay_PutContextualLink (ActShoAsg,Asg_PutParams, + Lay_PutContextualLink (ActShoAsg,NULL,Asg_PutParams, "eye-slash-on64x64.png", Txt_Show,NULL, NULL); else - Lay_PutContextualLink (ActHidAsg,Asg_PutParams, + Lay_PutContextualLink (ActHidAsg,NULL,Asg_PutParams, "eye-on64x64.png", Txt_Hide,NULL, NULL); /***** Put form to edit assignment *****/ - Lay_PutContextualLink (ActEdiOneAsg,Asg_PutParams, + Lay_PutContextualLink (ActEdiOneAsg,NULL,Asg_PutParams, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_attendance.c b/swad_attendance.c index c5e17462..2e41d0a6 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -175,7 +175,7 @@ void Att_SeeAttEvents (void) } /* Put link to my QR code */ - Lay_PutContextualLink (ActPrnUsrQR,Usr_PutParamMyUsrCodEncrypted, + Lay_PutContextualLink (ActPrnUsrQR,NULL,Usr_PutParamMyUsrCodEncrypted, "qr64x64.gif", Txt_QR_code,Txt_QR_code, NULL); @@ -317,7 +317,7 @@ static void Att_PutIconToCreateNewAttEvent (void) extern const char *Txt_New_event; /***** Put form to create a new attendance event *****/ - Lay_PutContextualLink (ActFrmNewAtt,Att_PutParamsToCreateNewAttEvent, + Lay_PutContextualLink (ActFrmNewAtt,NULL,Att_PutParamsToCreateNewAttEvent, "plus64x64.png", Txt_New_event,NULL, NULL); @@ -509,7 +509,7 @@ static void Att_PutFormToListMyAttendance (void) { extern const char *Txt_Attendance_list; - Lay_PutContextualLink (ActSeeLstMyAtt,NULL, + Lay_PutContextualLink (ActSeeLstMyAtt,NULL,NULL, "list64x64.gif", Txt_Attendance_list,Txt_Attendance_list, NULL); @@ -523,7 +523,7 @@ static void Att_PutFormToListStdsAttendance (void) { extern const char *Txt_Attendance_list; - Lay_PutContextualLink (ActReqLstStdAtt,Att_PutFormToListStdsParams, + Lay_PutContextualLink (ActReqLstStdAtt,NULL,Att_PutFormToListStdsParams, "list64x64.gif", Txt_Attendance_list,Txt_Attendance_list, NULL); @@ -552,25 +552,25 @@ static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden) Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links /***** Put form to remove attendance event *****/ - Lay_PutContextualLink (ActReqRemAtt,Att_PutParams, + Lay_PutContextualLink (ActReqRemAtt,NULL,Att_PutParams, "remove-on64x64.png", Txt_Remove,NULL, NULL); /***** Put form to hide/show attendance event *****/ if (Hidden) - Lay_PutContextualLink (ActShoAtt,Att_PutParams, + Lay_PutContextualLink (ActShoAtt,NULL,Att_PutParams, "eye-slash-on64x64.png", Txt_Show,NULL, NULL); else - Lay_PutContextualLink (ActHidAtt,Att_PutParams, + Lay_PutContextualLink (ActHidAtt,NULL,Att_PutParams, "eye-on64x64.png", Txt_Hide,NULL, NULL); /***** Put form to edit attendance event *****/ - Lay_PutContextualLink (ActEdiOneAtt,Att_PutParams, + Lay_PutContextualLink (ActEdiOneAtt,NULL,Att_PutParams, "edit64x64.png", Txt_Edit,NULL, NULL); @@ -2971,7 +2971,7 @@ static void Att_PutIconToPrintMyList (void) extern const char *Txt_Print; /***** Link to print view *****/ - Lay_PutContextualLink (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams, + Lay_PutContextualLink (ActPrnLstMyAtt,NULL,Att_PutFormToPrintMyListParams, "print64x64.png", Txt_Print,NULL, NULL); @@ -2994,7 +2994,7 @@ static void Att_PutIconToPrintStdsList (void) extern const char *Txt_Print; /***** Link to print view *****/ - Lay_PutContextualLink (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList, + Lay_PutContextualLink (ActPrnLstStdAtt,NULL,Att_PutParamsToPrintStdsList, "print64x64.png", Txt_Print,NULL, NULL); diff --git a/swad_banner.c b/swad_banner.c index be419f94..cd9393ed 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -82,7 +82,7 @@ void Ban_PutLinkToViewBanners (void) { extern const char *Txt_Banners; - Lay_PutContextualLink (ActSeeBan,NULL, + Lay_PutContextualLink (ActSeeBan,NULL,NULL, "picture64x64.gif", Txt_Banners,Txt_Banners, NULL); @@ -174,7 +174,7 @@ static void Ban_PutFormToEditBanners (void) if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) /***** Link to edit banners *****/ - Lay_PutContextualLink (ActEdiBan,NULL, + Lay_PutContextualLink (ActEdiBan,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_calendar.c b/swad_calendar.c index 80a99747..54d517fc 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -349,7 +349,7 @@ static void Cal_PutIconToPrintCalendarSys (void) extern const char *Txt_Print; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalSys,NULL, + Lay_PutContextualLink (ActPrnCalSys,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -360,7 +360,7 @@ static void Cal_PutIconToPrintCalendarCty (void) extern const char *Txt_Print; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalCty,NULL, + Lay_PutContextualLink (ActPrnCalCty,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -372,7 +372,7 @@ static void Cal_PutIconToPrintCalendarIns (void) extern const char *Txt_Holidays; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalIns,NULL, + Lay_PutContextualLink (ActPrnCalIns,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -380,7 +380,7 @@ static void Cal_PutIconToPrintCalendarIns (void) /***** View holidays *****/ if (Gbl.Hlds.Num || // There are holidays Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin - Lay_PutContextualLink (ActSeeHld,NULL, + Lay_PutContextualLink (ActSeeHld,NULL,NULL, "holiday64x64.png", Txt_Holidays,NULL, NULL); @@ -391,7 +391,7 @@ static void Cal_PutIconToPrintCalendarCtr (void) extern const char *Txt_Print; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalCtr,NULL, + Lay_PutContextualLink (ActPrnCalCtr,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -402,7 +402,7 @@ static void Cal_PutIconToPrintCalendarDeg (void) extern const char *Txt_Print; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalDeg,NULL, + Lay_PutContextualLink (ActPrnCalDeg,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -413,7 +413,7 @@ static void Cal_PutIconToPrintCalendarCrs (void) extern const char *Txt_Print; /***** Print calendar *****/ - Lay_PutContextualLink (ActPrnCalCrs,NULL, + Lay_PutContextualLink (ActPrnCalCrs,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); diff --git a/swad_centre.c b/swad_centre.c index 7e6a0612..1ae60f8d 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -671,7 +671,7 @@ static void Ctr_PutIconsToPrintAndUpload (void) extern const char *Txt_Print; /***** Link to print info about centre *****/ - Lay_PutContextualLink (ActPrnCtrInf,NULL, + Lay_PutContextualLink (ActPrnCtrInf,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -706,7 +706,7 @@ static void Ctr_PutIconToChangePhoto (void) (unsigned) Gbl.CurrentCtr.Ctr.CtrCod, (unsigned) Gbl.CurrentCtr.Ctr.CtrCod); PhotoExists = Fil_CheckIfPathExists (PathPhoto); - Lay_PutContextualLink (ActReqCtrPho,NULL, + Lay_PutContextualLink (ActReqCtrPho,NULL,NULL, "photo64x64.gif", PhotoExists ? Txt_Change_photo : Txt_Upload_photo,NULL, @@ -822,7 +822,7 @@ static void Ctr_PutIconToEditCentres (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiCtr,NULL, + Lay_PutContextualLink (ActEdiCtr,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_changelog.h b/swad_changelog.h index f8b3c0b6..7e581109 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -214,13 +214,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.181 (2017-04-17)" +#define Log_PLATFORM_VERSION "SWAD 16.181.1 (2017-04-17)" #define CSS_FILE "swad16.181.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.181.1: Apr 17, 2017 Code refactoring in forums. (217538 lines) Version 16.181: Apr 17, 2017 Changes in layout of messages. Changes in layout of some tables. Fixed bug in forums. (217560 lines) diff --git a/swad_connected.c b/swad_connected.c index fddd79d7..2ab6c7de 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -141,7 +141,7 @@ void Con_PutLinkToLastClicks (void) { extern const char *Txt_Last_clicks; - Lay_PutContextualLink (ActLstClk,NULL, + Lay_PutContextualLink (ActLstClk,NULL,NULL, "mouse-pointer64x64.png", Txt_Last_clicks,Txt_Last_clicks, NULL); diff --git a/swad_country.c b/swad_country.c index 7e8bcecc..83b5df0d 100644 --- a/swad_country.c +++ b/swad_country.c @@ -482,7 +482,7 @@ static void Cty_PutIconToPrint (void) { extern const char *Txt_Print; - Lay_PutContextualLink (ActPrnCtyInf,NULL, + Lay_PutContextualLink (ActPrnCtyInf,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -774,7 +774,7 @@ static void Cty_PutIconToEditCountries (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiCty,NULL, + Lay_PutContextualLink (ActEdiCty,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_course.c b/swad_course.c index 3433eb54..29be5d71 100644 --- a/swad_course.c +++ b/swad_course.c @@ -494,7 +494,7 @@ static void Crs_PutIconToPrint (void) { extern const char *Txt_Print; - Lay_PutContextualLink (ActPrnCrsInf,NULL, + Lay_PutContextualLink (ActPrnCrsInf,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -1223,7 +1223,7 @@ static void Crs_PutIconToEditCourses (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiCrs,NULL, + Lay_PutContextualLink (ActEdiCrs,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); @@ -2908,7 +2908,7 @@ static void Crs_PutLinkToSearchCourses (void) (Gbl.CurrentIns.Ins.InsCod > 0 ? ActInsReqSch : (Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtyReqSch : ActSysReqSch)))), - Sch_PutLinkToSearchCoursesParams, + NULL,Sch_PutLinkToSearchCoursesParams, "search64x64.gif", Txt_Search_courses,Txt_Search_courses, NULL); @@ -2929,7 +2929,7 @@ void Crs_PutFormToSelectMyCourses (void) extern const char *Txt_My_courses; /***** Put form to search / select courses *****/ - Lay_PutContextualLink (ActMyCrs,NULL, + Lay_PutContextualLink (ActMyCrs,NULL,NULL, "hierarchy64x64.gif", Txt_My_courses,Txt_My_courses, NULL); @@ -3305,7 +3305,7 @@ void Crs_PutLinkToRemoveOldCrss (void) extern const char *Txt_Eliminate_old_courses; /***** Put form to remove old courses *****/ - Lay_PutContextualLink (ActReqRemOldCrs,NULL, + Lay_PutContextualLink (ActReqRemOldCrs,NULL,NULL, "remove-on64x64.png", Txt_Eliminate_old_courses,Txt_Eliminate_old_courses, NULL); diff --git a/swad_degree.c b/swad_degree.c index e294625a..0f729876 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -553,7 +553,7 @@ static void Deg_PutIconsToPrintAndUpload (void) extern const char *Txt_Print; /***** Link to print info about degree *****/ - Lay_PutContextualLink (ActPrnDegInf,NULL, + Lay_PutContextualLink (ActPrnDegInf,NULL,NULL, "print64x64.png", Txt_Print,NULL, NULL); @@ -1255,7 +1255,7 @@ static void Deg_PutIconToEditDegrees (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiDeg,NULL, + Lay_PutContextualLink (ActEdiDeg,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_degree_type.c b/swad_degree_type.c index 2d94ad65..f1c8f704 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -130,7 +130,7 @@ void DT_PutIconToViewDegreeTypes (void) { extern const char *Txt_Types_of_degree; - Lay_PutContextualLink (ActSeeDegTyp,NULL, + Lay_PutContextualLink (ActSeeDegTyp,NULL,NULL, "hierarchy64x64.png", Txt_Types_of_degree,NULL, NULL); @@ -332,7 +332,7 @@ static void DT_PutIconToEditDegTypes (void) if (IsCentreTab && // Only editable in centre tab Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only editable by system admins - Lay_PutContextualLink (ActEdiDegTyp,NULL, + Lay_PutContextualLink (ActEdiDegTyp,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_department.c b/swad_department.c index feafba52..7081ded5 100644 --- a/swad_department.c +++ b/swad_department.c @@ -211,7 +211,7 @@ static void Dpt_PutIconToEditDpts (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiDpt,NULL, + Lay_PutContextualLink (ActEdiDpt,NULL,NULL, "edit64x64.png", Txt_Edit,NULL, NULL); diff --git a/swad_duplicate.c b/swad_duplicate.c index 4348b368..18604d86 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -115,7 +115,7 @@ void Dup_PutLinkToListDupUsrs (void) extern const char *Txt_Duplicate_USERS; /***** Put form to remove old users *****/ - Lay_PutContextualLink (ActLstDupUsr,NULL, + Lay_PutContextualLink (ActLstDupUsr,NULL,NULL, "usrs64x64.gif", Txt_Duplicate_USERS,Txt_Duplicate_USERS, NULL); diff --git a/swad_enrolment.c b/swad_enrolment.c index 3c7d76e0..8d742314 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -180,7 +180,7 @@ void Enr_PutLinkToRequestSignUp (void) extern const char *Txt_Sign_up; /***** Show the form *****/ - Lay_PutContextualLink (ActReqSignUp,NULL, + Lay_PutContextualLink (ActReqSignUp,NULL,NULL, "enrollmentrequest64x64.gif", Txt_Sign_up,Txt_Sign_up, NULL); @@ -681,7 +681,7 @@ void Enr_PutLinkToRemOldUsrs (void) extern const char *Txt_Eliminate_old_users; /***** Put form to remove old users *****/ - Lay_PutContextualLink (ActReqRemOldUsr,NULL, + Lay_PutContextualLink (ActReqRemOldUsr,NULL,NULL, "remove-on64x64.png", Txt_Eliminate_old_users,Txt_Eliminate_old_users, NULL); @@ -1736,7 +1736,7 @@ static void Enr_PutLinkToRemAllStdsThisCrs (void) extern const char *Txt_Remove_all_students; /***** Put form to remove all the students in the current course *****/ - Lay_PutContextualLink (ActReqRemAllStdCrs,NULL, + Lay_PutContextualLink (ActReqRemAllStdCrs,NULL,NULL, "remove-on64x64.png", Txt_Remove_all_students,Txt_Remove_all_students, NULL); @@ -2905,7 +2905,7 @@ void Enr_PutLinkToAdminOneUsr (Act_Action_t NextAction) const char *TitleText = Enr_ICanAdminOtherUsrs () ? Txt_Administer_one_user : Txt_Administer_me; - Lay_PutContextualLink (NextAction,NULL, + Lay_PutContextualLink (NextAction,NULL,NULL, "config64x64.gif", TitleText,TitleText, NULL); @@ -2924,7 +2924,8 @@ void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role) Lay_PutContextualLink (Role == Rol_STUDENT ? ActReqEnrSevStd : ActReqEnrSevTch, - NULL,"config64x64.gif", + NULL,NULL, + "config64x64.gif", TitleText,TitleText, NULL); } diff --git a/swad_exam.c b/swad_exam.c index 0bd3ca33..71725b7b 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -707,7 +707,7 @@ static void Exa_PutIconToCreateNewExamAnnouncement (void) { extern const char *Txt_New_announcement_OF_EXAM; - Lay_PutContextualLink (ActEdiExaAnn,NULL, + Lay_PutContextualLink (ActEdiExaAnn,NULL,NULL, "plus64x64.png", Txt_New_announcement_OF_EXAM,NULL, NULL); @@ -1546,7 +1546,7 @@ static void Exa_PutIconsExamAnnouncement (void) Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) { /***** Link to remove this exam announcement *****/ - Lay_PutContextualLink (ActReqRemExaAnn,Exa_PutParamExaCodToEdit, + Lay_PutContextualLink (ActReqRemExaAnn,NULL,Exa_PutParamExaCodToEdit, "remove-on64x64.png", Txt_Remove,NULL, NULL); @@ -1555,13 +1555,13 @@ static void Exa_PutIconsExamAnnouncement (void) switch (Gbl.ExamAnns.ExaDat.Status) { case Exa_VISIBLE_EXAM_ANNOUNCEMENT: - Lay_PutContextualLink (ActHidExaAnn,Exa_PutParamExaCodToEdit, + Lay_PutContextualLink (ActHidExaAnn,NULL,Exa_PutParamExaCodToEdit, "eye-on64x64.png", Txt_Hide,NULL, NULL); break; case Exa_HIDDEN_EXAM_ANNOUNCEMENT: - Lay_PutContextualLink (ActShoExaAnn,Exa_PutParamExaCodToEdit, + Lay_PutContextualLink (ActShoExaAnn,NULL,Exa_PutParamExaCodToEdit, "eye-slash-on64x64.png", Txt_Show,NULL, NULL); @@ -1571,14 +1571,14 @@ static void Exa_PutIconsExamAnnouncement (void) } /***** Link to edit this exam announcement *****/ - Lay_PutContextualLink (ActEdiExaAnn,Exa_PutParamExaCodToEdit, + Lay_PutContextualLink (ActEdiExaAnn,NULL,Exa_PutParamExaCodToEdit, "edit64x64.png", Txt_Edit,NULL, NULL); } /***** Link to print view *****/ - Lay_PutContextualLink (ActPrnExaAnn,Exa_PutParamExaCodToEdit, + Lay_PutContextualLink (ActPrnExaAnn,NULL,Exa_PutParamExaCodToEdit, "print64x64.png", Txt_Print,NULL, NULL); diff --git a/swad_file_browser.c b/swad_file_browser.c index 8f74f586..a1b2c301 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3681,14 +3681,14 @@ static void Brw_PutIconsFileBrowser (void) break; case Brw_ICON_VIEW: Lay_PutContextualLink (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type], - Brw_PutHiddenParamFullTreeIfSelected, + NULL,Brw_PutHiddenParamFullTreeIfSelected, "eye-on64x64.png", Txt_View,NULL, NULL); break; case Brw_ICON_EDIT: Lay_PutContextualLink (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type], - Brw_PutHiddenParamFullTreeIfSelected, + NULL,Brw_PutHiddenParamFullTreeIfSelected, "edit64x64.png", Txt_Edit,NULL, NULL); @@ -11568,7 +11568,8 @@ static void Brw_PutLinkToAskRemOldFiles (void) { extern const char *Txt_Remove_old_files; - Lay_PutContextualLink (ActReqRemOldBrf,Brw_PutHiddenParamFullTreeIfSelected, + Lay_PutContextualLink (ActReqRemOldBrf,NULL, + Brw_PutHiddenParamFullTreeIfSelected, "remove-on64x64.png", Txt_Remove_old_files,Txt_Remove_old_files, NULL); diff --git a/swad_follow.c b/swad_follow.c index bec3d39d..825bea7a 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -94,7 +94,7 @@ void Fol_PutLinkWhoToFollow (void) { extern const char *Txt_Who_to_follow; - Lay_PutContextualLink (ActSeeSocPrf,NULL, + Lay_PutContextualLink (ActSeeSocPrf,NULL,NULL, "follow64x64.png", Txt_Who_to_follow,Txt_Who_to_follow, NULL); diff --git a/swad_forum.c b/swad_forum.c index e7655ff1..63175bd9 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -284,7 +284,7 @@ static unsigned For_GetNumPstsInThr (long ThrCod); static unsigned For_GetNumMyPstInThr (long ThrCod); static time_t For_GetThrReadTime (long ThrCod); static void For_DeleteThrFromReadThrs (long ThrCod); -static void For_ShowThreadPosts (long ThrCod); +static void For_ShowThreadPosts (void); static void For_PutIconNewPost (void); static void For_ShowAForumPost (struct Forum *WhichForum,struct ForumThread *Thr,unsigned PstNum,long PstCod, @@ -296,7 +296,7 @@ static void For_GetPstData (long PstCod,long *UsrCod,time_t *CreatTimeUTC, struct Image *Image); static void For_WriteNumberOfPosts (struct Forum *WhichForum,long UsrCod); -static void For_PutParamWhichForum (void); +static void For_PutParamForumSet (void); static void For_PutParamForumOrder (void); static void For_PutIconsForums (void); @@ -347,7 +347,6 @@ static void For_GetThrData (struct ForumThread *Thr); static void For_GetParamsForum (void); static void For_SetForumType (void); static void For_RestrictAccess (void); -static long For_GetParamThrCod (void); static void For_PutHiddenParamPstCod (long PstCod); static long For_GetParamPstCod (void); @@ -370,7 +369,6 @@ void For_EnbPst (void) { extern const char *Txt_Post_unbanned; long PstCod; - long ThrCod; /***** Get parameters related to forum *****/ For_GetParamsForum (); @@ -378,15 +376,12 @@ void For_EnbPst (void) /***** Get the post code to unban *****/ PstCod = For_GetParamPstCod (); - /***** Get the thread number *****/ - ThrCod = For_GetParamThrCod (); - /***** Delete post from table of disabled posts *****/ For_DeletePstFromDisabledPstTable (PstCod); Lay_ShowAlert (Lay_SUCCESS,Txt_Post_unbanned); /***** Show the posts again *****/ - For_ShowThreadPosts (ThrCod); + For_ShowThreadPosts (); } /*****************************************************************************/ @@ -397,7 +392,6 @@ void For_DisPst (void) { extern const char *Txt_Post_banned; long PstCod; - long ThrCod; /***** Get parameters related to forum *****/ For_GetParamsForum (); @@ -405,9 +399,6 @@ void For_DisPst (void) /***** Get the post code to ban *****/ PstCod = For_GetParamPstCod (); - /***** Get the thread number *****/ - ThrCod = For_GetParamThrCod (); - /***** Check if post really exists, if it has not been removed *****/ if (For_GetIfForumPstExists (PstCod)) { @@ -419,7 +410,7 @@ void For_DisPst (void) Lay_ShowErrorAndExit ("The post to be banned no longer exists."); /***** Show the posts again *****/ - For_ShowThreadPosts (ThrCod); + For_ShowThreadPosts (); } /*****************************************************************************/ @@ -963,7 +954,7 @@ void For_RemoveUsrFromReadThrs (long UsrCod) /************************ Show posts in a thread *****************************/ /*****************************************************************************/ -static void For_ShowThreadPosts (long ThrCod) +static void For_ShowThreadPosts (void) { extern const char *Hlp_SOCIAL_Forums; extern const char *Txt_Thread; @@ -986,10 +977,10 @@ static void For_ShowThreadPosts (long ThrCod) bool ICanMoveThreads = (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); // If I have permission to move threads... /***** Show threads *****/ - For_ShowForumThreadsHighlightingOneThread (ThrCod); + For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.WhichForum.ThrCod); /***** Get data of the thread *****/ - Thr.ThrCod = ThrCod; + Thr.ThrCod = Gbl.Forum.WhichForum.ThrCod; For_GetThrData (&Thr); /***** Get the page number *****/ @@ -1001,7 +992,7 @@ static void For_ShowThreadPosts (long ThrCod) Gbl.Forum.ThreadToMove = For_GetThrInMyClipboard (); /* Get thread read time for the current user */ - ReadTimeUTC = For_GetThrReadTime (ThrCod); + ReadTimeUTC = For_GetThrReadTime (Gbl.Forum.WhichForum.ThrCod); /***** Start frame *****/ fprintf (Gbl.F.Out,"
",For_ID_FORUM_POSTS_SECTION); @@ -1013,7 +1004,7 @@ static void For_ShowThreadPosts (long ThrCod) sprintf (Query,"SELECT PstCod,UNIX_TIMESTAMP(CreatTime)" " FROM forum_post" " WHERE ThrCod=%ld ORDER BY PstCod", - ThrCod); + Gbl.Forum.WhichForum.ThrCod); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get posts of a thread"); NumPsts = (unsigned) NumRows; LastSubject[0] = '\0'; @@ -1057,7 +1048,7 @@ static void For_ShowThreadPosts (long ThrCod) /***** Write links to pages *****/ if (PaginationPsts.MoreThanOnePage) Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM, - ThrCod, + Gbl.Forum.WhichForum.ThrCod, &PaginationPsts); /***** Start table *****/ @@ -1083,7 +1074,7 @@ static void For_ShowThreadPosts (long ThrCod) /* Update forum_thr_read table indicating that this thread page and previous ones have been read and have no new posts for the current user (even if any previous pages have been no read actually) */ - For_UpdateThrReadTime (ThrCod,CreatTimeUTC); + For_UpdateThrReadTime (Gbl.Forum.WhichForum.ThrCod,CreatTimeUTC); /* Show post */ For_ShowAForumPost (&Gbl.Forum.WhichForum,&Thr,NumPst,PstCod, @@ -1114,7 +1105,7 @@ static void For_ShowThreadPosts (long ThrCod) /***** Write again links to pages *****/ if (PaginationPsts.MoreThanOnePage) Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM, - ThrCod, + Gbl.Forum.WhichForum.ThrCod, &PaginationPsts); } @@ -1123,7 +1114,7 @@ static void For_ShowThreadPosts (long ThrCod) /***** Form to write a new post in the thread *****/ fprintf (Gbl.F.Out,"
",For_ID_NEW_POST_SECTION); - For_WriteFormForumPst (true,ThrCod,LastSubject); + For_WriteFormForumPst (true,Gbl.Forum.WhichForum.ThrCod,LastSubject); fprintf (Gbl.F.Out,"
"); /***** End frame *****/ @@ -1139,10 +1130,11 @@ static void For_PutIconNewPost (void) { extern const char *Txt_New_post; - fprintf (Gbl.F.Out,"", - For_ID_NEW_POST_SECTION,Txt_New_post); - Lay_PutIconWithText ("plus64x64.png",Txt_New_post,NULL); - fprintf (Gbl.F.Out,""); + Lay_PutContextualLink (For_ActionsSeePstFor[Gbl.Forum.WhichForum.Type], + For_ID_NEW_POST_SECTION,For_PutAllHiddenParamsForum, + "plus64x64.png", + Txt_New_post,NULL, + NULL); } /*****************************************************************************/ @@ -1483,18 +1475,20 @@ static void For_WriteNumberOfPosts (struct Forum *WhichForum,long UsrCod) void For_PutAllHiddenParamsForum (void) { - For_PutParamWhichForum (); + For_PutParamForumSet (); For_PutParamForumOrder (); For_PutParamForumInsCtrDegCrs (); + if (Gbl.Forum.WhichForum.ThrCod > 0) // A thread is selected + For_PutHiddenParamThrCod (Gbl.Forum.WhichForum.ThrCod); } /*****************************************************************************/ -/*********** Put a hidden parameter with which forum I want to see ***********/ +/********* Put a hidden parameter with set of forums I want to see ***********/ /*****************************************************************************/ -static void For_PutParamWhichForum (void) +static void For_PutParamForumSet (void) { - Par_PutHiddenParamUnsigned ("WhichForum",(unsigned) Gbl.Forum.ForumSet); + Par_PutHiddenParamUnsigned ("ForumSet",(unsigned) Gbl.Forum.ForumSet); } /*****************************************************************************/ @@ -1728,7 +1722,7 @@ static void For_PutIconsForums (void) static void For_PutFormWhichForums (void) { - extern const char *Txt_FORUM_WHICH_FORUM[For_NUM_WHICH_FORUMS]; + extern const char *Txt_FORUM_WHICH_FORUM[For_NUM_FORUM_SETS]; For_ForumSet_t ForumSet; /***** Form to select which forums I want to see: @@ -1740,12 +1734,12 @@ static void For_PutFormWhichForums (void) "