mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-08 00:00:25 +02:00
Version 23.87: Jul 16, 2024 Changes in layout of project filters.
This commit is contained in:
parent
3bdb133611
commit
eabfd1716f
104
swad_agenda.c
104
swad_agenda.c
|
@ -241,23 +241,23 @@ static void Agd_ShowFormToSelPast__FutureEvents (const struct Agd_Agenda *Agenda
|
|||
};
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (PstFut = Agd_PAST___EVENTS;
|
||||
PstFut <= Agd_FUTURE_EVENTS;
|
||||
PstFut++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->Past__FutureEvents & (1 << PstFut)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents ^ (1 << PstFut), // Toggle
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PstFut],Ico_BLACK,
|
||||
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
for (PstFut = Agd_PAST___EVENTS;
|
||||
PstFut <= Agd_FUTURE_EVENTS;
|
||||
PstFut++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->Past__FutureEvents & (1 << PstFut)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents ^ (1 << PstFut), // Toggle
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PstFut],Ico_BLACK,
|
||||
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
|
@ -280,23 +280,23 @@ static void Agd_ShowFormToSelPrivatPublicEvents (const struct Agd_Agenda *Agenda
|
|||
};
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (PrvPub = Agd_PRIVAT_EVENTS;
|
||||
PrvPub <= Agd_PUBLIC_EVENTS;
|
||||
PrvPub++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->PrivatPublicEvents & (1 << PrvPub)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents ^ (1 << PrvPub), // Toggle
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PrvPub].Icon,Icon[PrvPub].Color,
|
||||
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
for (PrvPub = Agd_PRIVAT_EVENTS;
|
||||
PrvPub <= Agd_PUBLIC_EVENTS;
|
||||
PrvPub++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->PrivatPublicEvents & (1 << PrvPub)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents ^ (1 << PrvPub), // Toggle
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PrvPub].Icon,Icon[PrvPub].Color,
|
||||
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
|
@ -311,24 +311,24 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (const struct Agd_Agenda *Agenda
|
|||
HidVis_HiddenOrVisible_t HiddenOrVisible;
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (HiddenOrVisible = HidVis_HIDDEN;
|
||||
HiddenOrVisible <= HidVis_VISIBLE;
|
||||
HiddenOrVisible++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->HiddenVisiblEvents & (1 << HiddenOrVisible)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents ^ (1 << HiddenOrVisible), // Toggle
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Ico_HiddenVisible[HiddenOrVisible].Icon,
|
||||
Ico_HiddenVisible[HiddenOrVisible].Color,
|
||||
Txt_AGENDA_HIDDEN_VISIBLE_EVENTS[HiddenOrVisible]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
for (HiddenOrVisible = HidVis_HIDDEN;
|
||||
HiddenOrVisible <= HidVis_VISIBLE;
|
||||
HiddenOrVisible++)
|
||||
{
|
||||
Set_BeginPref ((Agenda->HiddenVisiblEvents & (1 << HiddenOrVisible)));
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents ^ (1 << HiddenOrVisible), // Toggle
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Ico_HiddenVisible[HiddenOrVisible].Icon,
|
||||
Ico_HiddenVisible[HiddenOrVisible].Color,
|
||||
Txt_AGENDA_HIDDEN_VISIBLE_EVENTS[HiddenOrVisible]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.86 (2024-07-15)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.87 (2024-07-16)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.79.js"
|
||||
/*
|
||||
Version 23.87: Jul 16, 2024 Changes in layout of project filters. (335321 lines)
|
||||
Version 23.86: Jul 15, 2024 Fixed bug in list of centers.
|
||||
Changes in selection of users in projects.
|
||||
Code refactoring in projects. (335225 lines)
|
||||
|
|
|
@ -4295,10 +4295,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,
|
|||
extern const char *Txt_GROUP_WHICH_GROUPS[2];
|
||||
Grp_WhichGroups_t WhichGrps;
|
||||
|
||||
/***** Begin setting selector *****/
|
||||
Set_BeginOneSettingSelector ();
|
||||
|
||||
/***** Put icons to select which groups *****/
|
||||
for (WhichGrps = Grp_MY_GROUPS;
|
||||
WhichGrps <= Grp_ALL_GROUPS;
|
||||
WhichGrps++)
|
||||
|
@ -4314,8 +4311,6 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
|
||||
/***** End setting selector *****/
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
|
|
52
swad_match.c
52
swad_match.c
|
@ -2542,39 +2542,35 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
|
|||
"4col.png", // 4 columns
|
||||
};
|
||||
|
||||
/***** Begin selector *****/
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (NumCols = 1;
|
||||
NumCols <= Mch_MAX_COLS;
|
||||
NumCols++)
|
||||
{
|
||||
/* Begin container for this option */
|
||||
HTM_DIV_Begin ("class=\"%s\"",
|
||||
(Match->Status.NumCols == NumCols) ? "MCH_NUM_COL_ON" :
|
||||
"MCH_NUM_COL_OFF");
|
||||
|
||||
for (NumCols = 1;
|
||||
NumCols <= Mch_MAX_COLS;
|
||||
NumCols++)
|
||||
{
|
||||
/* Begin container for this option */
|
||||
HTM_DIV_Begin ("class=\"%s\"",
|
||||
(Match->Status.NumCols == NumCols) ? "MCH_NUM_COL_ON" :
|
||||
"MCH_NUM_COL_OFF");
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActChgNumColMch);
|
||||
ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
|
||||
Mch_PutParNumCols (NumCols); // Number of columns
|
||||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActChgNumColMch);
|
||||
ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
|
||||
Mch_PutParNumCols (NumCols); // Number of columns
|
||||
/* Number of columns */
|
||||
if (asprintf (&Title,"%u %s",NumCols,
|
||||
NumCols == 1 ? Txt_column :
|
||||
Txt_columns) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Ico_PutSettingIconLink (NumColsIcon[NumCols],Ico_BLACK,Title);
|
||||
free (Title);
|
||||
|
||||
/* Number of columns */
|
||||
if (asprintf (&Title,"%u %s",NumCols,
|
||||
NumCols == 1 ? Txt_column :
|
||||
Txt_columns) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Ico_PutSettingIconLink (NumColsIcon[NumCols],Ico_BLACK,Title);
|
||||
free (Title);
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
||||
/* End container for this option */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
||||
/***** End selector *****/
|
||||
/* End container for this option */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
|
|
205
swad_project.c
205
swad_project.c
|
@ -204,9 +204,9 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects);
|
|||
|
||||
static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByRoleInPrj (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByAssignation (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByFaultiness (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByReview (const struct Prj_Projects *Projects);
|
||||
static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects);
|
||||
|
||||
|
@ -542,12 +542,23 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
|||
extern const char *Hlp_ASSESSMENT_Projects;
|
||||
extern const char *Txt_Projects;
|
||||
extern const char *Txt_Filters;
|
||||
extern const char *Txt_Users;
|
||||
extern const char *Txt_Roles;
|
||||
extern const char *Txt_Assignation;
|
||||
extern const char *Txt_Visibility;
|
||||
extern const char *Txt_Faultiness;
|
||||
extern const char *Txt_Review;
|
||||
extern const char *Txt_Department;
|
||||
extern const char *Txt_No_projects;
|
||||
struct Pag_Pagination Pagination;
|
||||
unsigned NumPrj;
|
||||
|
||||
if (Projects)
|
||||
{
|
||||
/***** Students will see only visible projects *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_STD)
|
||||
((struct Prj_Projects *) Projects)->Filter.Hidden &= ~(1 << HidVis_HIDDEN);
|
||||
|
||||
/***** Get list of projects *****/
|
||||
Prj_GetListProjects ((struct Prj_Projects *) Projects);
|
||||
|
||||
|
@ -566,29 +577,81 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
|||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Filters);
|
||||
|
||||
/* 1st. row */
|
||||
Set_BeginSettingsHead ();
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
|
||||
Prj_ShowFormToFilterByMy_All ((struct Prj_Projects *) Projects);
|
||||
Prj_ShowFormToFilterByRoleInPrj ((struct Prj_Projects *) Projects);
|
||||
Prj_ShowFormToFilterByAssign ((struct Prj_Projects *) Projects);
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
Prj_ShowFormToFilterByHidden ((struct Prj_Projects *) Projects);
|
||||
break;
|
||||
default: // Students will see only visible projects
|
||||
break;
|
||||
}
|
||||
Prj_ShowFormToFilterByWarning ((struct Prj_Projects *) Projects);
|
||||
Prj_ShowFormToFilterByReview ((struct Prj_Projects *) Projects);
|
||||
// TODO: Put the following in a loop
|
||||
|
||||
Set_EndSettingsHead ();
|
||||
/***** Users *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Users);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByMy_All ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/* 2nd. row */
|
||||
Prj_ShowFormToFilterByDpt ((struct Prj_Projects *) Projects);
|
||||
/***** Roles in project *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Roles);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByRoleInPrj ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Assignation to students *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Assignation);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByAssignation ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Hidden/visible projects *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Visibility);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByHidden ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Faultiness *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Faultiness);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByFaultiness ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Review status *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Review);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByReview ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Department *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
Frm_LabelColumn ("Frm_C1 RT","",Txt_Department);
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||
Prj_ShowFormToFilterByDpt ((struct Prj_Projects *) Projects);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/* End fieldset */
|
||||
HTM_FIELDSET_End ();
|
||||
|
@ -670,7 +733,6 @@ static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects)
|
|||
1 << Usr_WHO_SELECTED |
|
||||
1 << Usr_WHO_ALL;
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (Who = (Usr_Who_t) 1;
|
||||
Who <= (Usr_Who_t) (Usr_NUM_WHO - 1);
|
||||
Who++)
|
||||
|
@ -696,7 +758,6 @@ static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects)
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -709,7 +770,6 @@ static void Prj_ShowFormToFilterByRoleInPrj (const struct Prj_Projects *Projects
|
|||
struct Prj_Filter Filter;
|
||||
Prj_RoleInProject_t RoleInPrj;
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (RoleInPrj = (Prj_RoleInProject_t) 0;
|
||||
RoleInPrj <= (Prj_RoleInProject_t) (Prj_NUM_ROLES_IN_PROJECT - 1);
|
||||
RoleInPrj++)
|
||||
|
@ -729,24 +789,22 @@ static void Prj_ShowFormToFilterByRoleInPrj (const struct Prj_Projects *Projects
|
|||
-1L,
|
||||
Usr_USE_LIST_SELECTED_USERS);
|
||||
Ico_PutSettingIconLink (RoleIcon[RoleInPrj],Ico_BLACK,
|
||||
Txt_PROJECT_ROLES_SINGUL_Abc[RoleInPrj]);
|
||||
Txt_PROJECT_ROLES_SINGUL_Abc[RoleInPrj]);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Show form to select assigned / non-assigned projects ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects)
|
||||
static void Prj_ShowFormToFilterByAssignation (const struct Prj_Projects *Projects)
|
||||
{
|
||||
extern const char *Txt_PROJECT_NONASSIGNED_ASSIGNED_PLURAL[Prj_NUM_ASSIGNED];
|
||||
struct Prj_Filter Filter;
|
||||
Prj_Assigned_t Assign;
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (Assign = (Prj_Assigned_t) 0;
|
||||
Assign <= (Prj_Assigned_t) (Prj_NUM_ASSIGNED - 1);
|
||||
Assign++)
|
||||
|
@ -770,7 +828,6 @@ static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects)
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -792,7 +849,6 @@ static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects)
|
|||
[HidVis_VISIBLE] = {"eye.svg" ,Ico_GREEN},
|
||||
};
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (HidVis = (HidVis_HiddenOrVisible_t) 0;
|
||||
HidVis <= (HidVis_HiddenOrVisible_t) (HidVis_NUM_HIDDEN_VISIBLE - 1);
|
||||
HidVis++)
|
||||
|
@ -817,14 +873,13 @@ static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects)
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Show form to select faulty/faultless projects ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects)
|
||||
static void Prj_ShowFormToFilterByFaultiness (const struct Prj_Projects *Projects)
|
||||
{
|
||||
extern const char *Txt_PROJECT_FAULTY_FAULTLESS_PROJECTS[Prj_NUM_FAULTINESS];
|
||||
struct Prj_Filter Filter;
|
||||
|
@ -839,7 +894,6 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects)
|
|||
[Prj_FAULTLESS] = {"check-circle.svg" ,Ico_GREEN },
|
||||
};
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (Faultiness = (Prj_Faultiness_t) 0;
|
||||
Faultiness <= (Prj_Faultiness_t) (Prj_NUM_FAULTINESS - 1);
|
||||
Faultiness++)
|
||||
|
@ -864,7 +918,6 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects)
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -877,7 +930,6 @@ static void Prj_ShowFormToFilterByReview (const struct Prj_Projects *Projects)
|
|||
struct Prj_Filter Filter;
|
||||
Prj_ReviewStatus_t ReviewStatus;
|
||||
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (ReviewStatus = (Prj_ReviewStatus_t) 0;
|
||||
ReviewStatus <= (Prj_ReviewStatus_t) (Prj_NUM_REVIEW_STATUS - 1);
|
||||
ReviewStatus++)
|
||||
|
@ -902,7 +954,6 @@ static void Prj_ShowFormToFilterByReview (const struct Prj_Projects *Projects)
|
|||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -916,37 +967,34 @@ static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects)
|
|||
char *SelectClass;
|
||||
|
||||
/***** Begin form *****/
|
||||
HTM_DIV_Begin (NULL);
|
||||
Frm_BeginForm (ActSeeAllPrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.RolPrj = Projects->Filter.RolPrj;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.Review = Projects->Filter.Review;
|
||||
Filter.DptCod = Prj_FILTER_DPT_DEFAULT; // Do not put department parameter here
|
||||
Prj_PutPars (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L,
|
||||
Usr_USE_LIST_SELECTED_USERS);
|
||||
Frm_BeginForm (ActSeeAllPrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.RolPrj = Projects->Filter.RolPrj;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.Review = Projects->Filter.Review;
|
||||
Filter.DptCod = Prj_FILTER_DPT_DEFAULT; // Do not put department parameter here
|
||||
Prj_PutPars (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L,
|
||||
Usr_USE_LIST_SELECTED_USERS);
|
||||
|
||||
/***** Write selector with departments *****/
|
||||
if (asprintf (&SelectClass,"Frm_C2_INPUT INPUT_%s",
|
||||
The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Node[Hie_INS].HieCod, // Departments in current institution
|
||||
Projects->Filter.DptCod, // Selected department
|
||||
Prj_PAR_FILTER_DPT_COD_NAME, // Parameter name
|
||||
SelectClass, // Selector class
|
||||
-1L, // First option
|
||||
Txt_Any_department, // Text when no department selected
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
free (SelectClass);
|
||||
/***** Write selector with departments *****/
|
||||
if (asprintf (&SelectClass,"Frm_C2_INPUT INPUT_%s",The_GetSuffix ()) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Node[Hie_INS].HieCod, // Departments in current institution
|
||||
Projects->Filter.DptCod, // Selected department
|
||||
Prj_PAR_FILTER_DPT_COD_NAME, // Parameter name
|
||||
SelectClass, // Selector class
|
||||
-1L, // First option
|
||||
Txt_Any_department, // Text when no department selected
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
free (SelectClass);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1169,24 +1217,13 @@ static unsigned Prj_GetParAssign (void)
|
|||
|
||||
static unsigned Prj_GetParHidden (void)
|
||||
{
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_STD: // Students can view only visible projects
|
||||
return (unsigned) (1 << HidVis_VISIBLE); // Only visible projects
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
return (unsigned)
|
||||
Par_GetParUnsignedLong (Prj_PAR_FILTER_HID_VIS_NAME,
|
||||
0,
|
||||
(1 << HidVis_HIDDEN) |
|
||||
(1 << HidVis_VISIBLE),
|
||||
(unsigned) Prj_FILTER_HIDDEN_DEFAULT |
|
||||
(unsigned) Prj_FILTER_VISIBL_DEFAULT);
|
||||
default:
|
||||
Err_WrongRoleExit ();
|
||||
return Prj_NEW_PRJ_HIDDEN_VISIBL_DEFAULT; // Not reached
|
||||
}
|
||||
return (unsigned)
|
||||
Par_GetParUnsignedLong (Prj_PAR_FILTER_HID_VIS_NAME,
|
||||
0,
|
||||
(1 << HidVis_HIDDEN) |
|
||||
(1 << HidVis_VISIBLE),
|
||||
(unsigned) Prj_FILTER_HIDDEN_DEFAULT |
|
||||
(unsigned) Prj_FILTER_VISIBL_DEFAULT);
|
||||
}
|
||||
|
||||
static unsigned Prj_GetParFaulti (void)
|
||||
|
|
|
@ -519,27 +519,6 @@ unsigned Prj_DB_GetListProjects (MYSQL_RES **mysql_res,
|
|||
case Prj_ORDER_START_TIME:
|
||||
case Prj_ORDER_END_TIME:
|
||||
case Prj_ORDER_TITLE:
|
||||
|
||||
Ale_ShowAlert (Ale_INFO,
|
||||
"SELECT prj_projects.PrjCod"
|
||||
" FROM prj_projects LEFT JOIN prj_users"
|
||||
" ON prj_projects.PrjCod=prj_users.PrjCod"
|
||||
" WHERE prj_projects.CrsCod=%ld"
|
||||
"%s"
|
||||
"%s"
|
||||
"%s"
|
||||
"%s"
|
||||
"%s"
|
||||
" ORDER BY %s",
|
||||
Gbl.Hierarchy.Node[Hie_CRS].HieCod,
|
||||
AssignSubQuery,
|
||||
HidVisSubQuery,
|
||||
ReviewSubQuery,
|
||||
DptCodSubQuery,
|
||||
RolPrjSubQuery[Projects->Filter.RolPrj],
|
||||
OrderBySubQuery[Projects->SelectedOrder]);
|
||||
|
||||
|
||||
NumPrjsFromDB = (unsigned)
|
||||
DB_QuerySELECT (mysql_res,"can not get projects",
|
||||
"SELECT prj_projects.PrjCod"
|
||||
|
|
100
swad_text.c
100
swad_text.c
|
@ -2804,6 +2804,29 @@ const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME] =
|
|||
#endif
|
||||
};
|
||||
|
||||
const char *Txt_Assignation = // Project assigned/non-assigned to students
|
||||
#if L==1 // ca
|
||||
"Assignació";
|
||||
#elif L==2 // de
|
||||
"Zuweisung";
|
||||
#elif L==3 // en
|
||||
"Assignation";
|
||||
#elif L==4 // es
|
||||
"Asignación";
|
||||
#elif L==5 // fr
|
||||
"Assignation";
|
||||
#elif L==6 // gn
|
||||
"Assignación"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Assegnazione";
|
||||
#elif L==8 // pl
|
||||
"Ustalenie";
|
||||
#elif L==9 // pt
|
||||
"Atribuiçã,o";
|
||||
#elif L==10 // tr
|
||||
"Atama";
|
||||
#endif
|
||||
|
||||
const char *Txt_Assignments_area =
|
||||
#if L==1 // ca
|
||||
"Zona d'activitats";
|
||||
|
@ -12445,6 +12468,29 @@ const char *Txt_Failed_email_confirmation_key =
|
|||
"Failed email confirmation key."; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Faultiness = // In projects
|
||||
#if L==1 // ca
|
||||
"Defectuositat";
|
||||
#elif L==2 // de
|
||||
"Mangelhaftigkeit";
|
||||
#elif L==3 // en
|
||||
"Faultiness";
|
||||
#elif L==4 // es
|
||||
"Defectuosos";
|
||||
#elif L==5 // fr
|
||||
"Défectueux";
|
||||
#elif L==6 // gn
|
||||
"Defectuosos"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Difettosi";
|
||||
#elif L==8 // pl
|
||||
"Wadliwość";
|
||||
#elif L==9 // pt
|
||||
"Defeituosos";
|
||||
#elif L==10 // tr
|
||||
"Kusurlu";
|
||||
#endif
|
||||
|
||||
const char *Txt_Feedback =
|
||||
#if L==1 // ca
|
||||
"Realimentació";
|
||||
|
@ -34775,7 +34821,7 @@ const char *Txt_Review =
|
|||
#elif L==5 // fr
|
||||
"Examen";
|
||||
#elif L==6 // gn
|
||||
"Revisión"; // Okoteve traducción
|
||||
"Hechajey";
|
||||
#elif L==7 // it
|
||||
"Revisione";
|
||||
#elif L==8 // pl
|
||||
|
@ -34798,7 +34844,7 @@ const char *Txt_Role =
|
|||
#elif L==5 // fr
|
||||
"Rôle";
|
||||
#elif L==6 // gn
|
||||
"Rol"; // Okoteve traducción
|
||||
"Kuatia";
|
||||
#elif L==7 // it
|
||||
"Ruolo";
|
||||
#elif L==8 // pl
|
||||
|
@ -34806,7 +34852,30 @@ const char *Txt_Role =
|
|||
#elif L==9 // pt
|
||||
"Papel";
|
||||
#elif L==10 // tr
|
||||
"Role"; // Çeviri lazim!
|
||||
"Rol";
|
||||
#endif
|
||||
|
||||
const char *Txt_Roles =
|
||||
#if L==1 // ca
|
||||
"Rols";
|
||||
#elif L==2 // de
|
||||
"Rollen";
|
||||
#elif L==3 // en
|
||||
"Roles";
|
||||
#elif L==4 // es
|
||||
"Roles";
|
||||
#elif L==5 // fr
|
||||
"Rôles";
|
||||
#elif L==6 // gn
|
||||
"Kuatia";
|
||||
#elif L==7 // it
|
||||
"Ruoli";
|
||||
#elif L==8 // pl
|
||||
"Role";
|
||||
#elif L==9 // pt
|
||||
"Papéis";
|
||||
#elif L==10 // tr
|
||||
"Roller";
|
||||
#endif
|
||||
|
||||
const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
|
||||
|
@ -56841,6 +56910,29 @@ const char *Txt_View_homework =
|
|||
"View homework"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Visibility =
|
||||
#if L==1 // ca
|
||||
"Visibilitat";
|
||||
#elif L==2 // de
|
||||
"Sichtweite";
|
||||
#elif L==3 // en
|
||||
"Visibility";
|
||||
#elif L==4 // es
|
||||
"Visibilidad";
|
||||
#elif L==5 // fr
|
||||
"Visibilité";
|
||||
#elif L==6 // gn
|
||||
"Visibilidad"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Visibilità";
|
||||
#elif L==8 // pl
|
||||
"Widoczność";
|
||||
#elif L==9 // pt
|
||||
"Visibilidade";
|
||||
#elif L==10 // tr
|
||||
"Görünürlüğük";
|
||||
#endif
|
||||
|
||||
const char *Txt_Visible =
|
||||
#if L==1 // ca
|
||||
"Visible";
|
||||
|
@ -56853,7 +56945,7 @@ const char *Txt_Visible =
|
|||
#elif L==5 // fr
|
||||
"Visible";
|
||||
#elif L==6 // gn
|
||||
"Visible"; // Okoteve traducción
|
||||
"Ojehecha";
|
||||
#elif L==7 // it
|
||||
"Visibile";
|
||||
#elif L==8 // pl
|
||||
|
|
58
swad_user.c
58
swad_user.c
|
@ -3579,44 +3579,44 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction,
|
|||
const char *OnSubmit)
|
||||
{
|
||||
Set_BeginSettingsHead ();
|
||||
Set_BeginOneSettingSelector ();
|
||||
Set_BeginOneSettingSelector ();
|
||||
|
||||
/***** Select Set_USR_LIST_AS_CLASS_PHOTO *****/
|
||||
Set_BeginPref (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
/***** Select Set_USR_LIST_AS_CLASS_PHOTO *****/
|
||||
Set_BeginPref (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
|
||||
Set_FormToSelectUsrListType (NextAction,FuncPars,Args,OnSubmit,
|
||||
Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
Set_FormToSelectUsrListType (NextAction,FuncPars,Args,OnSubmit,
|
||||
Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
|
||||
/* Number of columns in the class photo */
|
||||
Frm_BeginFormAnchor (NextAction,Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParsCodGrps ();
|
||||
Set_PutParUsrListType (Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
Set_PutParListWithPhotos ();
|
||||
Usr_PutSelectorNumColsClassPhoto ();
|
||||
if (FuncPars)
|
||||
FuncPars (Args);
|
||||
Frm_EndForm ();
|
||||
/* Number of columns in the class photo */
|
||||
Frm_BeginFormAnchor (NextAction,Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParsCodGrps ();
|
||||
Set_PutParUsrListType (Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
Set_PutParListWithPhotos ();
|
||||
Usr_PutSelectorNumColsClassPhoto ();
|
||||
if (FuncPars)
|
||||
FuncPars (Args);
|
||||
Frm_EndForm ();
|
||||
|
||||
Set_EndPref ();
|
||||
Set_EndPref ();
|
||||
|
||||
/***** Select Usr_LIST_AS_LISTING *****/
|
||||
Set_BeginPref (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_LISTING);
|
||||
/***** Select Usr_LIST_AS_LISTING *****/
|
||||
Set_BeginPref (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_LISTING);
|
||||
|
||||
Set_FormToSelectUsrListType (NextAction,FuncPars,Args,OnSubmit,
|
||||
Set_USR_LIST_AS_LISTING);
|
||||
Set_FormToSelectUsrListType (NextAction,FuncPars,Args,OnSubmit,
|
||||
Set_USR_LIST_AS_LISTING);
|
||||
|
||||
/* See the photos in list? */
|
||||
Frm_BeginFormAnchor (NextAction,Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParsCodGrps ();
|
||||
Set_PutParUsrListType (Set_USR_LIST_AS_LISTING);
|
||||
if (FuncPars)
|
||||
FuncPars (Args);
|
||||
Usr_PutCheckboxListWithPhotos ();
|
||||
Frm_EndForm ();
|
||||
/* See the photos in list? */
|
||||
Frm_BeginFormAnchor (NextAction,Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParsCodGrps ();
|
||||
Set_PutParUsrListType (Set_USR_LIST_AS_LISTING);
|
||||
if (FuncPars)
|
||||
FuncPars (Args);
|
||||
Usr_PutCheckboxListWithPhotos ();
|
||||
Frm_EndForm ();
|
||||
|
||||
Set_EndPref ();
|
||||
Set_EndPref ();
|
||||
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user