mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-13 04:04:35 +02:00
Version19.54.4
This commit is contained in:
parent
3888810401
commit
8620baa373
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.54.3 (2019-11-06)"
|
#define Log_PLATFORM_VERSION "SWAD 19.54.4 (2019-11-06)"
|
||||||
#define CSS_FILE "swad19.47.css"
|
#define CSS_FILE "swad19.47.css"
|
||||||
#define JS_FILE "swad19.39.js"
|
#define JS_FILE "swad19.39.js"
|
||||||
/*
|
/*
|
||||||
|
@ -498,6 +498,7 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
||||||
|
|
||||||
|
Version 19.54.4: Nov 05, 2019 Code refactoring in HTML select options. (246023 lines)
|
||||||
Version 19.54.3: Nov 05, 2019 Code refactoring in HTML select options. (246050 lines)
|
Version 19.54.3: Nov 05, 2019 Code refactoring in HTML select options. (246050 lines)
|
||||||
Version 19.54.2: Nov 06, 2019 Fixed bug in dates form. (246055 lines)
|
Version 19.54.2: Nov 06, 2019 Fixed bug in dates form. (246055 lines)
|
||||||
Version 19.54.1: Nov 05, 2019 Fixed bug in assignments, reported by Eva Martínez Ortigosa. (246054 lines)
|
Version 19.54.1: Nov 05, 2019 Fixed bug in assignments, reported by Eva Martínez Ortigosa. (246054 lines)
|
||||||
|
|
|
@ -1234,11 +1234,8 @@ void Cty_WriteSelectorOfCountry (void)
|
||||||
Frm_StartFormGoTo (ActSeeIns);
|
Frm_StartFormGoTo (ActSeeIns);
|
||||||
HTM_SELECT_Begin (true,
|
HTM_SELECT_Begin (true,
|
||||||
"id=\"cty\" name=\"cty\" class=\"HIE_SEL\"");
|
"id=\"cty\" name=\"cty\" class=\"HIE_SEL\"");
|
||||||
fprintf (Gbl.F.Out,"<option value=\"\"");
|
HTM_OPTION (HTM_Type_STRING,(void *) "",Gbl.Hierarchy.Cty.CtyCod < 0,true,
|
||||||
if (Gbl.Hierarchy.Cty.CtyCod < 0)
|
"[%s]",Txt_Country);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
|
|
||||||
Txt_Country);
|
|
||||||
|
|
||||||
/***** Get countries from database *****/
|
/***** Get countries from database *****/
|
||||||
NumCtys = (unsigned) DB_QuerySELECT (&mysql_res,"can not get countries",
|
NumCtys = (unsigned) DB_QuerySELECT (&mysql_res,"can not get countries",
|
||||||
|
@ -1261,10 +1258,9 @@ void Cty_WriteSelectorOfCountry (void)
|
||||||
Lay_ShowErrorAndExit ("Wrong code of country.");
|
Lay_ShowErrorAndExit ("Wrong code of country.");
|
||||||
|
|
||||||
/* Write option */
|
/* Write option */
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",CtyCod);
|
HTM_OPTION (HTM_Type_LONG,(void *) &CtyCod,
|
||||||
if (CtyCod == Gbl.Hierarchy.Cty.CtyCod)
|
CtyCod == Gbl.Hierarchy.Cty.CtyCod,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"%s",row[1]);
|
||||||
fprintf (Gbl.F.Out,">%s</option>",row[1]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
|
|
@ -259,11 +259,9 @@ static void Crs_Configuration (bool PrintView)
|
||||||
for (NumDeg = 0;
|
for (NumDeg = 0;
|
||||||
NumDeg < Gbl.Hierarchy.Ctr.Degs.Num;
|
NumDeg < Gbl.Hierarchy.Ctr.Degs.Num;
|
||||||
NumDeg++)
|
NumDeg++)
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s</option>",
|
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod,
|
||||||
Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod,
|
Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod == Gbl.Hierarchy.Deg.DegCod,false,
|
||||||
Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].DegCod == Gbl.Hierarchy.Deg.DegCod ? " selected=\"selected\"" :
|
"%s",Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].ShrtName);
|
||||||
"",
|
|
||||||
Gbl.Hierarchy.Ctr.Degs.Lst[NumDeg].ShrtName);
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
|
@ -348,11 +346,9 @@ static void Crs_Configuration (bool PrintView)
|
||||||
for (Year = 0;
|
for (Year = 0;
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
Year++)
|
Year++)
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"%s>%s</option>",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Year,
|
||||||
Year,
|
Year == Gbl.Hierarchy.Crs.Year,false,
|
||||||
Year == Gbl.Hierarchy.Crs.Year ? " selected=\"selected\"" :
|
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||||
"",
|
|
||||||
Txt_YEAR_OF_DEGREE[Year]);
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -891,11 +887,8 @@ void Crs_WriteSelectorOfCourse (void)
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
"id=\"crs\" name=\"crs\" class=\"HIE_SEL\""
|
"id=\"crs\" name=\"crs\" class=\"HIE_SEL\""
|
||||||
" disabled=\"disabled\"");
|
" disabled=\"disabled\"");
|
||||||
fprintf (Gbl.F.Out,"<option value=\"\"");
|
HTM_OPTION (HTM_Type_STRING,(void *) "",Gbl.Hierarchy.Crs.CrsCod < 0,true,
|
||||||
if (Gbl.Hierarchy.Crs.CrsCod < 0)
|
"[%s]",Txt_Course);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
|
|
||||||
Txt_Course);
|
|
||||||
|
|
||||||
if (Gbl.Hierarchy.Deg.DegCod > 0)
|
if (Gbl.Hierarchy.Deg.DegCod > 0)
|
||||||
{
|
{
|
||||||
|
@ -920,11 +913,10 @@ void Crs_WriteSelectorOfCourse (void)
|
||||||
Lay_ShowErrorAndExit ("Wrong course.");
|
Lay_ShowErrorAndExit ("Wrong course.");
|
||||||
|
|
||||||
/* Write option */
|
/* Write option */
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",CrsCod);
|
HTM_OPTION (HTM_Type_LONG,(void *) &CrsCod,
|
||||||
if (Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
||||||
(CrsCod == Gbl.Hierarchy.Crs.CrsCod))
|
CrsCod == Gbl.Hierarchy.Crs.CrsCod,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"%s",row[1]);
|
||||||
fprintf (Gbl.F.Out,">%s</option>",row[1]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
@ -1062,11 +1054,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
||||||
|
|
||||||
/***** Write an option when no course selected *****/
|
/***** Write an option when no course selected *****/
|
||||||
if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected
|
if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected
|
||||||
fprintf (Gbl.F.Out,"<option value=\"-1\""
|
HTM_OPTION (HTM_Type_STRING,(void *) "-1",true,true,
|
||||||
" disabled=\"disabled\" selected=\"selected\">"
|
"%s",Txt_Course);
|
||||||
"%s"
|
|
||||||
"</option>",
|
|
||||||
Txt_Course);
|
|
||||||
|
|
||||||
if (Gbl.Usrs.Me.MyCrss.Num)
|
if (Gbl.Usrs.Me.MyCrss.Num)
|
||||||
{
|
{
|
||||||
|
@ -1088,11 +1077,9 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
||||||
LastDegCod = DegCod;
|
LastDegCod = DegCod;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",
|
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod,
|
||||||
Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod);
|
CrsCod == Gbl.Hierarchy.Crs.CrsCod,false, // Course selected
|
||||||
if (CrsCod == Gbl.Hierarchy.Crs.CrsCod) // Course selected
|
"%s",CrsShortName);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",CrsShortName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LastDegCod > 0)
|
if (LastDegCod > 0)
|
||||||
|
@ -1103,12 +1090,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
||||||
when I don't belong to it *****/
|
when I don't belong to it *****/
|
||||||
if (Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
if (Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
||||||
!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to it
|
!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to it
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\""
|
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Hierarchy.Crs.CrsCod,true,true,
|
||||||
" disabled=\"disabled\" selected=\"selected\">"
|
"%s",Gbl.Hierarchy.Crs.ShrtName);
|
||||||
"%s"
|
|
||||||
"</option>",
|
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
|
||||||
Gbl.Hierarchy.Crs.ShrtName);
|
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
@ -1424,6 +1407,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
Crs_StatusTxt_t StatusTxt;
|
Crs_StatusTxt_t StatusTxt;
|
||||||
|
unsigned Status;
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -1485,11 +1469,9 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
for (YearAux = 0;
|
for (YearAux = 0;
|
||||||
YearAux <= Deg_MAX_YEARS_PER_DEGREE;
|
YearAux <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years)
|
YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years)
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"%s>%s</option>",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &YearAux,
|
||||||
YearAux,
|
YearAux == Crs->Year,false,
|
||||||
YearAux == Crs->Year ? " selected=\"selected\"" :
|
"%s",Txt_YEAR_OF_DEGREE[YearAux]);
|
||||||
"",
|
|
||||||
Txt_YEAR_OF_DEGREE[YearAux]);
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1553,12 +1535,15 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||||
HTM_SELECT_Begin (true,
|
HTM_SELECT_Begin (true,
|
||||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
|
|
||||||
"<option value=\"%u\">%s</option>",
|
Status = (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING);
|
||||||
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING),
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Status,true,false,
|
||||||
Txt_COURSE_STATUS[Crs_STATUS_PENDING],
|
"%s",Txt_COURSE_STATUS[Crs_STATUS_PENDING]);
|
||||||
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE),
|
|
||||||
Txt_COURSE_STATUS[Crs_STATUS_ACTIVE]);
|
Status = (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE);
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Status,false,false,
|
||||||
|
"%s",Txt_COURSE_STATUS[Crs_STATUS_ACTIVE]);
|
||||||
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1677,11 +1662,9 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
for (Year = 0;
|
for (Year = 0;
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
Year++)
|
Year++)
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"%s>%s</option>",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Year,
|
||||||
Year,
|
Year == Crs_EditingCrs->Year,false,
|
||||||
Year == Crs_EditingCrs->Year ? " selected=\"selected\"" :
|
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||||
"",
|
|
||||||
Txt_YEAR_OF_DEGREE[Year]);
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -3292,12 +3275,9 @@ void Crs_AskRemoveOldCrss (void)
|
||||||
for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
||||||
i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
||||||
i++)
|
i++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &i,
|
||||||
fprintf (Gbl.F.Out,"<option");
|
i == MonthsWithoutAccess,false,
|
||||||
if (i == MonthsWithoutAccess)
|
"%u",i);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%u</option>",i);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
fprintf (Gbl.F.Out," ");
|
fprintf (Gbl.F.Out," ");
|
||||||
fprintf (Gbl.F.Out,Txt_Eliminate_all_courses_whithout_users_PART_2_OF_2,
|
fprintf (Gbl.F.Out,Txt_Eliminate_all_courses_whithout_users_PART_2_OF_2,
|
||||||
|
|
|
@ -114,6 +114,7 @@ void Lan_PutSelectorToSelectLanguage (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
||||||
Lan_Language_t Lan;
|
Lan_Language_t Lan;
|
||||||
|
unsigned LanUnsigned;
|
||||||
|
|
||||||
Frm_StartForm (ActReqChgLan);
|
Frm_StartForm (ActReqChgLan);
|
||||||
HTM_SELECT_Begin (true,
|
HTM_SELECT_Begin (true,
|
||||||
|
@ -122,10 +123,10 @@ void Lan_PutSelectorToSelectLanguage (void)
|
||||||
Lan <= Lan_NUM_LANGUAGES;
|
Lan <= Lan_NUM_LANGUAGES;
|
||||||
Lan++)
|
Lan++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) Lan);
|
LanUnsigned = (unsigned) Lan;
|
||||||
if (Lan == Gbl.Prefs.Language)
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &LanUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
Lan == Gbl.Prefs.Language,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_STR_LANG_NAME[Lan]);
|
"%s",Txt_STR_LANG_NAME[Lan]);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -2618,21 +2618,17 @@ void Msg_ShowFormSelectCourseSentOrRecMsgs (void)
|
||||||
fprintf (Gbl.F.Out,"%s ",TxtSelector[Gbl.Msg.TypeOfMessages]);
|
fprintf (Gbl.F.Out,"%s ",TxtSelector[Gbl.Msg.TypeOfMessages]);
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
"name=\"FilterCrsCod\"");
|
"name=\"FilterCrsCod\"");
|
||||||
fprintf (Gbl.F.Out,"<option value=\"\"");
|
HTM_OPTION (HTM_Type_STRING,(void *) "",
|
||||||
if (Gbl.Msg.FilterCrsCod < 0)
|
Gbl.Msg.FilterCrsCod < 0,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"%s",Txt_any_course);
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_any_course);
|
|
||||||
|
|
||||||
/***** Write an option for each user's course *****/
|
/***** Write an option for each origin course *****/
|
||||||
for (NumOriginCrs = 0;
|
for (NumOriginCrs = 0;
|
||||||
NumOriginCrs < Gbl.Msg.NumCourses;
|
NumOriginCrs < Gbl.Msg.NumCourses;
|
||||||
NumOriginCrs++)
|
NumOriginCrs++)
|
||||||
{
|
HTM_OPTION (HTM_Type_LONG,(void *) &Gbl.Msg.Courses[NumOriginCrs].CrsCod,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",Gbl.Msg.Courses[NumOriginCrs].CrsCod);
|
Gbl.Msg.Courses[NumOriginCrs].CrsCod == Gbl.Msg.FilterCrsCod,false,
|
||||||
if (Gbl.Msg.Courses[NumOriginCrs].CrsCod == Gbl.Msg.FilterCrsCod)
|
"%s",Gbl.Msg.Courses[NumOriginCrs].ShrtName);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\""); // Select origin course
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Gbl.Msg.Courses[NumOriginCrs].ShrtName);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3343,17 +3343,10 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
"name=\"Assigned\"");
|
"name=\"Assigned\"");
|
||||||
|
HTM_OPTION (HTM_Type_STRING,(void *) "Y",Prj->Assigned == Prj_ASSIGNED,false,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"Y\"");
|
"%s",Txt_Yes);
|
||||||
if (Prj->Assigned == Prj_ASSIGNED)
|
HTM_OPTION (HTM_Type_STRING,(void *) "N",Prj->Assigned == Prj_NONASSIG,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"%s",Txt_No);
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Yes);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"N\"");
|
|
||||||
if (Prj->Assigned == Prj_NONASSIG)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_No);
|
|
||||||
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
|
10
swad_role.c
10
swad_role.c
|
@ -471,6 +471,7 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect)
|
||||||
{
|
{
|
||||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
Rol_Role_t Role;
|
Rol_Role_t Role;
|
||||||
|
unsigned RoleUnsigned;
|
||||||
bool PutClassSelect;
|
bool PutClassSelect;
|
||||||
|
|
||||||
Frm_StartForm (ActChgMyRol);
|
Frm_StartForm (ActChgMyRol);
|
||||||
|
@ -489,11 +490,10 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect)
|
||||||
Role++)
|
Role++)
|
||||||
if (Gbl.Usrs.Me.Role.Available & (1 << Role))
|
if (Gbl.Usrs.Me.Role.Available & (1 << Role))
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) Role);
|
RoleUnsigned = (unsigned) Role;
|
||||||
if (Role == Gbl.Usrs.Me.Role.Logged)
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &RoleUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
Role == Gbl.Usrs.Me.Role.Logged,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",
|
"%s",Txt_ROLES_SINGUL_Abc[Role][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||||
Txt_ROLES_SINGUL_Abc[Role][Gbl.Usrs.Me.UsrDat.Sex]);
|
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
34
swad_scope.c
34
swad_scope.c
|
@ -72,6 +72,7 @@ void Sco_PutSelectorScope (const char *ParamName,bool SendOnChange)
|
||||||
extern const char *Txt_Degree;
|
extern const char *Txt_Degree;
|
||||||
extern const char *Txt_Course;
|
extern const char *Txt_Course;
|
||||||
Hie_Level_t Scope;
|
Hie_Level_t Scope;
|
||||||
|
unsigned ScopeUnsigned;
|
||||||
bool WriteScope;
|
bool WriteScope;
|
||||||
|
|
||||||
HTM_SELECT_Begin (SendOnChange,
|
HTM_SELECT_Begin (SendOnChange,
|
||||||
|
@ -117,38 +118,48 @@ void Sco_PutSelectorScope (const char *ParamName,bool SendOnChange)
|
||||||
if (WriteScope)
|
if (WriteScope)
|
||||||
{
|
{
|
||||||
/***** Write allowed option *****/
|
/***** Write allowed option *****/
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) Scope);
|
ScopeUnsigned = (unsigned) Scope;
|
||||||
if (Gbl.Scope.Current == Scope)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">");
|
|
||||||
switch (Scope)
|
switch (Scope)
|
||||||
{
|
{
|
||||||
case Hie_SYS:
|
case Hie_SYS:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
Txt_System,Cfg_PLATFORM_SHORT_NAME);
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
|
Txt_System,
|
||||||
|
Cfg_PLATFORM_SHORT_NAME);
|
||||||
break;
|
break;
|
||||||
case Hie_CTY:
|
case Hie_CTY:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
Txt_Country,
|
Txt_Country,
|
||||||
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
||||||
break;
|
break;
|
||||||
case Hie_INS:
|
case Hie_INS:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
Txt_Institution,
|
Txt_Institution,
|
||||||
Gbl.Hierarchy.Ins.ShrtName);
|
Gbl.Hierarchy.Ins.ShrtName);
|
||||||
break;
|
break;
|
||||||
case Hie_CTR:
|
case Hie_CTR:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
Txt_Centre,
|
Txt_Centre,
|
||||||
Gbl.Hierarchy.Ctr.ShrtName);
|
Gbl.Hierarchy.Ctr.ShrtName);
|
||||||
break;
|
break;
|
||||||
case Hie_DEG:
|
case Hie_DEG:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
Txt_Degree,
|
Txt_Degree,
|
||||||
Gbl.Hierarchy.Deg.ShrtName);
|
Gbl.Hierarchy.Deg.ShrtName);
|
||||||
break;
|
break;
|
||||||
case Hie_CRS:
|
case Hie_CRS:
|
||||||
fprintf (Gbl.F.Out,"%s: %s",
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &ScopeUnsigned,
|
||||||
|
Gbl.Scope.Current == Scope,false,
|
||||||
|
"%s: %s",
|
||||||
Txt_Course,
|
Txt_Course,
|
||||||
Gbl.Hierarchy.Crs.ShrtName);
|
Gbl.Hierarchy.Crs.ShrtName);
|
||||||
break;
|
break;
|
||||||
|
@ -156,7 +167,6 @@ void Sco_PutSelectorScope (const char *ParamName,bool SendOnChange)
|
||||||
Lay_WrongScopeExit ();
|
Lay_WrongScopeExit ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</option>");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
|
||||||
Txt_my_documents, // Sch_SEARCH_MY_DOCUMENTS
|
Txt_my_documents, // Sch_SEARCH_MY_DOCUMENTS
|
||||||
};
|
};
|
||||||
Sch_WhatToSearch_t WhatToSearch;
|
Sch_WhatToSearch_t WhatToSearch;
|
||||||
|
unsigned WTS;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
|
@ -171,12 +172,10 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
|
||||||
WhatToSearch++)
|
WhatToSearch++)
|
||||||
if (Sch_CheckIfIHavePermissionToSearch (WhatToSearch))
|
if (Sch_CheckIfIHavePermissionToSearch (WhatToSearch))
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",
|
WTS = (unsigned) WhatToSearch;
|
||||||
(unsigned) WhatToSearch);
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &WTS,
|
||||||
if (Gbl.Search.WhatToSearch == WhatToSearch)
|
Gbl.Search.WhatToSearch == WhatToSearch,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"%s",Titles[WhatToSearch]);
|
||||||
fprintf (Gbl.F.Out,">%s</option>",
|
|
||||||
Titles[WhatToSearch]);
|
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
|
|
@ -8945,12 +8945,9 @@ void Usr_PutSelectorNumColsClassPhoto (void)
|
||||||
for (Cols = 1;
|
for (Cols = 1;
|
||||||
Cols <= Usr_CLASS_PHOTO_COLS_MAX;
|
Cols <= Usr_CLASS_PHOTO_COLS_MAX;
|
||||||
Cols++)
|
Cols++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,(void *) &Cols,
|
||||||
fprintf (Gbl.F.Out,"<option");
|
Cols == Gbl.Usrs.ClassPhoto.Cols,false,
|
||||||
if (Cols == Gbl.Usrs.ClassPhoto.Cols)
|
"%u",Cols);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%u</option>",Cols);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** End selector *****/
|
/***** End selector *****/
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user