Version 22.101: Apr 20, 2023 Removed buttons to create new elements.

This commit is contained in:
acanas 2023-04-20 01:22:07 +02:00
parent c2a118c5d9
commit 66557536f3
48 changed files with 877 additions and 2430 deletions

View File

@ -101,7 +101,6 @@ static void Agd_PutIconToViewEditMyFullAgenda (void *EncryptedUsrCod);
static void Agd_PutIconToShowQR (void);
static void Agd_PutIconsOtherPublicAgenda (void *EncryptedUsrCod);
static void Agd_PutButtonToCreateNewEvent (const struct Agd_Agenda *Agenda);
static void Agd_ShowOneEvent (struct Agd_Agenda *Agenda,
Agd_AgendaType_t AgendaType,long AgdCod);
static void Agd_GetParEventOrder (struct Agd_Agenda *Agenda);
@ -548,10 +547,6 @@ static void Agd_ShowEvents (struct Agd_Agenda *Agenda,
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],&Pagination,
Agenda,-1L);
/***** Button to create a new event *****/
if (AgendaType == Agd_MY_AGENDA)
Agd_PutButtonToCreateNewEvent (Agenda);
/***** Free list of events *****/
Agd_FreeListEvents (Agenda);
}
@ -746,30 +741,6 @@ static void Agd_PutIconsOtherPublicAgenda (void *EncryptedUsrCod)
"address-card.svg",Ico_BLACK);
}
/*****************************************************************************/
/********************* Put button to create a new event **********************/
/*****************************************************************************/
static void Agd_PutButtonToCreateNewEvent (const struct Agd_Agenda *Agenda)
{
extern const char *Txt_New_event;
/***** Begin form *****/
Frm_BeginForm (ActFrmNewEvtMyAgd);
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents,
Agenda->PrivatPublicEvents,
Agenda->HiddenVisiblEvents,
Agenda->SelectedOrder,
Agenda->CurrentPage,
-1L);
/***** Confirm button *****/
Btn_PutConfirmButton (Txt_New_event);
/***** End form *****/
Frm_EndForm ();
}
/*****************************************************************************/
/******************************* Show one event ******************************/
/*****************************************************************************/
@ -835,7 +806,7 @@ static void Agd_ShowOneEvent (struct Agd_Agenda *Agenda,
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
"ASG_TITLE",
The_GetSuffix ());
HTM_Txt (AgdEvent.Event);
HTM_Txt (AgdEvent.Title);
HTM_SPAN_End ();
HTM_ARTICLE_End ();
HTM_TD_End ();
@ -1128,7 +1099,7 @@ static void Agd_GetventDataByCod (struct Agd_Event *AgdEvent)
Dat_PRESENT));
/* Get the event (row[7]) and its location (row[8]) */
Str_Copy (AgdEvent->Event ,row[7],sizeof (AgdEvent->Event ) - 1);
Str_Copy (AgdEvent->Title ,row[7],sizeof (AgdEvent->Title ) - 1);
Str_Copy (AgdEvent->Location,row[8],sizeof (AgdEvent->Location) - 1);
}
else
@ -1140,7 +1111,7 @@ static void Agd_GetventDataByCod (struct Agd_Event *AgdEvent)
AgdEvent->TimeUTC[Dat_STR_TIME] =
AgdEvent->TimeUTC[Dat_END_TIME] = (time_t) 0;
AgdEvent->TimeStatus = Dat_FUTURE;
AgdEvent->Event[0] = '\0';
AgdEvent->Title[0] = '\0';
AgdEvent->Location[0] = '\0';
}
@ -1194,7 +1165,7 @@ void Agd_AskRemEvent (void)
Agd_PutCurrentParsMyAgenda,&Agenda,
Btn_REMOVE_BUTTON,Txt_Remove_event,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_event_X,
AgdEvent.Event);
AgdEvent.Title);
/***** Show events again *****/
Agd_ShowMyAgenda (&Agenda);
@ -1228,7 +1199,7 @@ void Agd_RemoveEvent (void)
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Event_X_removed,
AgdEvent.Event);
AgdEvent.Title);
/***** Show events again *****/
Agd_ShowMyAgenda (&Agenda);
@ -1320,7 +1291,7 @@ void Agd_MakeEventPrivate (void)
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Event_X_is_now_private,
AgdEvent.Event);
AgdEvent.Title);
/***** Show events again *****/
Agd_ShowMyAgenda (&Agenda);
@ -1354,7 +1325,7 @@ void Agd_MakeEventPublic (void)
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Event_X_is_now_visible_to_users_of_your_courses,
AgdEvent.Event);
AgdEvent.Title);
/***** Show events again *****/
Agd_ShowMyAgenda (&Agenda);
@ -1366,12 +1337,9 @@ void Agd_MakeEventPublic (void)
void Agd_ReqCreatOrEditEvent (void)
{
extern const char *Hlp_PROFILE_Agenda_new_event;
extern const char *Hlp_PROFILE_Agenda_edit_event;
extern const char *Txt_New_event;
extern const char *Txt_Edit_event;
extern const char *Txt_Location;
extern const char *Txt_Event;
extern const char *Txt_Location;
extern const char *Txt_Description;
extern const char *Txt_Create_event;
extern const char *Txt_Save_changes;
@ -1403,7 +1371,7 @@ void Agd_ReqCreatOrEditEvent (void)
AgdEvent.TimeUTC[Dat_STR_TIME] = Dat_GetStartExecutionTimeUTC ();
AgdEvent.TimeUTC[Dat_END_TIME] = AgdEvent.TimeUTC[Dat_STR_TIME] + (2 * 60 * 60); // +2 hours
AgdEvent.TimeStatus = Dat_FUTURE;
AgdEvent.Event[0] = '\0';
AgdEvent.Title[0] = '\0';
AgdEvent.Location[0] = '\0';
}
else
@ -1429,12 +1397,8 @@ void Agd_ReqCreatOrEditEvent (void)
Agd_PutCurrentParsMyAgenda (&Agenda);
/***** Begin box and table *****/
if (ItsANewEvent)
Box_BoxTableBegin (NULL,Txt_New_event,
NULL,NULL,
Hlp_PROFILE_Agenda_new_event,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,Txt_Edit_event,
Box_BoxTableBegin (NULL,AgdEvent.Title[0] ? AgdEvent.Title :
Txt_Event,
NULL,NULL,
Hlp_PROFILE_Agenda_edit_event,Box_NOT_CLOSABLE,2);
@ -1447,7 +1411,7 @@ void Agd_ReqCreatOrEditEvent (void)
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_INPUT_TEXT ("Event",Agd_MAX_CHARS_EVENT,AgdEvent.Event,
HTM_INPUT_TEXT ("Event",Agd_MAX_CHARS_EVENT,AgdEvent.Title,
HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Event\" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
" required=\"required\"",
@ -1548,7 +1512,7 @@ void Agd_ReceiveFormEvent (void)
Par_GetParText ("Location",AgdEvent.Location,Agd_MAX_BYTES_LOCATION);
/***** Get event title *****/
Par_GetParText ("Event",AgdEvent.Event,Agd_MAX_BYTES_EVENT);
Par_GetParText ("Event",AgdEvent.Title,Agd_MAX_BYTES_EVENT);
/***** Get event description *****/
Par_GetParHTML ("Txt",EventTxt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
@ -1567,7 +1531,7 @@ void Agd_ReceiveFormEvent (void)
}
/***** Check if event is correct *****/
if (!AgdEvent.Event[0]) // If there is no event
if (!AgdEvent.Title[0]) // If there is no event
{
NewEventIsCorrect = false;
Ale_CreateAlertYouMustSpecifyTheTitle ();
@ -1582,7 +1546,7 @@ void Agd_ReceiveFormEvent (void)
/***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_event_X,
AgdEvent.Event);
AgdEvent.Title);
}
else
{

View File

@ -48,7 +48,7 @@ struct Agd_Event
bool Hidden;
time_t TimeUTC[Dat_NUM_START_END_TIME];
Dat_TimeStatus_t TimeStatus;
char Event[Agd_MAX_BYTES_EVENT + 1];
char Title[Agd_MAX_BYTES_EVENT + 1];
char Location[Agd_MAX_BYTES_LOCATION + 1];
};

View File

@ -241,7 +241,7 @@ long Agd_DB_CreateEvent (const struct Agd_Event *AgdEvent,const char *Txt)
AgdEvent->UsrCod,
AgdEvent->TimeUTC[Dat_STR_TIME],
AgdEvent->TimeUTC[Dat_END_TIME],
AgdEvent->Event,
AgdEvent->Title,
AgdEvent->Location,
Txt);
}
@ -264,7 +264,7 @@ void Agd_DB_UpdateEvent (const struct Agd_Event *AgdEvent,const char *Txt)
" AND UsrCod=%ld",
AgdEvent->TimeUTC[Dat_STR_TIME],
AgdEvent->TimeUTC[Dat_END_TIME],
AgdEvent->Event,
AgdEvent->Title,
AgdEvent->Location,
Txt,
AgdEvent->AgdCod,

View File

@ -51,7 +51,6 @@ extern struct Globals Gbl;
/*****************************************************************************/
static void Ann_PutIconToAddNewAnnouncement (__attribute__((unused)) void *Args);
static void Ann_PutButtonToAddNewAnnouncement (void);
static void Ann_GetAnnouncementDataFromRow (MYSQL_RES *mysql_res,
struct Ann_Announcement *Announcement);
@ -112,10 +111,6 @@ void Ann_ShowAllAnnouncements (void)
ICanEdit);
}
/***** Button to add new announcement *****/
if (ICanEdit)
Ann_PutButtonToAddNewAnnouncement ();
/***** End box *****/
Box_BoxEnd ();
@ -132,19 +127,6 @@ static void Ann_PutIconToAddNewAnnouncement (__attribute__((unused)) void *Args)
Ico_PutContextualIconToAdd (ActWriAnn,NULL,NULL,NULL);
}
/*****************************************************************************/
/******************* Put button to add a new announcement ********************/
/*****************************************************************************/
static void Ann_PutButtonToAddNewAnnouncement (void)
{
extern const char *Txt_New_announcement;
Frm_BeginForm (ActWriAnn);
Btn_PutConfirmButton (Txt_New_announcement);
Frm_EndForm ();
}
/*****************************************************************************/
/************************** Show global announcements ************************/
/*****************************************************************************/
@ -319,7 +301,7 @@ static void Ann_PutParAnnCod (void *AnnCod)
void Ann_ShowFormAnnouncement (void)
{
extern const char *Hlp_COMMUNICATION_Announcements;
extern const char *Txt_New_announcement;
extern const char *Txt_Announcement;
extern const char *Txt_MSG_Subject;
extern const char *Txt_MSG_Content;
extern const char *Txt_Users;
@ -329,7 +311,7 @@ void Ann_ShowFormAnnouncement (void)
Frm_BeginForm (ActRcvAnn);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_announcement,
Box_BoxTableBegin (NULL,Txt_Announcement,
NULL,NULL,
Hlp_COMMUNICATION_Announcements,Box_NOT_CLOSABLE,2);

View File

@ -71,7 +71,6 @@ static void Asg_PutHead (struct Asg_Assignments *Assignments,
static bool Asg_CheckIfICanCreateAssignments (void);
static void Asg_PutIconsListAssignments (void *Assignments);
static void Asg_PutIconToCreateNewAsg (void *Assignments);
static void Asg_PutButtonToCreateNewAsg (void *Assignments);
static void Asg_ParsWhichGroupsToShow (void *Assignments);
static void Asg_PutIconsOneAsg (void *Assignments);
static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
@ -202,10 +201,6 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,&Pagination,
Assignments,-1L);
/***** Button to create a new assignment *****/
if (Asg_CheckIfICanCreateAssignments ())
Asg_PutButtonToCreateNewAsg (Assignments);
/***** End box *****/
Box_BoxEnd ();
@ -328,29 +323,6 @@ static void Asg_PutIconToCreateNewAsg (void *Assignments)
}
}
/*****************************************************************************/
/****************** Put button to create a new assignment ********************/
/*****************************************************************************/
static void Asg_PutButtonToCreateNewAsg (void *Assignments)
{
extern const char *Txt_New_assignment;
if (Assignments)
{
/* Begin form */
Frm_BeginForm (ActFrmNewAsg);
((struct Asg_Assignments *) Assignments)->Asg.AsgCod = -1L;
Asg_PutPars (Assignments);
/* Button to create new assignment */
Btn_PutConfirmButton (Txt_New_assignment);
/* End form */
Frm_EndForm ();
}
}
/*****************************************************************************/
/**************** Put params to select which groups to show ******************/
/*****************************************************************************/
@ -1152,10 +1124,8 @@ void Asg_UnhideAssignment (void)
void Asg_ReqCreatOrEditAsg (void)
{
extern const char *Hlp_ASSESSMENT_Assignments_new_assignment;
extern const char *Hlp_ASSESSMENT_Assignments_edit_assignment;
extern const char *Txt_New_assignment;
extern const char *Txt_Edit_assignment;
extern const char *Txt_Assignment;
extern const char *Txt_Title;
extern const char *Txt_Upload_files_QUESTION;
extern const char *Txt_Folder;
@ -1223,18 +1193,12 @@ void Asg_ReqCreatOrEditAsg (void)
Asg_PutPars (&Assignments);
/***** Begin box and table *****/
if (ItsANewAssignment)
Box_BoxTableBegin (NULL,Txt_New_assignment,
NULL,NULL,
Hlp_ASSESSMENT_Assignments_new_assignment,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,
Assignments.Asg.Title[0] ? Assignments.Asg.Title :
Txt_Edit_assignment,
Txt_Assignment,
NULL,NULL,
Hlp_ASSESSMENT_Assignments_edit_assignment,Box_NOT_CLOSABLE,2);
/***** Assignment title *****/
HTM_TR_Begin (NULL);

View File

@ -89,7 +89,6 @@ static void Att_ShowAllEvents (struct Att_Events *Events);
static void Att_ParsWhichGroupsToShow (void *Events);
static void Att_PutIconsInListOfEvents (void *Events);
static void Att_PutIconToCreateNewEvent (struct Att_Events *Events);
static void Att_PutButtonToCreateNewEvent (struct Att_Events *Events);
static void Att_PutParsToCreateNewEvent (void *Events);
static void Att_PutParsToListUsrsAttendance (void *Events);
@ -219,8 +218,6 @@ static void Att_ShowAllEvents (struct Att_Events *Events)
Dat_StartEndTime_t Order;
Grp_WhichGroups_t WhichGroups;
unsigned NumAttEvent;
bool ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
/***** Compute variables related to pagination *****/
Pagination.NumItems = Events->Num;
@ -312,10 +309,6 @@ static void Att_ShowAllEvents (struct Att_Events *Events)
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,&Pagination,
Events,-1L);
/***** Button to create a new attendance event *****/
if (ICanEdit)
Att_PutButtonToCreateNewEvent (Events);
/***** End box *****/
Box_BoxEnd ();
@ -391,25 +384,6 @@ static void Att_PutIconToCreateNewEvent (struct Att_Events *Events)
Att_PutParsToCreateNewEvent,Events);
}
/*****************************************************************************/
/**************** Put button to create a new attendance event ****************/
/*****************************************************************************/
static void Att_PutButtonToCreateNewEvent (struct Att_Events *Events)
{
extern const char *Txt_New_event;
/***** Begin form *****/
Frm_BeginForm (ActFrmNewAtt);
Att_PutParsToCreateNewEvent (Events);
/***** Button to create new event *****/
Btn_PutConfirmButton (Txt_New_event);
/***** End form *****/
Frm_EndForm ();
}
/*****************************************************************************/
/************** Put parameters to create a new attendance event **************/
/*****************************************************************************/
@ -950,10 +924,8 @@ void Att_UnhideEvent (void)
void Att_ReqCreatOrEditEvent (void)
{
extern const char *Hlp_USERS_Attendance_new_event;
extern const char *Hlp_USERS_Attendance_edit_event;
extern const char *Txt_New_event;
extern const char *Txt_Edit_event;
extern const char *Txt_Event;
extern const char *Txt_Teachers_comment;
extern const char *Txt_Title;
extern const char *Txt_Hidden_MALE_PLURAL;
@ -1019,14 +991,9 @@ void Att_ReqCreatOrEditEvent (void)
Pag_PutParPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
/***** Begin box and table *****/
if (ItsANewAttEvent)
Box_BoxTableBegin (NULL,Txt_New_event,
NULL,NULL,
Hlp_USERS_Attendance_new_event,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,
Events.Event.Title[0] ? Events.Event.Title :
Txt_Edit_event,
Txt_Event,
NULL,NULL,
Hlp_USERS_Attendance_edit_event,Box_NOT_CLOSABLE,2);

View File

@ -124,7 +124,6 @@ void Ban_ShowAllBanners (void)
extern const char *Hlp_SYSTEM_Banners;
extern const char *Txt_Banners;
extern const char *Txt_No_banners;
extern const char *Txt_New_banner;
struct Ban_Banners Banners;
MYSQL_RES *mysql_res;
@ -146,14 +145,6 @@ void Ban_ShowAllBanners (void)
else // No banners created
Ale_ShowAlert (Ale_INFO,Txt_No_banners);
/***** Button to create banner *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
{
Frm_BeginForm (ActEdiBan);
Btn_PutConfirmButton (Txt_New_banner);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
@ -798,14 +789,14 @@ void Ban_ContEditAfterChgBan (void)
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
{
extern const char *Hlp_SYSTEM_Banners_edit;
extern const char *Txt_New_banner;
extern const char *Txt_Banner;
extern const char *Txt_Create_banner;
/***** Begin form *****/
Frm_BeginForm (ActNewBan);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_banner,
Box_BoxTableBegin (NULL,Txt_Banner,
NULL,NULL,
Hlp_SYSTEM_Banners_edit,Box_NOT_CLOSABLE,2);

View File

@ -103,7 +103,6 @@ void Bld_SeeBuildings (void)
extern const char *Txt_Buildings;
extern const char *Txt_BUILDINGS_HELP_ORDER[Bld_NUM_ORDERS];
extern const char *Txt_BUILDINGS_ORDER[Bld_NUM_ORDERS];
extern const char *Txt_New_building;
struct Bld_Buildings Buildings;
Bld_Order_t Order;
unsigned NumBuilding;
@ -121,12 +120,11 @@ void Bld_SeeBuildings (void)
/***** Get list of buildings *****/
Bld_GetListBuildings (&Buildings,Bld_ALL_DATA);
/***** Table head *****/
Box_BoxBegin (NULL,Txt_Buildings,
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Buildings,
Bld_PutIconsListingBuildings,NULL,
Hlp_CENTER_Buildings,Box_NOT_CLOSABLE);
Hlp_CENTER_Buildings,Box_NOT_CLOSABLE,2);
HTM_TABLE_BeginWideMarginPadding (2);
HTM_TR_Begin (NULL);
for (Order = (Bld_Order_t) 0;
Order <= (Bld_Order_t) (Bld_NUM_ORDERS - 1);
@ -176,19 +174,8 @@ void Bld_SeeBuildings (void)
HTM_TR_End ();
}
/***** End table *****/
HTM_TABLE_End ();
/***** Button to create building *****/
if (Bld_CheckIfICanCreateBuildings ())
{
Frm_BeginForm (ActEdiBld);
Btn_PutConfirmButton (Txt_New_building);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
/***** End table and box *****/
Box_BoxTableEnd ();
/***** Free list of buildings *****/
Bld_FreeListBuildings (&Buildings);
@ -693,14 +680,14 @@ void Bld_ContEditAfterChgBuilding (void)
static void Bld_PutFormToCreateBuilding (void)
{
extern const char *Txt_New_building;
extern const char *Txt_Building;
extern const char *Txt_Create_building;
/***** Begin form *****/
Frm_BeginForm (ActNewBld);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_building,
Box_BoxTableBegin (NULL,Txt_Building,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -74,7 +74,6 @@ static void Cfe_GetDateToHighlight (struct Cfe_CallsForExams *CallsForExams);
static void Cfe_ListCallsForExams (struct Cfe_CallsForExams *CallsForExams,
Cfe_TypeViewCallForExam_t TypeViewCallForExam);
static void Cfe_PutIconsCallsForExams (__attribute__((unused)) void *Args);
static void Cfe_PutButtonToCreateNewCallForExam (void);
static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
long ExaCod,
@ -169,7 +168,7 @@ static long Cfe_GetParsCallsForExams (struct Cfe_CallsForExams *CallsForExams)
long ExaCod;
/***** Get the code of the call for exam *****/
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
ExaCod = ParCod_GetPar (ParCod_Exa);
/***** Get the name of the course (it is allowed to be different from the official name of the course) *****/
Par_GetParText ("CrsName",CallsForExams->CallForExam.CrsFullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
@ -665,10 +664,6 @@ static void Cfe_ListCallsForExams (struct Cfe_CallsForExams *CallsForExams,
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Button to create a new call for exam *****/
if (Cfe_CheckIfICanEditCallsForExams ())
Cfe_PutButtonToCreateNewCallForExam ();
/***** End box *****/
Box_BoxEnd ();
}
@ -689,19 +684,6 @@ static void Cfe_PutIconsCallsForExams (__attribute__((unused)) void *Args)
NULL,NULL);
}
/*****************************************************************************/
/****************** Put button to create a new call for exam *****************/
/*****************************************************************************/
static void Cfe_PutButtonToCreateNewCallForExam (void)
{
extern const char *Txt_New_call_FOR_EXAM;
Frm_BeginForm (ActEdiCfe);
Btn_PutConfirmButton (Txt_New_call_FOR_EXAM);
Frm_EndForm ();
}
/*****************************************************************************/
/********** Create a list with the dates of all calls for exams **************/
/*****************************************************************************/

View File

@ -95,8 +95,7 @@ unsigned Cfe_DB_GetCallsForExamsInCurrentCrs (MYSQL_RES **mysql_res)
/***** Get calls for exams (the most recent first)
in current course from database *****/
return (unsigned)
DB_QuerySELECT (mysql_res,"can not get calls for exams"
" in this course for listing",
DB_QuerySELECT (mysql_res,"can not get calls for exams",
"SELECT ExaCod" // row[0]
" FROM cfe_exams"
" WHERE CrsCod=%ld"
@ -116,7 +115,7 @@ unsigned Cfe_DB_GetVisibleCallsForExamsInCurrentCrs (MYSQL_RES **mysql_res)
of visible calls for exams
in current course from database *****/
return (unsigned)
DB_QuerySELECT (mysql_res,"can not get calls for exams in this course",
DB_QuerySELECT (mysql_res,"can not get calls for exams",
"SELECT ExaCod," // row[0]
"DATE(ExamDate)" // row[1]
" FROM cfe_exams"

View File

@ -1249,7 +1249,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
{
extern const char *Txt_New_center;
extern const char *Txt_Center;
extern const char *Txt_Another_place;
extern const char *Txt_Create_center;
unsigned NumPlc;
@ -1264,7 +1264,7 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
Err_NoPermissionExit ();
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_center,
Box_BoxTableBegin (NULL,Txt_Center,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
*/
#define Log_PLATFORM_VERSION "SWAD 22.100.4 (2023-04-19)"
#define Log_PLATFORM_VERSION "SWAD 22.101 (2023-04-20)"
#define CSS_FILE "swad22.95.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.101: Apr 20, 2023 Removed buttons to create new elements: a new place, new holiday, new link, new banner, new plugin, new building, new room, new program item, new assignment, new project, new call for exam, new question, new exam, new set of questions, new exam session, new game, new match, new rubric, new criterion, new group, new type of group, new attendance event, new record field, new announcement, new notice, new message, new forum thread, new forum post, new survey, new survey question, new agenda event, new email domain. (337332 lines)
Version 22.100.4: Apr 19, 2023 Removed buttons to create a new institution, new center, new degree and new course. (338756 lines)
Version 22.100.3: Apr 19, 2023 Institution admins can edit places. (338891 lines)
Version 22.100.2: Apr 19, 2023 Institution admins can edit departments. (338889 lines)

View File

@ -1412,7 +1412,7 @@ static void Cty_PutFormToCreateCountry (void)
{
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
extern const char *Par_CodeStr[];
extern const char *Txt_New_country;
extern const char *Txt_Country;
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
extern const char *Txt_Create_country;
Lan_Language_t Lan;
@ -1423,7 +1423,7 @@ static void Cty_PutFormToCreateCountry (void)
Frm_BeginForm (ActNewCty);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_country,
Box_BoxTableBegin (NULL,Txt_Country,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -1291,7 +1291,7 @@ static bool Crs_CheckIfICanEdit (struct Crs_Course *Crs)
static void Crs_PutFormToCreateCourse (void)
{
extern const char *Txt_New_course;
extern const char *Txt_Course;
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
extern const char *Txt_Create_course;
unsigned Year;
@ -1305,7 +1305,7 @@ static void Crs_PutFormToCreateCourse (void)
Err_NoPermissionExit ();
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_course,
Box_BoxTableBegin (NULL,Txt_Course,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -513,7 +513,7 @@ static bool Deg_CheckIfICanEditADegree (struct Deg_Degree *Deg)
static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
{
extern const char *Txt_New_degree;
extern const char *Txt_Degree;
extern const char *Txt_Create_degree;
unsigned NumDegTyp;
struct DegTyp_DegreeType *DegTypInLst;
@ -527,7 +527,7 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
Err_NoPermissionExit ();
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_degree,
Box_BoxTableBegin (NULL,Txt_Degree,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -467,14 +467,14 @@ bool DegTyp_CheckIfICanCreateDegreeTypes (void)
static void DegTyp_PutFormToCreateDegreeType (void)
{
extern const char *Txt_New_type_of_degree;
extern const char *Txt_Type_of_degree;
extern const char *Txt_Create_type_of_degree;
/***** Begin form *****/
Frm_BeginForm (ActNewDegTyp);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_type_of_degree,
Box_BoxTableBegin (NULL,Txt_Type_of_degree,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -798,7 +798,7 @@ void Dpt_ContEditAfterChgDpt (void)
static void Dpt_PutFormToCreateDepartment (void)
{
extern const char *Txt_New_department;
extern const char *Txt_Department;
extern const char *Txt_Institution;
extern const char *Txt_Short_name;
extern const char *Txt_Full_name;
@ -812,7 +812,7 @@ static void Dpt_PutFormToCreateDepartment (void)
Frm_BeginForm (ActNewDpt);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_department,
Box_BoxTableBegin (NULL,Txt_Department,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -113,7 +113,6 @@ extern struct Globals Gbl;
static void Exa_PutIconsListExams (void *Exams);
static void Exa_PutIconToCreateNewExam (struct Exa_Exams *Exams);
static void Exa_PutButtonToCreateNewExam (struct Exa_Exams *Exams);
static void Exa_PutParsToCreateNewExam (void *Exams);
static void Exa_ShowOneExam (struct Exa_Exams *Exams,bool ShowOnlyThisExam);
@ -301,10 +300,6 @@ void Exa_ListAllExams (struct Exa_Exams *Exams)
Pag_WriteLinksToPagesCentered (Pag_EXAMS,&Pagination,
Exams,-1L);
/***** Button to create a new exam *****/
if (Exa_CheckIfICanEditExams ())
Exa_PutButtonToCreateNewExam (Exams);
/***** End box *****/
Box_BoxEnd ();
@ -372,20 +367,6 @@ static void Exa_PutIconToCreateNewExam (struct Exa_Exams *Exams)
Exa_PutParsToCreateNewExam,Exams);
}
/*****************************************************************************/
/********************* Put button to create a new exam *********************/
/*****************************************************************************/
static void Exa_PutButtonToCreateNewExam (struct Exa_Exams *Exams)
{
extern const char *Txt_New_exam;
Frm_BeginForm (ActFrmNewExa);
Exa_PutParsToCreateNewExam (Exams);
Btn_PutConfirmButton (Txt_New_exam);
Frm_EndForm ();
}
/*****************************************************************************/
/******************* Put parameters to create a new exam *******************/
/*****************************************************************************/
@ -1297,10 +1278,8 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
char Txt[Cns_MAX_BYTES_TEXT + 1],
bool ItsANewExam)
{
extern const char *Hlp_ASSESSMENT_Exams_new_exam;
extern const char *Hlp_ASSESSMENT_Exams_edit_exam;
extern const char *Txt_New_exam;
extern const char *Txt_Edit_exam;
extern const char *Txt_Exam;
extern const char *Txt_Title;
extern const char *Txt_Maximum_grade;
extern const char *Txt_Result_visibility;
@ -1314,14 +1293,9 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
Exa_PutPars (Exams);
/***** Begin box and table *****/
if (ItsANewExam)
Box_BoxTableBegin (NULL,Txt_New_exam,
NULL,NULL,
Hlp_ASSESSMENT_Exams_new_exam,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,
Exams->Exam.Title[0] ? Exams->Exam.Title :
Txt_Edit_exam,
Txt_Exam,
NULL,NULL,
Hlp_ASSESSMENT_Exams_edit_exam,Box_NOT_CLOSABLE,2);

View File

@ -191,8 +191,6 @@ void ExaSes_ListSessions (struct Exa_Exams *Exams,
/* Put form to create new session */
ExaSes_PutFormSession (Session); // Form to create session
}
else
ExaSes_PutButtonNewSession (Exams); // Button to create a new exam session
break;
default:
break;
@ -962,7 +960,7 @@ void ExaSes_GetAndCheckPars (struct Exa_Exams *Exams,
static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
{
extern const char *Hlp_ASSESSMENT_Exams_sessions;
extern const char *Txt_New_session;
extern const char *Txt_Session;
extern const char *Txt_Title;
extern const char *Txt_Create_session;
extern const char *Txt_Save_changes;
@ -984,7 +982,7 @@ static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
ParCod_PutPar (ParCod_Ses,Session->SesCod);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_New_session :
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_Session :
Session->Title,
NULL,NULL,
Hlp_ASSESSMENT_Exams_sessions,Box_NOT_CLOSABLE,2);
@ -1091,20 +1089,6 @@ static void ExaSes_ShowLstGrpsToCreateSession (long SesCod)
Grp_FreeListGrpTypesAndGrps ();
}
/*****************************************************************************/
/******************** Put button to create a new session *********************/
/*****************************************************************************/
void ExaSes_PutButtonNewSession (struct Exa_Exams *Exams)
{
extern const char *Txt_New_session;
Frm_BeginFormAnchor (ActReqNewExaSes,ExaSes_NEW_SESSION_SECTION_ID);
Exa_PutPars (Exams);
Btn_PutConfirmButton (Txt_New_session);
Frm_EndForm ();
}
/*****************************************************************************/
/****************** Request the creation of a new session ********************/
/*****************************************************************************/

View File

@ -67,7 +67,6 @@ void ExaSes_PutParsEdit (void *Exams);
void ExaSes_GetAndCheckPars (struct Exa_Exams *Exams,
struct ExaSes_Session *Session);
void ExaSes_PutButtonNewSession (struct Exa_Exams *Exams);
void ExaSes_ReqCreatOrEditSes (void);
void ExaSes_ReceiveFormSession (void);

View File

@ -181,7 +181,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
struct ExaSet_Set *Set,
unsigned MaxSetInd)
{
extern const char *Txt_New_set_of_questions;
extern const char *Txt_Set_of_questions;
extern const char *Txt_Create_set_of_questions;
/***** Begin form *****/
@ -189,7 +189,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
Exa_PutPars (Exams);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_set_of_questions,
Box_BoxTableBegin (NULL,Txt_Set_of_questions,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -2721,8 +2721,8 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
{
extern const char *Hlp_COMMUNICATION_Forums_new_post;
extern const char *Hlp_COMMUNICATION_Forums_new_thread;
extern const char *Txt_New_post;
extern const char *Txt_New_thread;
extern const char *Txt_Post;
extern const char *Txt_Thread;
extern const char *Txt_MSG_Subject;
extern const char *Txt_MSG_Content;
extern const char *Txt_Send;
@ -2730,11 +2730,11 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
/***** Begin box *****/
if (IsReply)
Box_BoxBegin (NULL,Txt_New_post,
Box_BoxBegin (NULL,Txt_Post,
NULL,NULL,
Hlp_COMMUNICATION_Forums_new_post,Box_NOT_CLOSABLE);
else
Box_BoxBegin (NULL,Txt_New_thread,
Box_BoxBegin (NULL,Txt_Thread,
NULL,NULL,
Hlp_COMMUNICATION_Forums_new_thread,Box_NOT_CLOSABLE);

View File

@ -114,7 +114,6 @@ static bool Gam_CheckIfICanEditGames (void);
static bool Gam_CheckIfICanListGameQuestions (void);
static void Gam_PutIconsListGames (void *Games);
static void Gam_PutIconToCreateNewGame (struct Gam_Games *Games);
static void Gam_PutButtonToCreateNewGame (struct Gam_Games *Games);
static void Gam_PutParsToCreateNewGame (void *Games);
static void Gam_ShowGameMainData (struct Gam_Games *Games,
@ -324,10 +323,6 @@ void Gam_ListAllGames (struct Gam_Games *Games)
Pag_WriteLinksToPagesCentered (Pag_GAMES,&Pagination,
Games,-1L);
/***** Button to create a new game *****/
if (Gam_CheckIfICanEditGames ())
Gam_PutButtonToCreateNewGame (Games);
/***** End box *****/
Box_BoxEnd ();
@ -411,22 +406,6 @@ static void Gam_PutIconToCreateNewGame (struct Gam_Games *Games)
Gam_PutParsToCreateNewGame,Games);
}
/*****************************************************************************/
/********************* Put button to create a new game ***********************/
/*****************************************************************************/
static void Gam_PutButtonToCreateNewGame (struct Gam_Games *Games)
{
extern const char *Txt_New_game;
Frm_BeginForm (ActFrmNewGam);
Gam_PutParsToCreateNewGame (Games);
Btn_PutConfirmButton (Txt_New_game);
Frm_EndForm ();
}
/*****************************************************************************/
/******************** Put parameters to create a new game ********************/
/*****************************************************************************/
@ -1287,10 +1266,8 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games,
char Txt[Cns_MAX_BYTES_TEXT + 1],
bool ItsANewGame)
{
extern const char *Hlp_ASSESSMENT_Games_new_game;
extern const char *Hlp_ASSESSMENT_Games_edit_game;
extern const char *Txt_New_game;
extern const char *Txt_Edit_game;
extern const char *Txt_Game;
extern const char *Txt_Title;
extern const char *Txt_Maximum_grade;
extern const char *Txt_Result_visibility;
@ -1304,14 +1281,9 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games,
Gam_PutPars (Games);
/***** Begin box and table *****/
if (ItsANewGame)
Box_BoxTableBegin (NULL,Txt_New_game,
NULL,NULL,
Hlp_ASSESSMENT_Games_new_game,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,
Games->Game.Title[0] ? Games->Game.Title :
Txt_Edit_game,
Txt_Game,
NULL,NULL,
Hlp_ASSESSMENT_Games_edit_game,Box_NOT_CLOSABLE,2);
@ -2157,22 +2129,6 @@ static bool Gam_CheckIfEditable (const struct Gam_Game *Game)
return false; // Questions are not editable
}
/*****************************************************************************/
/********************* Put button to create a new match **********************/
/*****************************************************************************/
void Gam_PutButtonNewMatch (struct Gam_Games *Games)
{
extern const char *Txt_New_match;
Frm_BeginFormAnchor (ActReqNewMch,Mch_NEW_MATCH_SECTION_ID);
Gam_PutPars (Games);
Btn_PutConfirmButton (Txt_New_match);
Frm_EndForm ();
}
/*****************************************************************************/
/************* Request the creation of a new match as a teacher **************/
/*****************************************************************************/

View File

@ -153,7 +153,6 @@ void Gam_RemoveQstFromGame (void);
void Gam_MoveUpQst (void);
void Gam_MoveDownQst (void);
void Gam_PutButtonNewMatch (struct Gam_Games *Games);
void Gam_ReqNewMatch (void);
void Gam_ShowTstTagsPresentInAGame (long GamCod);

View File

@ -1708,7 +1708,6 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
extern const char *Txt_Change_my_groups;
extern const char *Txt_Enrol_in_groups;
extern const char *Txt_No_groups_have_been_created_in_the_course_X;
extern const char *Txt_Create_group;
unsigned NumGrpTyp;
unsigned NumGrpsThisTypeIBelong;
unsigned NumGrpsIBelong = 0;
@ -1768,19 +1767,9 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
}
}
else // This course has no groups
{
Ale_ShowAlert (Ale_INFO,Txt_No_groups_have_been_created_in_the_course_X,
Gbl.Hierarchy.Crs.FullName);
/***** Button to create group *****/
if (ICanEdit)
{
Frm_BeginForm (ActReqEdiGrp);
Btn_PutConfirmButton (Txt_Create_group);
Frm_EndForm ();
}
}
/***** End box *****/
Box_BoxEnd ();
@ -2403,7 +2392,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
static void Grp_PutFormToCreateGroupType (void)
{
extern const char *Txt_New_type_of_group;
extern const char *Txt_Type_of_group;
extern const char *Txt_It_is_optional_to_choose_a_group;
extern const char *Txt_It_is_mandatory_to_choose_a_group;
extern const char *Txt_A_student_can_belong_to_several_groups;
@ -2420,7 +2409,7 @@ static void Grp_PutFormToCreateGroupType (void)
Frm_BeginFormAnchor (ActNewGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
/***** Begin box *****/
Box_BoxTableBegin (NULL,Txt_New_type_of_group,
Box_BoxTableBegin (NULL,Txt_Type_of_group,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
@ -2529,7 +2518,7 @@ static void Grp_PutFormToCreateGroupType (void)
static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
{
extern const char *Txt_New_group;
extern const char *Txt_Group;
extern const char *Txt_Group_closed;
extern const char *Txt_File_zones_disabled;
extern const char *Txt_No_assigned_room;
@ -2549,7 +2538,7 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
Frm_BeginFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_group,
Box_BoxTableBegin (NULL,Txt_Group,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -1379,29 +1379,6 @@ const char *Hlp_ASSESSMENT_Assignments =
"ASSESSMENT.Assignments.en";
#endif
const char *Hlp_ASSESSMENT_Assignments_new_assignment =
#if L==1
"ASSESSMENT.Assignments.es#nueva-actividad";
#elif L==2
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==3
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==4
"ASSESSMENT.Assignments.es#nueva-actividad";
#elif L==5
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==6
"ASSESSMENT.Assignments.es#nueva-actividad";
#elif L==7
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==8
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==9
"ASSESSMENT.Assignments.en#new-assignment";
#elif L==10 // tr
"ASSESSMENT.Assignments.en#new-assignment";
#endif
const char *Hlp_ASSESSMENT_Assignments_edit_assignment =
#if L==1
"ASSESSMENT.Assignments.es#editar-actividad";
@ -1449,29 +1426,6 @@ const char *Hlp_ASSESSMENT_Projects =
"ASSESSMENT.Projects.en";
#endif
const char *Hlp_ASSESSMENT_Projects_new_project =
#if L==1
"ASSESSMENT.Projects.es#nuevo-proyecto";
#elif L==2
"ASSESSMENT.Projects.en#new-project";
#elif L==3
"ASSESSMENT.Projects.en#new-project";
#elif L==4
"ASSESSMENT.Projects.es#nuevo-proyecto";
#elif L==5
"ASSESSMENT.Projects.en#new-project";
#elif L==6
"ASSESSMENT.Projects.es#nuevo-proyecto";
#elif L==7
"ASSESSMENT.Projects.en#new-project";
#elif L==8
"ASSESSMENT.Projects.en#new-project";
#elif L==9
"ASSESSMENT.Projects.en#new-project";
#elif L==10 // tr
"ASSESSMENT.Projects.en#new-project";
#endif
const char *Hlp_ASSESSMENT_Projects_edit_project =
#if L==1
"ASSESSMENT.Projects.es#editar-proyecto";
@ -1817,29 +1771,6 @@ const char *Hlp_ASSESSMENT_Exams_sessions =
"ASSESSMENT.Exams.en#sessions";
#endif
const char *Hlp_ASSESSMENT_Exams_new_exam =
#if L==1
"ASSESSMENT.Exams.es#nuevo-examen";
#elif L==2
"ASSESSMENT.Exams.en#new-exam";
#elif L==3
"ASSESSMENT.Exams.en#new-exam";
#elif L==4
"ASSESSMENT.Exams.es#nuevo-examen";
#elif L==5
"ASSESSMENT.Exams.en#new-exam";
#elif L==6
"ASSESSMENT.Exams.es#nuevo-examen";
#elif L==7
"ASSESSMENT.Exams.en#new-exam";
#elif L==8
"ASSESSMENT.Exams.en#new-exam";
#elif L==9
"ASSESSMENT.Exams.en#new-exam";
#elif L==10 // tr
"ASSESSMENT.Exams.en#new-exam";
#endif
const char *Hlp_ASSESSMENT_Exams_questions =
#if L==1
"ASSESSMENT.Exams.es#preguntas";
@ -1978,29 +1909,6 @@ const char *Hlp_ASSESSMENT_Games_matches =
"ASSESSMENT.Games.en#matches";
#endif
const char *Hlp_ASSESSMENT_Games_new_game =
#if L==1
"ASSESSMENT.Games.es#nuevo-juego";
#elif L==2
"ASSESSMENT.Games.en#new-game";
#elif L==3
"ASSESSMENT.Games.en#new-game";
#elif L==4
"ASSESSMENT.Games.es#nuevo-juego";
#elif L==5
"ASSESSMENT.Games.en#new-game";
#elif L==6
"ASSESSMENT.Games.es#nuevo-juego";
#elif L==7
"ASSESSMENT.Games.en#new-game";
#elif L==8
"ASSESSMENT.Games.en#new-game";
#elif L==9
"ASSESSMENT.Games.en#new-game";
#elif L==10 // tr
"ASSESSMENT.Games.en#new-game";
#endif
const char *Hlp_ASSESSMENT_Games_questions =
#if L==1
"ASSESSMENT.Games.es#preguntas";
@ -4056,29 +3964,6 @@ const char *Hlp_ANALYTICS_Surveys =
"ANALYTICS.Surveys.en";
#endif
const char *Hlp_ANALYTICS_Surveys_new_survey =
#if L==1
"ANALYTICS.Surveys.es#nueva-encuesta";
#elif L==2
"ANALYTICS.Surveys.en#new-survey";
#elif L==3
"ANALYTICS.Surveys.en#new-survey";
#elif L==4
"ANALYTICS.Surveys.es#nueva-encuesta";
#elif L==5
"ANALYTICS.Surveys.en#new-survey";
#elif L==6
"ANALYTICS.Surveys.es#nueva-encuesta";
#elif L==7
"ANALYTICS.Surveys.en#new-survey";
#elif L==8
"ANALYTICS.Surveys.en#new-survey";
#elif L==9
"ANALYTICS.Surveys.en#new-survey";
#elif L==10 // tr
"ANALYTICS.Surveys.en#new-survey";
#endif
const char *Hlp_ANALYTICS_Surveys_edit_survey =
#if L==1
"ANALYTICS.Surveys.es#editar-encuesta";
@ -4380,29 +4265,6 @@ const char *Hlp_PROFILE_Agenda =
"PROFILE.Agenda.en";
#endif
const char *Hlp_PROFILE_Agenda_new_event =
#if L==1
"PROFILE.Agenda.es#nuevo-evento";
#elif L==2
"PROFILE.Agenda.en#new-event";
#elif L==3
"PROFILE.Agenda.en#new-event";
#elif L==4
"PROFILE.Agenda.es#nuevo-evento";
#elif L==5
"PROFILE.Agenda.en#new-event";
#elif L==6
"PROFILE.Agenda.es#nuevo-evento";
#elif L==7
"PROFILE.Agenda.en#new-event";
#elif L==8
"PROFILE.Agenda.en#new-event";
#elif L==9
"PROFILE.Agenda.en#new-event";
#elif L==10 // tr
"PROFILE.Agenda.en#new-event";
#endif
const char *Hlp_PROFILE_Agenda_edit_event =
#if L==1
"PROFILE.Agenda.es#editar-evento";

View File

@ -44,6 +44,17 @@
#include "swad_parameter.h"
#include "swad_parameter_code.h"
/*****************************************************************************/
/****************************** Private constants ****************************/
/*****************************************************************************/
static const bool Hld_ICanEditHlds[Rol_NUM_ROLES] =
{
/* Users who can edit */
[Rol_INS_ADM] = true,
[Rol_SYS_ADM] = true,
};
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
@ -107,7 +118,6 @@ void Hld_SeeAllHolidays (void)
extern const char *Txt_Holiday;
extern const char *Txt_All_places;
extern const char *Txt_No_holidays;
extern const char *Txt_New_holiday;
Hld_Order_t Order;
unsigned NumHld;
char StrDate[Cns_MAX_BYTES_DATE + 1];
@ -206,14 +216,6 @@ void Hld_SeeAllHolidays (void)
else // No holidays created in the current institution
Ale_ShowAlert (Ale_INFO,Txt_No_holidays);
/***** Button to create center *****/
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin
{
Frm_BeginForm (ActEdiHld);
Btn_PutConfirmButton (Txt_New_holiday);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
@ -241,7 +243,7 @@ static Hld_Order_t Hld_GetParHldOrder (void)
static void Hld_PutIconsSeeHolidays (__attribute__((unused)) void *Args)
{
/***** Edit holidays calendar *****/
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM)
if (Hld_ICanEditHlds[Gbl.Usrs.Me.Role.Logged])
Ico_PutContextualIconToEdit (ActEdiHld,NULL,
NULL,NULL);
@ -864,7 +866,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
{
extern const char *Hlp_INSTITUTION_Holidays_edit;
extern const char *Txt_All_places;
extern const char *Txt_New_holiday;
extern const char *Txt_Holiday;
extern const char *Txt_Place;
extern const char *Txt_Type;
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
@ -881,7 +883,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
Frm_BeginForm (ActNewHld);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_holiday,
Box_BoxTableBegin (NULL,Txt_Holiday,
NULL,NULL,
Hlp_INSTITUTION_Holidays_edit,Box_NOT_CLOSABLE,2);

View File

@ -1376,7 +1376,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
static void Ins_PutFormToCreateInstitution (void)
{
extern const char *Txt_New_institution;
extern const char *Txt_Institution;
extern const char *Txt_Create_institution;
/***** Begin form *****/
@ -1388,7 +1388,7 @@ static void Ins_PutFormToCreateInstitution (void)
Err_NoPermissionExit ();
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_institution,
Box_BoxTableBegin (NULL,Txt_Institution,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -45,6 +45,16 @@
#include "swad_parameter.h"
#include "swad_parameter_code.h"
/*****************************************************************************/
/****************************** Private constants ****************************/
/*****************************************************************************/
static const bool Lnk_ICanEditLinks[Rol_NUM_ROLES] =
{
/* Users who can edit */
[Rol_SYS_ADM] = true,
};
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
@ -103,7 +113,6 @@ void Lnk_SeeLinks (void)
extern const char *Hlp_SYSTEM_Links;
extern const char *Txt_Links;
extern const char *Txt_No_links;
extern const char *Txt_New_link;
struct Lnk_Links Links;
/***** Get list of links *****/
@ -120,14 +129,6 @@ void Lnk_SeeLinks (void)
else // No links created
Ale_ShowAlert (Ale_INFO,Txt_No_links);
/***** Button to create link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
{
Frm_BeginForm (ActEdiLnk);
Btn_PutConfirmButton (Txt_New_link);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
@ -142,7 +143,7 @@ void Lnk_SeeLinks (void)
static void Lnk_PutIconsListingLinks (__attribute__((unused)) void *Args)
{
/***** Put icon to edit links *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
if (Lnk_ICanEditLinks[Gbl.Usrs.Me.Role.Logged])
Lnk_PutIconToEditLinks ();
/***** Put icon to view banners *****/
@ -671,14 +672,14 @@ void Lnk_ContEditAfterChgLnk (void)
static void Lnk_PutFormToCreateLink (void)
{
extern const char *Hlp_SYSTEM_Links_edit;
extern const char *Txt_New_link;
extern const char *Txt_Link;
extern const char *Txt_Create_link;
/***** Begin form *****/
Frm_BeginForm (ActNewLnk);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_link,
Box_BoxTableBegin (NULL,Txt_Link,
NULL,NULL,
Hlp_SYSTEM_Links_edit,Box_NOT_CLOSABLE,2);

View File

@ -672,7 +672,7 @@ void Mai_ContEditAfterChgMai (void)
static void Mai_PutFormToCreateMailDomain (void)
{
extern const char *Hlp_START_Domains_edit;
extern const char *Txt_New_email_domain;
extern const char *Txt_Email_domain;
extern const char *Txt_EMAIL_DOMAIN_ORDER[3];
extern const char *Txt_Create_email_domain;
@ -680,7 +680,7 @@ static void Mai_PutFormToCreateMailDomain (void)
Frm_BeginForm (ActNewMai);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_email_domain,
Box_BoxTableBegin (NULL,Txt_Email_domain,
NULL,NULL,
Hlp_START_Domains_edit,Box_NOT_CLOSABLE,2);

View File

@ -307,8 +307,6 @@ void Mch_ListMatches (struct Gam_Games *Games,
case Rol_SYS_ADM:
if (PutFormNewMatch)
Mch_PutFormNewMatch (&Games->Game); // Form to fill in data and start playing a new match
else
Gam_PutButtonNewMatch (Games); // Button to create a new match
break;
default:
break;
@ -1216,7 +1214,7 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games,
static void Mch_PutFormNewMatch (const struct Gam_Game *Game)
{
extern const char *Hlp_ASSESSMENT_Games_matches;
extern const char *Txt_New_match;
extern const char *Txt_Match;
extern const char *Txt_Title;
extern const char *Txt_Play;
@ -1229,7 +1227,7 @@ static void Mch_PutFormNewMatch (const struct Gam_Game *Game)
Gam_PutParQstInd (0); // Start by first question in game
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_match,
Box_BoxTableBegin (NULL,Txt_Match,
NULL,NULL,
Hlp_ASSESSMENT_Games_matches,Box_NOT_CLOSABLE,2);

View File

@ -219,8 +219,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
{
extern const char *Hlp_COMMUNICATION_Messages_write;
extern const char *Txt_Reply_message;
extern const char *Txt_New_message;
extern const char *Txt_Message;
extern const char *Txt_MSG_To;
extern const char *Txt_Send_message;
unsigned NumUsrsInCrs = 0; // Initialized to avoid warning
@ -269,8 +268,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
}
/***** Begin box *****/
Box_BoxBegin (NULL,Messages->Reply.IsReply ? Txt_Reply_message :
Txt_New_message,
Box_BoxBegin (NULL,Txt_Message,
Msg_PutIconsListMsgs,Messages,
Hlp_COMMUNICATION_Messages_write,Box_NOT_CLOSABLE);

View File

@ -84,7 +84,6 @@ static const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] =
static bool Not_CheckIfICanEditNotices (void);
static void Not_PutIconsListNotices (__attribute__((unused)) void *Args);
static void Not_PutIconToAddNewNotice (void);
static void Not_PutButtonToAddNewNotice (void);
static void Not_GetDataAndShowNotice (long NotCod);
static void Not_GetNoticeDataFromRow (MYSQL_RES *mysql_res,
struct Not_Notice *Notice,
@ -103,7 +102,7 @@ void Not_ShowFormNotice (void)
{
extern const char *Hlp_COMMUNICATION_Notices;
extern const char *Txt_The_notice_will_appear_as_a_yellow_note_;
extern const char *Txt_New_notice;
extern const char *Txt_Notice;
extern const char *Txt_Create_notice;
/***** Help message *****/
@ -114,7 +113,7 @@ void Not_ShowFormNotice (void)
Frm_BeginForm (ActRcvNot);
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_New_notice,
Box_BoxBegin (NULL,Txt_Notice,
NULL,NULL,
Hlp_COMMUNICATION_Notices,Box_NOT_CLOSABLE);
@ -381,10 +380,6 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
HTM_DIV_End ();
break;
case Not_LIST_FULL_NOTICES:
/***** Button to add new notice *****/
if (Not_CheckIfICanEditNotices ())
Not_PutButtonToAddNewNotice ();
/***** End box *****/
Box_BoxEnd ();
break;
@ -430,19 +425,6 @@ static void Not_PutIconToAddNewNotice (void)
Ico_PutContextualIconToAdd (ActWriNot,NULL,NULL,NULL);
}
/*****************************************************************************/
/********************** Put button to add a new notice ***********************/
/*****************************************************************************/
static void Not_PutButtonToAddNewNotice (void)
{
extern const char *Txt_New_notice;
Frm_BeginForm (ActWriNot);
Btn_PutConfirmButton (Txt_New_notice);
Frm_EndForm ();
}
/*****************************************************************************/
/******************** Get data of a notice and show it ***********************/
/*****************************************************************************/

View File

@ -114,7 +114,6 @@ void Plc_SeeAllPlaces (void)
extern const char *Txt_PLACES_ORDER[2];
extern const char *Txt_Other_places;
extern const char *Txt_Place_unspecified;
extern const char *Txt_New_place;
struct Plc_Places Places;
Plc_Order_t Order;
unsigned NumPlc;
@ -224,14 +223,6 @@ void Plc_SeeAllPlaces (void)
/***** End table *****/
HTM_TABLE_End ();
/***** Button to create place *****/
if (Plc_ICanEditPlaces[Gbl.Usrs.Me.Role.Logged])
{
Frm_BeginForm (ActEdiPlc);
Btn_PutConfirmButton (Txt_New_place);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
@ -690,14 +681,14 @@ void Plc_ContEditAfterChgPlc (void)
static void Plc_PutFormToCreatePlace (void)
{
extern const char *Txt_New_place;
extern const char *Txt_Place;
extern const char *Txt_Create_place;
/***** Begin form *****/
Frm_BeginForm (ActNewPlc);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_place,
Box_BoxTableBegin (NULL,Txt_Place,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -775,7 +775,7 @@ void Plg_ContEditAfterChgPlg (void)
static void Plg_PutFormToCreatePlugin (void)
{
extern const char *Txt_New_plugin;
extern const char *Txt_Plugin;
extern const char *Txt_Name;
extern const char *Txt_Description;
extern const char *Txt_Logo;
@ -788,7 +788,7 @@ static void Plg_PutFormToCreatePlugin (void)
Frm_BeginForm (ActNewPlg);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_plugin,
Box_BoxTableBegin (NULL,Txt_Plugin,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -117,7 +117,6 @@ static void Prg_PutIconToEditProgram (void);
static void Prg_PutIconToViewProgram (void);
static void Prg_PutIconToCreateNewItem (void);
static void Prg_PutIconToViewResourceClipboard (void);
static void Prg_PutButtonToCreateNewItem (void);
static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
unsigned NumItem,struct Prg_Item *Item,
@ -359,18 +358,6 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,
HTM_TBODY_End (); // 3rd tbody end
HTM_TABLE_End ();
/***** Button to create a new program item *****/
switch (ListingType)
{
case Prg_PRINT:
case Prg_VIEW:
break;
default:
if (Prg_CheckIfICanEditProgram ())
Prg_PutButtonToCreateNewItem ();
break;
}
/***** End box *****/
Box_BoxEnd ();
@ -466,19 +453,6 @@ static void Prg_PutIconToViewResourceClipboard (void)
NULL,NULL);
}
/*****************************************************************************/
/***************** Put button to create a new program item *******************/
/*****************************************************************************/
static void Prg_PutButtonToCreateNewItem (void)
{
extern const char *Txt_New_item;
Frm_BeginFormAnchor (ActFrmNewPrgItm,Prg_ITEM_SECTION_ID);
Btn_PutConfirmButton (Txt_New_item);
Frm_EndForm ();
}
/*****************************************************************************/
/************************** Show one program item ****************************/
/*****************************************************************************/
@ -1959,7 +1933,7 @@ void Prg_ReqCreateItem (void)
static void Prg_ShowFormToCreateItem (long ParentItmCod)
{
extern const char *Hlp_COURSE_Program_new_item;
extern const char *Txt_New_item;
extern const char *Txt_Item;
extern const char *Txt_Create_item;
struct Prg_Item ParentItem; // Parent item
struct Prg_Item Item;
@ -1987,7 +1961,7 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
ParCod_PutPar (ParCod_Itm,ParentItem.Hierarchy.ItmCod);
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_New_item,
Box_BoxTableBegin ("100%",Txt_Item,
NULL,NULL,
Hlp_COURSE_Program_new_item,Box_NOT_CLOSABLE,2);

View File

@ -205,7 +205,6 @@ static void Prj_ShowProjectsHead (struct Prj_Projects *Projects);
static void Prj_ShowTableAllProjectsHead (void);
static bool Prj_CheckIfICanCreateProjects (const struct Prj_Projects *Projects);
static void Prj_PutIconToCreateNewPrj (struct Prj_Projects *Projects);
static void Prj_PutButtonToCreateNewPrj (struct Prj_Projects *Projects);
static void Prj_PutIconToShowAllData (struct Prj_Projects *Projects);
static void Prj_PutIconsOnePrj (void *Projects);
@ -602,10 +601,6 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
else // No projects created
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
/***** Button to create a new project *****/
if (Prj_CheckIfICanCreateProjects ((struct Prj_Projects *) Projects))
Prj_PutButtonToCreateNewPrj ((struct Prj_Projects *) Projects);
/***** End box *****/
Box_BoxEnd ();
@ -1293,21 +1288,6 @@ static void Prj_PutIconToCreateNewPrj (struct Prj_Projects *Projects)
/******************** Put button to create a new project *********************/
/*****************************************************************************/
static void Prj_PutButtonToCreateNewPrj (struct Prj_Projects *Projects)
{
extern const char *Txt_New_project;
Projects->Prj.PrjCod = -1L;
Frm_BeginForm (ActFrmNewPrj);
Prj_PutCurrentPars (Projects);
Btn_PutConfirmButton (Txt_New_project);
Frm_EndForm ();
}
/*****************************************************************************/
/******************** Put button to create a new project *********************/
/*****************************************************************************/
static void Prj_PutIconToShowAllData (struct Prj_Projects *Projects)
{
Lay_PutContextualLinkOnlyIcon (ActSeeTblAllPrj,NULL,
@ -3708,11 +3688,9 @@ static void Prj_ReqCreatOrEditPrj (struct Prj_Projects *Projects)
static void Prj_PutFormProject (struct Prj_Projects *Projects,
bool ItsANewProject)
{
extern const char *Hlp_ASSESSMENT_Projects_new_project;
extern const char *Hlp_ASSESSMENT_Projects_edit_project;
extern const char *Par_CodeStr[];
extern const char *Txt_New_project;
extern const char *Txt_Edit_project;
extern const char *Txt_Project;
extern const char *Txt_Data;
extern const char *Txt_Title;
extern const char *Txt_Department;
@ -3736,16 +3714,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
char *SelectClass;
/***** Begin project box *****/
if (ItsANewProject)
{
Projects->Prj.PrjCod = -1L;
Box_BoxBegin (NULL,Txt_New_project,
NULL,NULL,
Hlp_ASSESSMENT_Projects_new_project,Box_NOT_CLOSABLE);
}
else
Box_BoxBegin (NULL,Projects->Prj.Title[0] ? Projects->Prj.Title :
Txt_Edit_project,
Txt_Project,
NULL,NULL,
Hlp_ASSESSMENT_Projects_edit_project,Box_NOT_CLOSABLE);

View File

@ -138,7 +138,7 @@ void Qst_ReqEditQsts (void)
void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions)
{
extern const char *Hlp_ASSESSMENT_Questions;
extern const char *Txt_No_test_questions;
extern const char *Txt_No_questions;
extern const char *Txt_Question_bank;
extern const char *Txt_Show_questions;
MYSQL_RES *mysql_res;
@ -178,13 +178,8 @@ void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions)
Frm_EndForm ();
}
else // No test questions
{
/***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/
Qst_PutButtonToAddQuestion ();
}
Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/***** End box *****/
Box_BoxEnd ();
@ -315,7 +310,7 @@ void Qst_ShowFormRequestSelectQstsForExamSet (struct Exa_Exams *Exams,
struct Qst_Questions *Questions)
{
extern const char *Hlp_ASSESSMENT_Exams_questions;
extern const char *Txt_No_test_questions;
extern const char *Txt_No_questions;
extern const char *Txt_Select_questions;
extern const char *Txt_Show_questions;
MYSQL_RES *mysql_res;
@ -355,13 +350,8 @@ void Qst_ShowFormRequestSelectQstsForExamSet (struct Exa_Exams *Exams,
Frm_EndForm ();
}
else // No test questions
{
/***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/
Qst_PutButtonToAddQuestion ();
}
Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/***** End box *****/
Box_BoxEnd ();
@ -378,7 +368,7 @@ void Qst_ShowFormRequestSelectQstsForGame (struct Gam_Games *Games,
struct Qst_Questions *Questions)
{
extern const char *Hlp_ASSESSMENT_Games_questions;
extern const char *Txt_No_test_questions;
extern const char *Txt_No_questions;
extern const char *Txt_Select_questions;
extern const char *Txt_Show_questions;
MYSQL_RES *mysql_res;
@ -415,13 +405,8 @@ void Qst_ShowFormRequestSelectQstsForGame (struct Gam_Games *Games,
Frm_EndForm ();
}
else // No test questions
{
/***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/
Qst_PutButtonToAddQuestion ();
}
Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/***** End box *****/
Box_BoxEnd ();
@ -494,19 +479,6 @@ void Qst_PutIconsEditBankQsts (void *Questions)
Fig_PutIconToShowFigure (Fig_TESTS);
}
/*****************************************************************************/
/**************** Put button to create a new test question *******************/
/*****************************************************************************/
void Qst_PutButtonToAddQuestion (void)
{
extern const char *Txt_New_question;
Frm_BeginForm (ActEdiOneTstQst);
Btn_PutConfirmButton (Txt_New_question);
Frm_EndForm ();
}
/*****************************************************************************/
/********************* List game question for edition ************************/
/*****************************************************************************/
@ -839,13 +811,10 @@ void Qst_ListOneOrMoreQstsForEdition (struct Qst_Questions *Questions,
unsigned QstInd;
MYSQL_ROW row;
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Questions,
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Questions,
Qst_PutIconsEditBankQsts,Questions,
Hlp_ASSESSMENT_Questions,Box_NOT_CLOSABLE);
/***** Begin table *****/
HTM_TABLE_BeginWideMarginPadding (5);
Hlp_ASSESSMENT_Questions,Box_NOT_CLOSABLE,5);
/***** Write the heading *****/
Qst_WriteHeadingRowQuestionsForEdition (Questions);
@ -870,14 +839,8 @@ void Qst_ListOneOrMoreQstsForEdition (struct Qst_Questions *Questions,
Qst_QstDestructor (&Questions->Question);
}
/***** End table *****/
HTM_TABLE_End ();
/***** Button to add a new question *****/
Qst_PutButtonToAddQuestion ();
/***** End box *****/
Box_BoxEnd ();
/***** End table and box *****/
Box_BoxTableEnd ();
}
/*****************************************************************************/
@ -1403,19 +1366,16 @@ void Qst_WriteAnswersBank (struct Qst_Question *Question,
void Qst_ListOneQstToEdit (struct Qst_Questions *Questions)
{
extern const char *Hlp_ASSESSMENT_Tests;
extern const char *Hlp_ASSESSMENT_Questions;
extern const char *Txt_Questions;
/***** List only one question *****/
Questions->NumQsts = 1;
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Questions,
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Questions,
Qst_PutIconsEditBankQsts,Questions,
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
/***** Begin table *****/
HTM_TABLE_BeginWideMarginPadding (5);
Hlp_ASSESSMENT_Questions,Box_NOT_CLOSABLE,5);
/***** Write the heading *****/
Qst_WriteHeadingRowQuestionsForEdition (Questions);
@ -1423,13 +1383,7 @@ void Qst_ListOneQstToEdit (struct Qst_Questions *Questions)
/***** Write question row *****/
Qst_WriteQuestionListing (Questions,0);
/***** End table *****/
HTM_TABLE_End ();
/***** Button to add a new question *****/
Qst_PutButtonToAddQuestion ();
/***** End box *****/
/***** End table and box *****/
Box_BoxEnd ();
}
@ -1835,7 +1789,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
{
extern const char *Hlp_ASSESSMENT_Questions_writing_a_question;
extern const char *Txt_Question_code_X;
extern const char *Txt_New_question;
extern const char *Txt_Question;
extern const char *Txt_Tags;
extern const char *Txt_new_tag;
extern const char *Txt_Wording;
@ -1880,7 +1834,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
free (Title);
}
else
Box_BoxBegin (NULL,Txt_New_question,
Box_BoxBegin (NULL,Txt_Question,
NULL,NULL,
Hlp_ASSESSMENT_Questions_writing_a_question,Box_NOT_CLOSABLE);

View File

@ -144,7 +144,6 @@ void Qst_ShowFormRequestSelectQstsForGame (struct Gam_Games *Games,
bool Qst_CheckIfICanEditQsts (void);
void Qst_PutIconsRequestBankQsts (__attribute__((unused)) void *Args);
void Qst_PutIconsEditBankQsts (void *Questions);
void Qst_PutButtonToAddQuestion (void);
void Qst_ListQuestionForEdition (struct Qst_Question *Question,
unsigned QstInd,bool QuestionExists,

View File

@ -100,6 +100,7 @@ static struct
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void Rec_ListFieldsRecordsForEdition (void);
static void Rec_WriteHeadingRecordFields (void);
static void Rec_PutParFldCod (void *FldCod);
@ -180,25 +181,23 @@ void Rec_ReqEditRecordFields (void)
/***** Get list of fields of records in current course *****/
Rec_GetListRecordFieldsInCurrentCrs ();
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Record_fields,
NULL,NULL,
Hlp_USERS_Students_course_record_card,Box_NOT_CLOSABLE);
/***** Put a form to create a new record field *****/
Rec_ShowFormCreateRecordField ();
/***** List the current fields of records for edit them *****/
if (Gbl.Crs.Records.LstFields.Num) // Fields found...
{
/* Begin box and table */
Box_BoxTableBegin (NULL,Txt_Record_fields,
NULL,NULL,
Hlp_USERS_Students_course_record_card,Box_NOT_CLOSABLE,2);
Rec_ListFieldsRecordsForEdition ();
/* End table and box */
Box_BoxTableEnd ();
}
else // No fields of records found for current course in the database
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_record_fields_in_the_course_X,
Gbl.Hierarchy.Crs.FullName);
/***** Put a form to create a new record field *****/
Rec_ShowFormCreateRecordField ();
/***** End box *****/
Box_BoxEnd ();
/* Free list of fields of records */
Rec_FreeListFields ();
@ -263,7 +262,7 @@ void Rec_GetListRecordFieldsInCurrentCrs (void)
/********* List the fields of records already present in database ************/
/*****************************************************************************/
void Rec_ListFieldsRecordsForEdition (void)
static void Rec_ListFieldsRecordsForEdition (void)
{
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
unsigned NumField;
@ -272,6 +271,9 @@ void Rec_ListFieldsRecordsForEdition (void)
unsigned VisUnsigned;
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);
/***** Write heading *****/
Rec_WriteHeadingRecordFields ();
@ -338,6 +340,9 @@ void Rec_ListFieldsRecordsForEdition (void)
HTM_TR_End ();
}
/***** End table *****/
HTM_TABLE_End ();
}
/*****************************************************************************/
@ -347,7 +352,7 @@ void Rec_ListFieldsRecordsForEdition (void)
void Rec_ShowFormCreateRecordField (void)
{
extern const char *Hlp_USERS_Students_course_record_card;
extern const char *Txt_New_record_field;
extern const char *Txt_Record_field;
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
extern const char *Txt_Create_record_field;
Rec_VisibilityRecordFields_t Vis;
@ -358,7 +363,7 @@ void Rec_ShowFormCreateRecordField (void)
Frm_BeginForm (ActNewFie);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_record_field,
Box_BoxTableBegin (NULL,Txt_Record_field,
NULL,NULL,
Hlp_USERS_Students_course_record_card,Box_NOT_CLOSABLE,2);

View File

@ -118,7 +118,6 @@ struct LstRecordFields
void Rec_ReqEditRecordFields (void);
void Rec_GetListRecordFieldsInCurrentCrs (void);
void Rec_ListFieldsRecordsForEdition (void);
void Rec_ShowFormCreateRecordField (void);
void Rec_ReceiveFormField (void);
unsigned Rec_ConvertToNumLinesField (const char *StrNumLines);

View File

@ -156,7 +156,6 @@ void Roo_SeeRooms (void)
extern const char *Txt_ROOMS_ORDER[Roo_NUM_ORDERS];
extern const char *Txt_MAC_address;
extern const char *Txt_ROOM_TYPES[Roo_NUM_TYPES];
extern const char *Txt_New_room;
struct Roo_Rooms Rooms;
Roo_Order_t Order;
unsigned NumRoom;
@ -289,14 +288,6 @@ void Roo_SeeRooms (void)
/***** End table *****/
HTM_TABLE_End ();
/***** Button to create room *****/
if (Roo_CheckIfICanCreateRooms ())
{
Frm_BeginForm (ActEdiRoo);
Btn_PutConfirmButton (Txt_New_room);
Frm_EndForm ();
}
/***** End box *****/
Box_BoxEnd ();
@ -1229,7 +1220,7 @@ void Roo_ContEditAfterChgRoom (void)
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
{
extern const char *Txt_New_room;
extern const char *Txt_Room;
extern const char *Txt_Create_room;
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
@ -1238,7 +1229,7 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
Frm_BeginForm (ActNewRoo);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_room,
Box_BoxTableBegin (NULL,Txt_Room,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -61,7 +61,6 @@ extern struct Globals Gbl;
static void Rub_PutIconsListRubrics (void *Rubrics);
static void Rub_PutIconToCreateNewRubric (struct Rub_Rubrics *Rubrics);
static void Prg_PutIconToViewResourceClipboard (void);
static void Rub_PutButtonToCreateNewRubric (struct Rub_Rubrics *Rubrics);
static void Rub_PutParsToCreateNewRubric (void *Rubrics);
static void Rub_ShowRubricMainData (struct Rub_Rubrics *Rubrics,
@ -108,6 +107,7 @@ void Rub_RubricConstructor (struct Rub_Rubric *Rubric)
/***** Allocate memory for rubric text *****/
if ((Rubric->Txt = malloc (Cns_MAX_BYTES_TEXT + 1)) == NULL)
Err_NotEnoughMemoryExit ();
Rubric->Txt[0] = '\0';
}
void Rub_RubricDestructor (struct Rub_Rubric *Rubric)
@ -216,10 +216,6 @@ void Rub_ListAllRubrics (struct Rub_Rubrics *Rubrics)
Pag_WriteLinksToPagesCentered (Pag_RUBRICS,&Pagination,
Rubrics,-1L);
/***** Button to create a new rubric *****/
if (Rub_CheckIfICanEditRubrics ())
Rub_PutButtonToCreateNewRubric (Rubrics);
/***** End box *****/
Box_BoxEnd ();
@ -307,22 +303,6 @@ static void Prg_PutIconToViewResourceClipboard (void)
NULL,NULL);
}
/*****************************************************************************/
/******************** Put button to create a new rubric **********************/
/*****************************************************************************/
static void Rub_PutButtonToCreateNewRubric (struct Rub_Rubrics *Rubrics)
{
extern const char *Txt_New_rubric;
Frm_BeginForm (ActFrmNewRub);
Rub_PutParsToCreateNewRubric (Rubrics);
Btn_PutConfirmButton (Txt_New_rubric);
Frm_EndForm ();
}
/*****************************************************************************/
/******************* Put parameters to create a new rubric *******************/
/*****************************************************************************/
@ -813,8 +793,7 @@ void Rub_PutFormEditionRubric (struct Rub_Rubrics *Rubrics,
{
extern const char *Hlp_ASSESSMENT_Rubrics_new_rubric;
extern const char *Hlp_ASSESSMENT_Rubrics_edit_rubric;
extern const char *Txt_New_rubric;
extern const char *Txt_Edit_rubric;
extern const char *Txt_Rubric;
extern const char *Txt_Title;
extern const char *Txt_Description;
extern const char *Txt_Create_rubric;
@ -829,11 +808,6 @@ void Rub_PutFormEditionRubric (struct Rub_Rubrics *Rubrics,
[Rub_EXISTING_RUBRIC] = Btn_CONFIRM_BUTTON,
[Rub_NEW_RUBRIC ] = Btn_CREATE_BUTTON,
};
const char *Title[] =
{
[Rub_EXISTING_RUBRIC] = Txt_Edit_rubric,
[Rub_NEW_RUBRIC ] = Txt_New_rubric,
};
const char *HelpLink[] =
{
[Rub_EXISTING_RUBRIC] = Hlp_ASSESSMENT_Rubrics_edit_rubric,
@ -852,7 +826,7 @@ void Rub_PutFormEditionRubric (struct Rub_Rubrics *Rubrics,
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,
Rubrics->Rubric.Title[0] ? Rubrics->Rubric.Title :
Title[ExistingNewRubric],
Txt_Rubric,
NULL,NULL,
HelpLink[ExistingNewRubric],Box_NOT_CLOSABLE,2);

View File

@ -146,7 +146,7 @@ void RubCri_GetCriterionDataByCod (struct RubCri_Criterion *Criterion)
static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
unsigned MaxCriInd)
{
extern const char *Txt_New_criterion;
extern const char *Txt_Criterion;
extern const char *Txt_Create_criterion;
RubCri_ValueRange_t ValueRange;
@ -155,7 +155,7 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
Rub_PutPars (Rubrics);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_criterion,
Box_BoxTableBegin (NULL,Txt_Criterion,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -92,7 +92,6 @@ struct Svy_Question // Must be initialized to 0 before using it
static bool Svy_CheckIfICanCreateSvy (void);
static void Svy_PutIconsListSurveys (void *Surveys);
static void Svy_PutIconToCreateNewSvy (struct Svy_Surveys *Surveys);
static void Svy_PutButtonToCreateNewSvy (struct Svy_Surveys *Surveys);
static void Svy_PutParsToCreateNewSvy (void *Surveys);
static void Svy_ParsWhichGroupsToShow (void *Surveys);
static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
@ -133,7 +132,6 @@ static void Svy_GetQstDataFromRow (MYSQL_RES *mysql_res,
char Stem[Cns_MAX_BYTES_TEXT + 1]);
static void Svy_PutParsToEditQuestion (void *Surveys);
static void Svy_PutIconToAddNewQuestion (void *Surveys);
static void Svy_PutButtonToCreateNewQuestion (struct Svy_Surveys *Surveys);
static void Svy_WriteQstStem (const char *Stem);
static void Svy_WriteAnswersOfAQst (struct Svy_Survey *Svy,
struct Svy_Question *SvyQst,
@ -288,10 +286,6 @@ void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,&Pagination,
Surveys,-1L);
/***** Button to create a new survey *****/
if (Svy_CheckIfICanCreateSvy ())
Svy_PutButtonToCreateNewSvy (Surveys);
/***** End box *****/
Box_BoxEnd ();
@ -346,20 +340,6 @@ static void Svy_PutIconToCreateNewSvy (struct Svy_Surveys *Surveys)
Svy_PutParsToCreateNewSvy,Surveys);
}
/*****************************************************************************/
/********************* Put button to create a new survey *********************/
/*****************************************************************************/
static void Svy_PutButtonToCreateNewSvy (struct Svy_Surveys *Surveys)
{
extern const char *Txt_New_survey;
Frm_BeginForm (ActFrmNewSvy);
Svy_PutParsToCreateNewSvy (Surveys);
Btn_PutConfirmButton (Txt_New_survey);
Frm_EndForm ();
}
/*****************************************************************************/
/******************* Put parameters to create a new survey *******************/
/*****************************************************************************/
@ -1636,11 +1616,9 @@ void Svy_UnhideSurvey (void)
void Svy_ReqCreatOrEditSvy (void)
{
extern const char *Hlp_ANALYTICS_Surveys_new_survey;
extern const char *Hlp_ANALYTICS_Surveys_edit_survey;
extern const char *Txt_New_survey;
extern const char *Txt_Scope;
extern const char *Txt_Edit_survey;
extern const char *Txt_Survey;
extern const char *Txt_Title;
extern const char *Txt_Description;
extern const char *Txt_Users;
@ -1708,14 +1686,9 @@ void Svy_ReqCreatOrEditSvy (void)
Svy_PutPars (&Surveys);
/***** Begin box and table *****/
if (ItsANewSurvey)
Box_BoxTableBegin (NULL,Txt_New_survey,
NULL,NULL,
Hlp_ANALYTICS_Surveys_new_survey,Box_NOT_CLOSABLE,2);
else
Box_BoxTableBegin (NULL,
Surveys.Svy.Title[0] ? Surveys.Svy.Title :
Txt_Edit_survey,
Txt_Survey,
NULL,NULL,
Hlp_ANALYTICS_Surveys_edit_survey,Box_NOT_CLOSABLE,2);
@ -2291,7 +2264,6 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
{
extern const char *Hlp_ANALYTICS_Surveys_questions;
extern const char *Txt_Question;
extern const char *Txt_New_question;
extern const char *Txt_Wording;
extern const char *Txt_Type;
extern const char *Txt_SURVEY_STR_ANSWER_TYPES[Svy_NUM_ANS_TYPES];
@ -2352,7 +2324,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
free (Title);
}
else
Box_BoxBegin (NULL,Txt_New_question,
Box_BoxBegin (NULL,Txt_Question,
NULL,NULL,
Hlp_ANALYTICS_Surveys_questions,Box_NOT_CLOSABLE);
@ -2822,12 +2794,6 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys)
else // This survey has no questions
Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions);
if (Surveys->Svy.Status.ICanEdit && // I can edit
(!NumQsts || // This survey has no questions
Editing)) // I am editing
/***** Put button to add a new question in this survey *****/
Svy_PutButtonToCreateNewQuestion (Surveys);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
@ -2884,20 +2850,6 @@ static void Svy_PutIconToAddNewQuestion (void *Surveys)
Ico_PutContextualIconToAdd (ActEdiOneSvyQst,NULL,Svy_PutPars,Surveys);
}
/*****************************************************************************/
/**************** Put button to add a new question to survey *****************/
/*****************************************************************************/
static void Svy_PutButtonToCreateNewQuestion (struct Svy_Surveys *Surveys)
{
extern const char *Txt_New_question;
Frm_BeginForm (ActEdiOneSvyQst);
Svy_PutPars (Surveys);
Btn_PutConfirmButton (Txt_New_question);
Frm_EndForm ();
}
/*****************************************************************************/
/****************** Write the heading of a survey question *******************/
/*****************************************************************************/

View File

@ -383,7 +383,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
void Tag_ShowFormEditTags (void)
{
extern const char *Hlp_ASSESSMENT_Questions_editing_tags;
extern const char *Txt_No_test_questions;
extern const char *Txt_No_questions;
extern const char *Txt_Tags;
MYSQL_RES *mysql_res;
MYSQL_ROW row;
@ -440,7 +440,7 @@ void Tag_ShowFormEditTags (void)
Box_BoxTableEnd ();
}
else
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res);

View File

@ -118,7 +118,7 @@ static void Tst_ShowFormRequestTest (struct Qst_Questions *Questions)
extern const char *Txt_Test;
extern const char *Txt_Number_of_questions;
extern const char *Txt_Generate_test;
extern const char *Txt_No_test_questions;
extern const char *Txt_No_questions;
MYSQL_RES *mysql_res;
/***** Read test configuration from database *****/
@ -173,14 +173,8 @@ static void Tst_ShowFormRequestTest (struct Qst_Questions *Questions)
}
}
else
{
/***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/
if (Qst_CheckIfICanEditQsts ())
Qst_PutButtonToAddQuestion ();
}
Ale_ShowAlert (Ale_INFO,Txt_No_questions);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);

File diff suppressed because it is too large Load Diff