Version 20.94.9: Jun 29, 2021 Query moved from module swad_menu to module swad_setting.

This commit is contained in:
acanas 2021-06-29 11:17:34 +02:00
parent a07743090f
commit 06f41515fd
4 changed files with 83 additions and 63 deletions

View File

@ -602,14 +602,15 @@ TODO: FIX BUG, URGENT! En las fechas como par
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.94.8 (2021-06-28)" #define Log_PLATFORM_VERSION "SWAD 20.94.9 (2021-06-28)"
#define CSS_FILE "swad20.45.css" #define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.69.1.js" #define JS_FILE "swad20.69.1.js"
/* /*
TODO: Rename CENTRE to CENTER in help wiki. TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.94.8: Jun 29, 2021 Queries moved to module swad_group_database. (? lines) Version 20.94.9: Jun 29, 2021 Query moved from module swad_menu to module swad_setting. (313848 lines)
Version 20.94.8: Jun 29, 2021 Queries moved to module swad_group_database. (313834 lines)
Version 20.94.7: Jun 28, 2021 Queries moved to module swad_group_database. (313782 lines) Version 20.94.7: Jun 28, 2021 Queries moved to module swad_group_database. (313782 lines)
Version 20.94.6: Jun 28, 2021 Fixed bug in removal of project. (313688 lines) Version 20.94.6: Jun 28, 2021 Fixed bug in removal of project. (313688 lines)
Version 20.94.5: Jun 25, 2021 Queries moved to module swad_group_database. (313686 lines) Version 20.94.5: Jun 25, 2021 Queries moved to module swad_group_database. (313686 lines)

View File

@ -215,8 +215,10 @@ void Mnu_WriteMenuThisTab (void)
const char *Title; const char *Title;
bool IsTheSelectedAction; bool IsTheSelectedAction;
/***** Menu start *****/ /***** Begin container *****/
HTM_Txt ("<nav class=\"MENU_LIST_CONT\">"); HTM_Txt ("<nav class=\"MENU_LIST_CONT\">");
/***** Begin option list *****/
HTM_UL_Begin ("class=\"MENU_LIST\""); HTM_UL_Begin ("class=\"MENU_LIST\"");
/***** Loop to write all options in menu. Each row holds an option *****/ /***** Loop to write all options in menu. Each row holds an option *****/
@ -233,11 +235,13 @@ void Mnu_WriteMenuThisTab (void)
Title = Act_GetSubtitleAction (NumAct); Title = Act_GetSubtitleAction (NumAct);
/***** Start element *****/ /***** Begin option *****/
HTM_LI_Begin ("class=\"MENU_LIST_ITEM\""); HTM_LI_Begin ("class=\"MENU_LIST_ITEM\"");
/***** Begin form and link *****/ /***** Begin form *****/
Frm_BeginForm (NumAct); Frm_BeginForm (NumAct);
/***** Begin link *****/
HTM_BUTTON_SUBMIT_Begin (Title, HTM_BUTTON_SUBMIT_Begin (Title,
IsTheSelectedAction ? "BT_LINK MENU_OPT_ON" : IsTheSelectedAction ? "BT_LINK MENU_OPT_ON" :
"BT_LINK MENU_OPT_OFF", "BT_LINK MENU_OPT_OFF",
@ -247,22 +251,27 @@ void Mnu_WriteMenuThisTab (void)
HTM_DIV_Begin ("class=\"MENU_ICO\" style=\"background-image:url('%s/%s');\"", HTM_DIV_Begin ("class=\"MENU_ICO\" style=\"background-image:url('%s/%s');\"",
Gbl.Prefs.URLIconSet, Gbl.Prefs.URLIconSet,
Act_GetIcon (NumAct)); Act_GetIcon (NumAct));
HTM_DIV_Begin ("class=\"MENU_TEXT %s\"",The_ClassTxtMenu[Gbl.Prefs.Theme]); HTM_DIV_Begin ("class=\"MENU_TEXT %s\"",
The_ClassTxtMenu[Gbl.Prefs.Theme]);
HTM_Txt (Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]); HTM_Txt (Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
HTM_DIV_End (); HTM_DIV_End ();
HTM_DIV_End (); HTM_DIV_End ();
/***** End link and form *****/ /***** End link *****/
HTM_BUTTON_End (); HTM_BUTTON_End ();
/***** End form *****/
Frm_EndForm (); Frm_EndForm ();
/***** End element *****/ /***** End option *****/
HTM_LI_End (); HTM_LI_End ();
} }
} }
/***** Menu end *****/ /***** End option list *****/
HTM_UL_End (); HTM_UL_End ();
/***** End container *****/
HTM_Txt ("</nav>"); HTM_Txt ("</nav>");
} }
@ -320,12 +329,7 @@ void Mnu_ChangeMenu (void)
/***** Store menu in database *****/ /***** Store menu in database *****/
if (Gbl.Usrs.Me.Logged) if (Gbl.Usrs.Me.Logged)
DB_QueryUPDATE ("can not update your setting about menu", Set_DB_ChangeMenu (Gbl.Prefs.Menu);
"UPDATE usr_data"
" SET Menu=%u"
" WHERE UsrCod=%ld",
(unsigned) Gbl.Prefs.Menu,
Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Set settings from current IP *****/ /***** Set settings from current IP *****/
Set_SetSettingsFromIP (); Set_SetSettingsFromIP ();

View File

@ -367,6 +367,20 @@ void Set_DB_ChangeFirstDayOfWeek (unsigned FirstDayOfWeek)
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
} }
/*****************************************************************************/
/***************** Update my settings about first day of week ****************/
/*****************************************************************************/
void Set_DB_ChangeMenu (Mnu_Menu_t Menu)
{
DB_QueryUPDATE ("can not update your setting about menu",
"UPDATE usr_data"
" SET Menu=%u"
" WHERE UsrCod=%ld",
(unsigned) Menu,
Gbl.Usrs.Me.UsrDat.UsrCod);
}
/*****************************************************************************/ /*****************************************************************************/
/*********** Head to select one or several settings using icons **************/ /*********** Head to select one or several settings using icons **************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -52,6 +52,7 @@ unsigned Set_GetParamSideCols (void);
void Set_DB_UpdateMySettingsAboutDateFormat (Dat_Format_t DateFormat); void Set_DB_UpdateMySettingsAboutDateFormat (Dat_Format_t DateFormat);
void Set_DB_ChangeFirstDayOfWeek (unsigned FirstDayOfWeek); void Set_DB_ChangeFirstDayOfWeek (unsigned FirstDayOfWeek);
void Set_DB_ChangeMenu (Mnu_Menu_t Menu);
void Set_BeginSettingsHead (void); void Set_BeginSettingsHead (void);
void Set_EndSettingsHead (void); void Set_EndSettingsHead (void);