Compare commits

...

5 Commits

44 changed files with 551 additions and 522 deletions

View File

@ -4832,12 +4832,6 @@ legend {font-size:12pt;}
}
/*********************************** Messages ********************************/
.MSG_RECIPIENTS, .MSG_SUBJECT, .MSG_CONTENT
{
box-sizing:border-box;
width:640px;
}
.MSG_TO_ONE_RCP
{
display:inline-block;

View File

@ -1957,6 +1957,12 @@ void HTM_TxtColonNBSP (const char *Txt)
HTM_NBSP ();
}
void HTM_NBSPTxt (const char *Txt)
{
HTM_NBSP ();
HTM_Txt (Txt);
}
void HTM_NBSP (void)
{
HTM_Txt (" ");

View File

@ -228,6 +228,7 @@ void HTM_Txt (const char *Txt);
void HTM_TxtColon (const char *Txt);
void HTM_TxtSemicolon (const char *Txt);
void HTM_TxtColonNBSP (const char *Txt);
void HTM_NBSPTxt (const char *Txt);
void HTM_NBSP (void);
void HTM_Colon (void);
void HTM_Semicolon (void);

View File

@ -326,7 +326,7 @@ static void MFU_PutIconAndText (Act_Action_t Action,
"class=\"ICO_%s_%s\"",
Ico_GetPreffix (Color[Gbl.Prefs.IconSet]),
The_GetSuffix ());
HTM_TxtF (" %s",MenuStr);
HTM_NBSPTxt (MenuStr);
}
/*****************************************************************************/

View File

@ -299,7 +299,8 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct Usr_
HTM_TD_Begin ("class=\"LT DAT_STRONG_%s %s\"",
The_GetSuffix (),
The_GetColorRows ());
HTM_TxtF ("%s: %s",Txt_ID,ID);
HTM_TxtColon (Txt_ID);
HTM_NBSPTxt (ID);
HTM_BR ();
HTM_TxtColonNBSP (Txt_Name);
if (UsrDat->FullName[0])

View File

@ -1812,7 +1812,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
// TabPrf ******************************************************************
// Actions in menu:
[ActFrmRolSes ] = { 843, 0,TabPrf,ActFrmRolSes ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_WriteFormLogout ,"power-off" },
[ActMyCrs ] = { 987, 1,TabPrf,ActMyCrs ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Crs_ReqSelectOneOfMyCourses ,"sitemap" },
[ActMyCrs ] = { 987, 1,TabPrf,ActMyCrs ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Hie_ReqSelectOneNodeFromMyHierarchy ,"sitemap" },
[ActSeeMyTT ] = { 408, 2,TabPrf,ActSeeMyTT ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tmt_ShowClassTimeTable ,"clock" },
[ActSeeMyAgd ] = {1602, 3,TabPrf,ActSeeMyAgd ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Agd_GetParsAndShowMyAgenda ,"calendar" },
[ActFrmMyAcc ] = { 36, 4,TabPrf,ActFrmMyAcc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Acc_ShowFormMyAccount ,"at" },

View File

@ -1293,6 +1293,7 @@ void Asg_ReqCreatOrEditAsg (void)
Frm_EndForm ();
/***** Show current assignments, if any *****/
HTM_BR ();
Asg_ShowAllAssignments (&Assignments);
}
@ -1303,7 +1304,6 @@ void Asg_ReqCreatOrEditAsg (void)
static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
{
extern const char *Txt_Groups;
extern const char *Txt_The_whole_course;
unsigned NumGrpTyp;
/***** Get list of groups types and groups in this course *****/
@ -1333,8 +1333,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
"AsgCod",
AsgCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_LABEL_End ();
HTM_TD_End ();
HTM_TR_End ();
@ -1570,7 +1569,6 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Asg_Assignment *As
extern const char *Txt_Group;
extern const char *Txt_Groups;
extern const char *Txt_and;
extern const char *Txt_The_whole_course;
extern const char *HidVis_GroupClass[HidVis_NUM_HIDDEN_VISIBLE];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
@ -1598,7 +1596,7 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Asg_Assignment *As
row = mysql_fetch_row (mysql_res);
/* Write group type name and group name */
HTM_TxtF ("%s %s",row[0],row[1]);
HTM_TxtF ("%s %s",row[0],row[1]);
if (NumGrps >= 2)
{
@ -1610,8 +1608,7 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Asg_Assignment *As
}
}
else
HTM_TxtF ("%s %s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_DIV_End ();

View File

@ -1077,7 +1077,6 @@ void Att_ReqCreatOrEditEvent (void)
static void Att_ShowLstGrpsToEditEvent (long AttCod)
{
extern const char *Txt_Groups;
extern const char *Txt_The_whole_course;
unsigned NumGrpTyp;
/***** Get list of groups types and groups in this course *****/
@ -1108,8 +1107,7 @@ static void Att_ShowLstGrpsToEditEvent (long AttCod)
"AttCod",
AttCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_LABEL_End ();
HTM_TD_End ();
@ -1284,7 +1282,6 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToEvent (struct Att_Event *Event
extern const char *Txt_Group;
extern const char *Txt_Groups;
extern const char *Txt_and;
extern const char *Txt_The_whole_course;
extern const char *HidVis_GroupClass[HidVis_NUM_HIDDEN_VISIBLE];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
@ -1314,7 +1311,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToEvent (struct Att_Event *Event
row = mysql_fetch_row (mysql_res);
/* Write group type name (row[0]) and group name (row[1]) */
HTM_TxtF ("%s %s",row[0],row[1]);
HTM_TxtF ("%s %s",row[0],row[1]);
/* Write the name of the room (row[2]) */
if (row[2]) // May be NULL because of LEFT JOIN
@ -1333,8 +1330,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToEvent (struct Att_Event *Event
}
}
else
HTM_TxtF ("%s %s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
/***** End container *****/
HTM_DIV_End ();
@ -1755,7 +1751,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
The_GetColorRows ());
HTM_Txt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF (" %s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
HTM_TxtF (", %s",UsrDat->FrstName);
HTM_TD_End ();
@ -2929,7 +2925,7 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
The_GetColorRows ());
HTM_Txt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF (" %s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
HTM_TxtF (", %s",UsrDat->FrstName);
HTM_TD_End ();
@ -3108,7 +3104,7 @@ static void Att_ListAttEventsForAStd (struct Att_Events *Events,
The_GetSuffix ());
HTM_Txt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF (" %s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
HTM_TxtF (", %s",UsrDat->FrstName);
HTM_TD_End ();

View File

@ -199,7 +199,7 @@ void Ctr_DrawCenterLogoAndNameWithLink (struct Hie_Node *Ctr,Act_Action_t Action
/***** Center logo and name *****/
Lgo_DrawLogo (Hie_CTR,Ctr,IconClass);
HTM_TxtF (" %s",Ctr->FullName);
HTM_NBSPTxt (Ctr->FullName);
/***** End link *****/
HTM_BUTTON_End ();

View File

@ -633,10 +633,16 @@ 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.59.3 (2024-01-24)"
#define Log_PLATFORM_VERSION "SWAD 23.60.3 (2024-01-26)"
#define CSS_FILE "swad23.58.1.css"
#define JS_FILE "swad23.53.6.js"
/*
Version 23.60.3: Jan 26, 2024 Responsive design in figures about institutions. (335720 lines)
Version 23.60.2: Jan 26, 2024 Responsive design in search for users. (335714 lines)
Version 23.60.1: Jan 26, 2024 Code refactoring in my groups. (335713 lines)
Version 23.60: Jan 26, 2024 Code refactoring in my courses. (335725 lines)
Version 23.59.5: Jan 26, 2024 Responsive design in forums and messages. (335698 lines)
Version 23.59.4: Jan 24, 2024 Responsive design in list of users. (335701 lines)
Version 23.59.3: Jan 24, 2024 Responsive design in course hits. (335698 lines)
Version 23.59.2: Jan 24, 2024 Responsive design in global hits. (335672 lines)
Version 23.59.1: Jan 24, 2024 Responsive design in surveys. (335668 lines)

View File

@ -324,7 +324,7 @@ static void Cht_WriteLinkToChat2 (const char *RoomCode,const char *RoomFullName)
HTM_STRONG_Begin ();
/* Room name and users */
HTM_TxtF (" %s",RoomFullName);
HTM_NBSPTxt (RoomFullName);
if (NumUsrsInRoom > 1)
HTM_TxtF (" [%d %s]",NumUsrsInRoom,Txt_connected_PLURAL);
else if (NumUsrsInRoom == 1)

View File

@ -498,8 +498,6 @@ void Cty_DrawCountryMapAndNameWithLink (struct Hie_Node *Cty,Act_Action_t Action
const char *ClassContainer,
const char *ClassMap)
{
char CountryName[Cty_MAX_BYTES_NAME + 1];
/***** Begin form *****/
Frm_BeginFormGoTo (Action);
ParCod_PutPar (ParCod_Cty,Cty->HieCod);
@ -516,9 +514,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Hie_Node *Cty,Act_Action_t Action
Cty_DrawCountryMap (Cty,ClassMap);
/***** Write country name *****/
Str_Copy (CountryName,Cty->FullName,sizeof (CountryName) - 1);
HTM_TxtF (" %s ",CountryName);
HTM_TxtF ("(%s)",Cty->ShrtName);
HTM_TxtF (" %s (%s)",Cty->FullName,Cty->ShrtName);
/***** End link *****/
HTM_BUTTON_End ();

View File

@ -90,15 +90,6 @@ static struct Hie_Node *Crs_EditingCrs = NULL; // Static variable to keep the co
/**************************** Private prototypes *****************************/
/*****************************************************************************/
static void Crs_WriteListMyCoursesToSelectOne (void);
static void Crs_WriteNodes (struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_LastItem_t IsLastItemInLevel[1 + 6],
Hie_Level_t Level);
static void Crs_WriteRowMyCourses (Hie_Level_t Level,
const struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_Highlight_t Highlight,
Lay_LastItem_t IsLastItemInLevel[1 + 6]);
static void Crs_GetListCrssInCurrentDeg (void);
static void Crs_ListCourses (void);
static void Crs_PutIconsListCourses (__attribute__((unused)) void *Args);
@ -124,8 +115,6 @@ static void Crs_EmptyCourseCompletely (long CrsCod);
static void Crs_PutButtonToGoToCrs (void);
static void Crs_PutButtonToRegisterInCrs (void);
static void Crs_PutIconToSearchCourses (__attribute__((unused)) void *Args);
static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnAccepted);
static void Crs_EditingCourseConstructor (void);
@ -149,134 +138,6 @@ void Crs_ShowIntroduction (void)
Hlp_ShowHelpWhatWouldYouLikeToDo ();
}
/*****************************************************************************/
/************************ Write menu with my courses *************************/
/*****************************************************************************/
#define Crs_MAX_BYTES_TXT_LINK 40
static void Crs_WriteListMyCoursesToSelectOne (void)
{
extern const char *Hlp_PROFILE_Courses;
extern const char *Txt_My_courses;
struct Hie_Node Hie[Hie_NUM_LEVELS];
Lay_LastItem_t IsLastItemInLevel[1 + 6];
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_My_courses,
Crs_PutIconToSearchCourses,NULL,
Hlp_PROFILE_Courses,Box_NOT_CLOSABLE);
/***** Begin list *****/
HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Write nodes recursively *****/
Crs_WriteNodes (Hie,IsLastItemInLevel,Hie_SYS);
/***** End list *****/
HTM_UL_End ();
/***** End box *****/
Box_BoxEnd ();
}
static void Crs_WriteNodes (struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_LastItem_t IsLastItemInLevel[1 + 6],
Hie_Level_t Level)
{
extern unsigned (*Hie_GetMyNodesFromDB[Hie_NUM_LEVELS]) (MYSQL_RES **mysql_res,
long PrtCod);
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
extern const char *Txt_HIERARCHY_SINGUL_Abc[Hie_NUM_LEVELS];
Lay_Highlight_t Highlight; // Highlight because degree, course, etc. is selected
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumNode;
unsigned NumNodes;
if (Level > Hie_SYS)
NumNodes = Hie_GetMyNodesFromDB[Level] (&mysql_res,Hie[Level - 1].HieCod);
else
NumNodes = 1;
for (NumNode = 0;
NumNode < NumNodes;
NumNode++)
{
if (Level > Hie_SYS)
{
/***** Get next node *****/
row = mysql_fetch_row (mysql_res);
Hie[Level].HieCod = Str_ConvertStrCodToLongCod (row[0]);
/***** Get data of this node *****/
if (!Hie_GetDataByCod[Level] (&Hie[Level]))
Err_WrongCountrExit ();
}
else
{
Hie[Level].HieCod = -1L;
Str_Copy (Hie[Level].ShrtName,Txt_HIERARCHY_SINGUL_Abc[Level],
sizeof (Hie[Level].ShrtName) - 1);
}
/***** Write link to node *****/
if (Level < Hie_CRS)
Highlight = (Gbl.Hierarchy.Node[Level + 1].HieCod <= 0 &&
Gbl.Hierarchy.Node[Level].HieCod == Hie[Level].HieCod) ? Lay_HIGHLIGHT :
Lay_NO_HIGHLIGHT;
else
Highlight = (Gbl.Hierarchy.Node[Level].HieCod == Hie[Level].HieCod) ? Lay_HIGHLIGHT :
Lay_NO_HIGHLIGHT;
IsLastItemInLevel[Level] = (NumNode == NumNodes - 1) ? Lay_LAST_ITEM :
Lay_NO_LAST_ITEM;
Crs_WriteRowMyCourses (Level,Hie,Highlight,IsLastItemInLevel);
/***** Write subnodes recursively ******/
if (Level < Hie_CRS)
Crs_WriteNodes (Hie,IsLastItemInLevel,Level + 1);
}
if (Level > Hie_SYS)
/* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res);
}
static void Crs_WriteRowMyCourses (Hie_Level_t Level,
const struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_Highlight_t Highlight,
Lay_LastItem_t IsLastItemInLevel[1 + 6])
{
extern ParCod_Param_t Hie_ParCod[Hie_NUM_LEVELS];
extern const char *Lay_HighlightClass[Lay_NUM_HIGHLIGHT];
static Act_Action_t Actions[Hie_NUM_LEVELS] =
{
[Hie_SYS] = ActSeeSysInf,
[Hie_CTY] = ActSeeCtyInf,
[Hie_INS] = ActSeeInsInf,
[Hie_CTR] = ActSeeCtrInf,
[Hie_DEG] = ActSeeDegInf,
[Hie_CRS] = ActSeeCrsInf,
};
HTM_LI_Begin (Lay_HighlightClass[Highlight]);
Lay_IndentDependingOnLevel (Level,IsLastItemInLevel,
Lay_HORIZONTAL_LINE_AT_RIGHT);
Frm_BeginForm (ActMyCrs);
ParCod_PutPar (Hie_ParCod[Level],Hie[Level].HieCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (Actions[Level]),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Lgo_DrawLogo (Level,&Hie[Level],"ICO16x16");
HTM_DIV_Begin ("class=\"MY_CRS_TXT\"");
HTM_TxtF ("&nbsp;%s",Hie[Level].ShrtName);
HTM_DIV_End ();
HTM_BUTTON_End ();
Frm_EndForm ();
HTM_LI_End ();
}
/*****************************************************************************/
/********************* Get number of courses with users **********************/
/*****************************************************************************/
@ -1756,71 +1617,6 @@ static void Crs_PutButtonToRegisterInCrs (void)
Frm_EndForm ();
}
/*****************************************************************************/
/************************* Select one of my courses **************************/
/*****************************************************************************/
void Crs_ReqSelectOneOfMyCourses (void)
{
/***** Fill the list with the courses I belong to, if not filled *****/
Hie_GetMyHierarchy (Hie_CRS);
/***** Select one of my courses *****/
if (Gbl.Usrs.Me.Hierarchy[Hie_CRS].Num)
/* Show my courses */
Crs_WriteListMyCoursesToSelectOne ();
else // I am not enroled in any course
/* Show help to enrol me */
Hlp_ShowHelpWhatWouldYouLikeToDo ();
}
/*****************************************************************************/
/******************* Put an icon (form) to search courses ********************/
/*****************************************************************************/
static void Crs_PutIconToSearchCourses (__attribute__((unused)) void *Args)
{
Lay_PutContextualLinkOnlyIcon (ActReqSch,NULL,
Sch_PutLinkToSearchCoursesPars,NULL,
"search.svg",Ico_BLACK);
}
/*****************************************************************************/
/********** Put an icon (form) to select my courses in breadcrumb ************/
/*****************************************************************************/
void Crs_PutIconToSelectMyCoursesInBreadcrumb (void)
{
extern const char *Hie_Icons[Hie_NUM_LEVELS];
extern const char *Txt_My_courses;
if (Gbl.Usrs.Me.Logged) // I am logged
{
/***** Begin form *****/
Frm_BeginForm (ActMyCrs);
/***** Put icon with link *****/
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Hie_Icons[Hie_SYS],Txt_My_courses,
"class=\"BC_ICO BC_ICO_%s ICO_HIGHLIGHT\"",
The_GetSuffix ());
/***** End form *****/
Frm_EndForm ();
}
}
/*****************************************************************************/
/****************** Put an icon (form) to select my courses ******************/
/*****************************************************************************/
void Crs_PutIconToSelectMyCourses (__attribute__((unused)) void *Args)
{
if (Gbl.Usrs.Me.Logged) // I am logged
Lay_PutContextualLinkOnlyIcon (ActMyCrs,NULL,
NULL,NULL,
"sitemap.svg",Ico_BLACK);
}
/*****************************************************************************/
/************************** Write courses of a user **************************/
/*****************************************************************************/
@ -1846,7 +1642,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role)
if (NumCrss)
{
/* Begin box and table */
Box_BoxTableBegin ("100%",NULL,
Box_BoxTableBegin (NULL,NULL,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);

View File

@ -79,11 +79,6 @@ void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull);
void Crs_ChangeCrsStatus (void);
void Crs_ContEditAfterChgCrs (void);
void Crs_PutIconToSelectMyCoursesInBreadcrumb (void);
void Crs_PutIconToSelectMyCourses (__attribute__((unused)) void *Args);
void Crs_ReqSelectOneOfMyCourses (void);
void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role);
void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss);

View File

@ -205,7 +205,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Hie_Node *Deg,Act_Action_t Action
/***** Degree logo and name *****/
Lgo_DrawLogo (Hie_DEG,Deg,IconClass);
HTM_TxtF ("&nbsp;%s",Deg->FullName);
HTM_NBSPTxt (Deg->FullName);
/***** End link *****/
HTM_BUTTON_End ();

View File

@ -1527,11 +1527,14 @@ void ExaRes_ShowExamResultUser (struct Usr_Data *UsrDat)
/***** User's data *****/
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
ID_WriteUsrIDs (UsrDat,NULL);
HTM_TxtF ("&nbsp;%s",UsrDat->Surname1);
HTM_NBSPTxt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF ("&nbsp;%s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
if (UsrDat->FrstName[0])
HTM_TxtF (", %s",UsrDat->FrstName);
{
HTM_Comma ();
HTM_SPTxt (UsrDat->FrstName);
}
HTM_BR ();
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);

View File

@ -545,7 +545,6 @@ static void ExaSes_GetAndWriteNamesOfGrpsAssociatedToSession (const struct ExaSe
extern const char *Txt_Group;
extern const char *Txt_Groups;
extern const char *Txt_and;
extern const char *Txt_The_whole_course;
extern const char *HidVis_GroupClass[HidVis_NUM_HIDDEN_VISIBLE];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
@ -574,7 +573,7 @@ static void ExaSes_GetAndWriteNamesOfGrpsAssociatedToSession (const struct ExaSe
row = mysql_fetch_row (mysql_res);
/* Write group type name (row[0]) and group name (row[1]) */
HTM_TxtF ("%s&nbsp;%s",row[0],row[1]);
HTM_TxtF ("%s %s",row[0],row[1]);
if (NumGrps >= 2)
{
@ -587,8 +586,7 @@ static void ExaSes_GetAndWriteNamesOfGrpsAssociatedToSession (const struct ExaSe
}
}
else
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_DIV_End ();
@ -985,7 +983,6 @@ static void ExaSes_ParsFormSession (void *Session)
static void ExaSes_ShowLstGrpsToCreateSession (long SesCod)
{
extern const char *Txt_Groups;
extern const char *Txt_The_whole_course;
unsigned NumGrpTyp;
/***** Get list of groups types and groups in this course *****/
@ -1016,8 +1013,7 @@ static void ExaSes_ShowLstGrpsToCreateSession (long SesCod)
"SesCod",
SesCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -264,5 +264,6 @@ void Fig_ShowFigures (void)
Fig_ReqShowFigure (SelectedFigureType);
/***** Show the stat of use selected by user *****/
HTM_BR ();
Fig_Function[SelectedFigureType] ();
}

View File

@ -1825,7 +1825,7 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
default:
break;
}
HTM_TxtF ("&nbsp;%s",ForumName);
HTM_NBSPTxt (ForumName);
/***** Write total number of threads and posts in this forum *****/
if (NumThrs)
@ -2106,7 +2106,7 @@ void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums,
Forums,-1L);
/***** Heading row *****/
HTM_TABLE_BeginWideMarginPadding (2);
HTM_TABLE_Begin ("TBL_SCROLL");
HTM_TR_Begin (NULL);
HTM_TH_Span (NULL ,HTM_HEAD_CENTER,1,1,"BT");
@ -2769,85 +2769,85 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
char *ClassInput;
/***** Begin box *****/
if (IsReply)
Box_BoxBegin (NULL,Txt_Post,
NULL,NULL,
Hlp_COMMUNICATION_Forums_new_post,Box_NOT_CLOSABLE);
else
Box_BoxBegin (NULL,Txt_Thread,
NULL,NULL,
Hlp_COMMUNICATION_Forums_new_thread,Box_NOT_CLOSABLE);
Box_BoxBegin (NULL,IsReply ? Txt_Post :
Txt_Thread,
NULL,NULL,
IsReply ? Hlp_COMMUNICATION_Forums_new_post :
Hlp_COMMUNICATION_Forums_new_thread,
Box_NOT_CLOSABLE);
/***** Begin form *****/
if (IsReply) // Form to write a reply to a post of an existing thread
{
Frm_BeginFormAnchor (For_ActionsRecRepFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutParsNewPost (Forums);
}
else // Form to write the first post of a new thread
{
Frm_BeginFormAnchor (For_ActionsRecThrFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutParsNewThread (Forums);
}
/***** Begin form *****/
if (IsReply) // Form to write a reply to a post of an existing thread
{
Frm_BeginFormAnchor (For_ActionsRecRepFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutParsNewPost (Forums);
}
else // Form to write the first post of a new thread
{
Frm_BeginFormAnchor (For_ActionsRecThrFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutParsNewThread (Forums);
}
/***** Subject and content *****/
HTM_TABLE_BeginCenterPadding (2);
/***** Subject and content *****/
HTM_TABLE_BeginCenterPadding (2);
// If writing a reply to a message of an existing thread ==> write subject
/* Subject */
HTM_TR_Begin (NULL);
// If writing a reply to a message of an existing thread ==> write subject
/* Subject */
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","Subject",Txt_MSG_Subject);
/* Label */
Frm_LabelColumn ("REC_C1_BOT RT","Subject",Txt_MSG_Subject);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_INPUT_TEXT ("Subject",Cns_MAX_CHARS_SUBJECT,
IsReply ? Subject :
"",
HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Subject\" class=\"MSG_SUBJECT INPUT_%s\""
" required=\"required\"",
The_GetSuffix ());
HTM_TD_End ();
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_INPUT_TEXT ("Subject",Cns_MAX_CHARS_SUBJECT,
IsReply ? Subject :
"",
HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Subject\""
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
" required=\"required\"",
The_GetSuffix ());
HTM_TD_End ();
HTM_TR_End ();
HTM_TR_End ();
/* Content */
HTM_TR_Begin (NULL);
/* Content */
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","Content",Txt_MSG_Content);
/* Label */
Frm_LabelColumn ("REC_C1_BOT RT","Content",Txt_MSG_Content);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\""
" class=\"MSG_CONTENT INPUT_%s\" rows=\"10\"",
The_GetSuffix ());
HTM_TEXTAREA_End ();
HTM_TD_End ();
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\""
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
" rows=\"10\"",
The_GetSuffix ());
HTM_TEXTAREA_End ();
HTM_TD_End ();
HTM_TR_End ();
HTM_TR_End ();
HTM_TABLE_End ();
HTM_TABLE_End ();
/***** Help for text editor *****/
Lay_HelpPlainEditor ();
/***** Help for text editor *****/
Lay_HelpPlainEditor ();
/***** Attached image (optional) *****/
if (asprintf (&ClassInput,"FOR_MED_INPUT INPUT_%s",
The_GetSuffix ()) < 0)
Err_NotEnoughMemoryExit ();
Med_PutMediaUploader (-1,ClassInput);
free (ClassInput);
/***** Attached image (optional) *****/
if (asprintf (&ClassInput,"FOR_MED_INPUT INPUT_%s",
The_GetSuffix ()) < 0)
Err_NotEnoughMemoryExit ();
Med_PutMediaUploader (-1,ClassInput);
free (ClassInput);
/***** Send button *****/
Btn_PutCreateButton (Txt_Send);
/***** Send button *****/
Btn_PutCreateButton (Txt_Send);
/***** End form *****/
Frm_EndForm ();
/***** End form *****/
Frm_EndForm ();
/***** End box *****/
Box_BoxEnd ();

View File

@ -169,7 +169,7 @@ void Grp_WriteNamesOfSelectedGrps (void)
{
GrpDat.GrpCod = GrpCod;
Grp_GetGroupDataByCod (&GrpDat);
HTM_TxtF ("%s&nbsp;%s",GrpDat.GrpTypName,GrpDat.GrpName);
HTM_TxtF ("%s %s",GrpDat.GrpTypName,GrpDat.GrpName);
}
else // GrpCod < 0 ==> students not belonging to any group of type (-GrpCod)
{
@ -433,7 +433,7 @@ static void Grp_PutCheckboxAllGrps (Grp_WhichGroups_t GroupsSelectableByStdsOrNE
" onclick=\"togglecheckChildren(this,'GrpCods')\"" :
" onclick=\"togglecheckChildren(this,'GrpCods')\"") :
" disabled=\"disabled\"");
HTM_TxtF ("&nbsp;%s",Txt_All_groups);
HTM_NBSPTxt (Txt_All_groups);
HTM_LABEL_End ();
HTM_DIV_End ();
}
@ -1602,6 +1602,15 @@ static void Grp_WriteHeadingGroups (void)
HTM_TR_End ();
}
/*********************** Write text "the whole course" ***********************/
void Grp_WriteTheWholeCourse (void)
{
extern const char *Txt_The_whole_course;
HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
}
/*****************************************************************************/
/****** List groups of a type to edit ******/
/****** assignments, attendance events, surveys, exam events or matches ******/

View File

@ -182,6 +182,8 @@ void Grp_RegisterUsrIntoGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstG
unsigned Grp_RemoveUsrFromGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstGrps);
void Grp_RemUsrFromAllGrpsInCrs (long UsrCod,long CrsCod);
void Grp_RemUsrFromAllGrps (long UsrCod);
void Grp_WriteTheWholeCourse (void);
void Grp_ListGrpsToEditAsgAttSvyEvtMch (struct GroupType *GrpTyp,
Grp_WhichIsAssociatedToGrp_t WhichIsAssociatedToGrp,
long Cod);

View File

@ -43,6 +43,7 @@
#include "swad_form.h"
#include "swad_global.h"
#include "swad_group_database.h"
#include "swad_help.h"
#include "swad_hierarchy.h"
#include "swad_hierarchy_database.h"
#include "swad_hierarchy_type.h"
@ -130,6 +131,17 @@ static void Hie_ShowHierarchyRow (const char *Text1,const char *Text2,
int NumNodes[Hie_NUM_LEVELS]);
static void Hie_ShowHierarchyCell (const char *ClassTxt,int Num);
//--------------------------- My hierarchy ------------------------------------
static void Hie_WriteListMyHierarchyToSelectNode (void);
static void Hie_PutIconToSearchCourses (__attribute__((unused)) void *Args);
static void Hie_WriteMyHierarchyNodes (struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_LastItem_t IsLastItemInLevel[1 + 6],
Hie_Level_t Level);
static void Hie_WriteRowMyHierarchy (Hie_Level_t Level,
const struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_Highlight_t Highlight,
Lay_LastItem_t IsLastItemInLevel[1 + 6]);
/*****************************************************************************/
/********** List pending institutions, centers, degrees and courses **********/
/*****************************************************************************/
@ -1157,7 +1169,8 @@ static void Hie_GetAndShowHierarchyWithNodes (Hie_Level_t HavingNodesOfLevel)
HavingNodesOfLevel);// Grand child
/***** Write number of elements with courses *****/
Hie_ShowHierarchyRow (Txt_With_,Txt_HIERARCHY_PLURAL_abc[HavingNodesOfLevel],"DAT",NumNodes);
Hie_ShowHierarchyRow (Txt_With_,Txt_HIERARCHY_PLURAL_abc[HavingNodesOfLevel],
"DAT",NumNodes);
}
/*****************************************************************************/
@ -1457,3 +1470,202 @@ static void Hie_ShowHierarchyCell (const char *ClassTxt,int Num)
HTM_Hyphen ();
HTM_TD_End ();
}
/*****************************************************************************/
/********** Put an icon (form) to select my courses in breadcrumb ************/
/*****************************************************************************/
void Hie_PutIconToSelectMyHierarchyInBreadcrumb (void)
{
extern const char *Txt_My_courses;
if (Gbl.Usrs.Me.Logged) // I am logged
{
/***** Begin form *****/
Frm_BeginForm (ActMyCrs);
/***** Put icon with link *****/
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Hie_Icons[Hie_SYS],Txt_My_courses,
"class=\"BC_ICO BC_ICO_%s ICO_HIGHLIGHT\"",
The_GetSuffix ());
/***** End form *****/
Frm_EndForm ();
}
}
/*****************************************************************************/
/***************** Put an icon (form) to select my hierarchy *****************/
/*****************************************************************************/
void Hie_PutIconToSelectMyHierarchy (__attribute__((unused)) void *Args)
{
if (Gbl.Usrs.Me.Logged) // I am logged
Lay_PutContextualLinkOnlyIcon (ActMyCrs,NULL,
NULL,NULL,
"sitemap.svg",Ico_BLACK);
}
/*****************************************************************************/
/****************** Select one node from my hierarchy ************************/
/*****************************************************************************/
void Hie_ReqSelectOneNodeFromMyHierarchy (void)
{
/***** Fill the list with the courses I belong to, if not filled *****/
Hie_GetMyHierarchy (Hie_CRS);
/***** Select one of my courses *****/
if (Gbl.Usrs.Me.Hierarchy[Hie_CRS].Num)
/* Show my courses */
Hie_WriteListMyHierarchyToSelectNode ();
else // I am not enroled in any course
/* Show help to enrol me */
Hlp_ShowHelpWhatWouldYouLikeToDo ();
}
/*****************************************************************************/
/************************ Write menu with my courses *************************/
/*****************************************************************************/
static void Hie_WriteListMyHierarchyToSelectNode (void)
{
extern const char *Hlp_PROFILE_Courses;
extern const char *Txt_My_courses;
struct Hie_Node Hie[Hie_NUM_LEVELS];
Lay_LastItem_t IsLastItemInLevel[1 + 6];
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_My_courses,
Hie_PutIconToSearchCourses,NULL,
Hlp_PROFILE_Courses,Box_NOT_CLOSABLE);
/***** Begin list *****/
HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Write nodes recursively *****/
Hie_WriteMyHierarchyNodes (Hie,IsLastItemInLevel,Hie_SYS);
/***** End list *****/
HTM_UL_End ();
/***** End box *****/
Box_BoxEnd ();
}
/*****************************************************************************/
/******************* Put an icon (form) to search courses ********************/
/*****************************************************************************/
static void Hie_PutIconToSearchCourses (__attribute__((unused)) void *Args)
{
Lay_PutContextualLinkOnlyIcon (ActReqSch,NULL,
Sch_PutLinkToSearchCoursesPars,NULL,
"search.svg",Ico_BLACK);
}
/*****************************************************************************/
/****************** Write my hierarchy nodes recursively *********************/
/*****************************************************************************/
static void Hie_WriteMyHierarchyNodes (struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_LastItem_t IsLastItemInLevel[1 + 6],
Hie_Level_t Level)
{
extern const char *Txt_HIERARCHY_SINGUL_Abc[Hie_NUM_LEVELS];
Lay_Highlight_t Highlight; // Highlight because degree, course, etc. is selected
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumNode;
unsigned NumNodes;
if (Level > Hie_SYS)
NumNodes = Hie_GetMyNodesFromDB[Level] (&mysql_res,Hie[Level - 1].HieCod);
else
NumNodes = 1;
for (NumNode = 0;
NumNode < NumNodes;
NumNode++)
{
if (Level > Hie_SYS)
{
/***** Get next node *****/
row = mysql_fetch_row (mysql_res);
Hie[Level].HieCod = Str_ConvertStrCodToLongCod (row[0]);
/***** Get data of this node *****/
if (!Hie_GetDataByCod[Level] (&Hie[Level]))
Err_WrongCountrExit ();
}
else
{
Hie[Level].HieCod = -1L;
Str_Copy (Hie[Level].ShrtName,Txt_HIERARCHY_SINGUL_Abc[Level],
sizeof (Hie[Level].ShrtName) - 1);
}
/***** Write link to node *****/
if (Level < Hie_CRS)
Highlight = (Gbl.Hierarchy.Node[Level + 1].HieCod <= 0 &&
Gbl.Hierarchy.Node[Level].HieCod == Hie[Level].HieCod) ? Lay_HIGHLIGHT :
Lay_NO_HIGHLIGHT;
else
Highlight = (Gbl.Hierarchy.Node[Level].HieCod == Hie[Level].HieCod) ? Lay_HIGHLIGHT :
Lay_NO_HIGHLIGHT;
IsLastItemInLevel[Level] = (NumNode == NumNodes - 1) ? Lay_LAST_ITEM :
Lay_NO_LAST_ITEM;
Hie_WriteRowMyHierarchy (Level,Hie,Highlight,IsLastItemInLevel);
/***** Write subnodes recursively ******/
if (Level < Hie_CRS)
Hie_WriteMyHierarchyNodes (Hie,IsLastItemInLevel,Level + 1);
}
if (Level > Hie_SYS)
/* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res);
}
/*****************************************************************************/
/************************ Write a row in my hierarchy ************************/
/*****************************************************************************/
static void Hie_WriteRowMyHierarchy (Hie_Level_t Level,
const struct Hie_Node Hie[Hie_NUM_LEVELS],
Lay_Highlight_t Highlight,
Lay_LastItem_t IsLastItemInLevel[1 + 6])
{
extern const char *Lay_HighlightClass[Lay_NUM_HIGHLIGHT];
static Act_Action_t Actions[Hie_NUM_LEVELS] =
{
[Hie_SYS] = ActSeeSysInf,
[Hie_CTY] = ActSeeCtyInf,
[Hie_INS] = ActSeeInsInf,
[Hie_CTR] = ActSeeCtrInf,
[Hie_DEG] = ActSeeDegInf,
[Hie_CRS] = ActSeeCrsInf,
};
HTM_LI_Begin (Lay_HighlightClass[Highlight]);
Lay_IndentDependingOnLevel (Level,IsLastItemInLevel,
Lay_HORIZONTAL_LINE_AT_RIGHT);
Frm_BeginForm (ActMyCrs);
ParCod_PutPar (Hie_ParCod[Level],Hie[Level].HieCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (Actions[Level]),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
/* Node logo */
Lgo_DrawLogo (Level,&Hie[Level],"ICO16x16");
/* Node name */
HTM_DIV_Begin ("class=\"MY_CRS_TXT\"");
HTM_NBSPTxt (Hie[Level].ShrtName);
HTM_DIV_End ();
HTM_BUTTON_End ();
Frm_EndForm ();
HTM_LI_End ();
}

View File

@ -93,4 +93,10 @@ unsigned Hie_GetCachedNumUsrsWhoClaimToBelongTo (Hie_Level_t Level,
unsigned Hie_GetNumUsrsWhoClaimToBelongTo (Hie_Level_t Level,
struct Hie_Node *Node);
//--------------------------- My hierarchy ------------------------------------
void Hie_PutIconToSelectMyHierarchyInBreadcrumb (void);
void Hie_PutIconToSelectMyHierarchy (__attribute__((unused)) void *Args);
void Hie_ReqSelectOneNodeFromMyHierarchy (void);
#endif

View File

@ -163,9 +163,7 @@ void Hld_SeeAllHolidays (void)
Frm_EndForm ();
HTM_TH_End ();
}
HTM_TH_Begin (HTM_HEAD_LEFT);
HTM_TxtF ("&nbsp;%s&nbsp;",Txt_End_date);
HTM_TH_End ();
HTM_TH (Txt_End_date,HTM_HEAD_LEFT);
HTM_TH (Txt_Holiday,HTM_HEAD_LEFT);
HTM_TR_End ();
@ -184,12 +182,10 @@ void Hld_SeeAllHolidays (void)
Dat_ConvDateToDateStr (&Holidays.Lst[NumHld].StartDate,StrDate);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_NBSP ();
HTM_Txt (StrDate);
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_NBSP ();
switch (Holidays.Lst[NumHld].HldTyp)
{
case Hld_HOLIDAY:
@ -202,7 +198,7 @@ void Hld_SeeAllHolidays (void)
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TxtF ("&nbsp;%s",Holidays.Lst[NumHld].Name);
HTM_Txt (Holidays.Lst[NumHld].Name);
HTM_TD_End ();
HTM_TR_End ();

View File

@ -459,7 +459,7 @@ void Ico_PutIconTextLink (const char *Icon,Ico_Color_t Color,const char *Text)
/***** Print icon and optional text *****/
HTM_DIV_Begin ("class=\"CONTEXT_OPT ICO_HIGHLIGHT\"");
Ico_PutIcon (Icon,Color,Text,"CONTEXT_ICOx16");
HTM_TxtF ("&nbsp;%s",Text);
HTM_NBSPTxt (Text);
HTM_DIV_End ();
}

View File

@ -244,7 +244,7 @@ void Ins_DrawInstitLogoAndNameWithLink (struct Hie_Node *Ins,Act_Action_t Action
/***** Institution logo and name *****/
Lgo_DrawLogo (Hie_INS,Ins,IconClass);
HTM_TxtF ("&nbsp;%s",Ins->FullName);
HTM_NBSPTxt (Ins->FullName);
/***** End link *****/
HTM_BUTTON_End ();
@ -1660,15 +1660,19 @@ void Ins_GetAndShowInstitutionsStats (void)
Ins_GetAndShowInssOrderedByNumCtrs ();
/***** Institutions ordered by number of degrees *****/
HTM_BR ();
Ins_GetAndShowInssOrderedByNumDegs ();
/***** Institutions ordered by number of courses *****/
HTM_BR ();
Ins_GetAndShowInssOrderedByNumCrss ();
/***** Institutions ordered by number of users in courses *****/
HTM_BR ();
Ins_GetAndShowInssOrderedByNumUsrsInCrss ();
/***** Institutions ordered by number of users who claim to belong to them *****/
HTM_BR ();
Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem ();
/***** End box *****/
@ -1686,22 +1690,22 @@ static void Ins_GetAndShowInssOrderedByNumCtrs (void)
MYSQL_RES *mysql_res;
unsigned NumInss;
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_centers,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_centers,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Get institutions ordered by number of centers *****/
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
/***** Get institutions ordered by number of centers *****/
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/*****************************************************************************/
@ -1715,22 +1719,22 @@ static void Ins_GetAndShowInssOrderedByNumDegs (void)
MYSQL_RES *mysql_res;
unsigned NumInss;
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_degrees,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_degrees,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Get institutions ordered by number of degrees *****/
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
/***** Get institutions ordered by number of degrees *****/
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/*****************************************************************************/
@ -1744,22 +1748,22 @@ static void Ins_GetAndShowInssOrderedByNumCrss (void)
MYSQL_RES *mysql_res;
unsigned NumInss;
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_courses,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_courses,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Get institutions ordered by number of courses *****/
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
/***** Get institutions ordered by number of courses *****/
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/*****************************************************************************/
@ -1773,22 +1777,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsInCrss (void)
MYSQL_RES *mysql_res;
unsigned NumInss;
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_in_courses,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_in_courses,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Get institutions ordered by number of users in courses *****/
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
/***** Get institutions ordered by number of users in courses *****/
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/*****************************************************************************/
@ -1803,22 +1807,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem (void)
MYSQL_RES *mysql_res;
unsigned NumInss;
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Get institutions ordered by number of users who claim to belong to them *****/
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
/***** Get institutions ordered by number of users who claim to belong to them *****/
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
/***** Show institutions *****/
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/*****************************************************************************/

View File

@ -1112,7 +1112,7 @@ static void Lay_WritePageTopHeading (void)
static void Lay_WriteBreadcrumb (void)
{
HTM_Txt ("<nav id=\"breadcrumb\">");
Crs_PutIconToSelectMyCoursesInBreadcrumb ();
Hie_PutIconToSelectMyHierarchyInBreadcrumb ();
Hie_WriteHierarchyInBreadcrumb ();
Crs_WriteSelectorMyCoursesInBreadcrumb ();
HTM_Txt ("</nav>");
@ -1303,7 +1303,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
/***** Text *****/
if (Text)
if (Text[0])
HTM_TxtF ("&nbsp;%s",Text);
HTM_NBSPTxt (Text);
/***** End label *****/
HTM_LABEL_End ();

View File

@ -106,7 +106,8 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
ActChgNumRowHeaCrs); // Course zone
Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
HTM_LABEL_Begin (NULL);
HTM_TxtF ("&nbsp;%s: ",Txt_TABLE_Header);
// HTM_TxtF ("&nbsp;%s: ",Txt_TABLE_Header);
HTM_TxtColon (Txt_TABLE_Header);
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Header);
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_HEADER],Cns_MAX_DECIMAL_DIGITS_UINT,StrHeadOrFoot,
HTM_SUBMIT_ON_CHANGE,
@ -124,7 +125,8 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
ActChgNumRowFooCrs); // Course zone
Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
HTM_LABEL_Begin (NULL);
HTM_TxtF ("&nbsp;%s: ",Txt_TABLE_Footer);
// HTM_TxtF ("&nbsp;%s: ",Txt_TABLE_Footer);
HTM_TxtColon (Txt_TABLE_Footer);
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Footer);
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_FOOTER],Cns_MAX_DECIMAL_DIGITS_UINT,StrHeadOrFoot,
HTM_SUBMIT_ON_CHANGE,

View File

@ -674,7 +674,6 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Gam_Games
extern const char *Txt_Group;
extern const char *Txt_Groups;
extern const char *Txt_and;
extern const char *Txt_The_whole_course;
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumGrps;
@ -703,7 +702,7 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Gam_Games
row = mysql_fetch_row (mysql_res);
/* Write group type name and group name */
HTM_TxtF ("%s&nbsp;%s",row[0],row[1]);
HTM_TxtF ("%s %s",row[0],row[1]);
if (NumGrps >= 2)
{
@ -716,8 +715,7 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Gam_Games
}
}
else
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_DIV_End ();
@ -1240,7 +1238,6 @@ static void Mch_ParsFormMatch (void *Match)
static void Mch_ShowLstGrpsToEditMatch (long MchCod)
{
extern const char *Txt_Groups;
extern const char *Txt_The_whole_course;
unsigned NumGrpTyp;
/***** Get list of groups types and groups in this course *****/
@ -1270,8 +1267,7 @@ static void Mch_ShowLstGrpsToEditMatch (long MchCod)
"MchCod",
MchCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_LABEL_End ();
HTM_TD_End ();
@ -2613,7 +2609,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match)
HTM_TxtF ("<i class=\"%s\"></i>",
Match->Status.ShowQstResults ? "fas fa-toggle-on" :
"fas fa-toggle-off");
HTM_TxtF ("&nbsp;%s",Txt_View_results);
HTM_NBSPTxt (Txt_View_results);
HTM_BUTTON_End ();
/***** End form *****/
@ -2650,7 +2646,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered)
" onmousedown=\"this.form.submit();return false;\"",
The_GetSuffix ());
HTM_TxtF ("<i class=\"%s\"></i>","fas fa-check-circle");
HTM_TxtF ("&nbsp;%s",Txt_MATCH_QUESTION_Answered);
HTM_NBSPTxt (Txt_MATCH_QUESTION_Answered);
HTM_BUTTON_End ();
/* End form */
@ -2666,8 +2662,8 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered)
"fas fa-exclamation-circle",
Answered ? Txt_MATCH_QUESTION_Answered :
Txt_MATCH_QUESTION_Unanswered);
HTM_TxtF ("&nbsp;%s",Answered ? Txt_MATCH_QUESTION_Answered :
Txt_MATCH_QUESTION_Unanswered);
HTM_NBSPTxt (Answered ? Txt_MATCH_QUESTION_Answered :
Txt_MATCH_QUESTION_Unanswered);
HTM_DIV_End ();
}

View File

@ -1125,11 +1125,14 @@ void MchRes_ShowOneMchResult (void)
HTM_TD_Begin ("class=\"LB DAT_%s\"",
The_GetSuffix ());
ID_WriteUsrIDs (UsrDat,NULL);
HTM_TxtF ("&nbsp;%s",UsrDat->Surname1);
HTM_SPTxt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF ("&nbsp;%s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
if (UsrDat->FrstName[0])
HTM_TxtF (", %s",UsrDat->FrstName);
{
HTM_Comma ();
HTM_SPTxt (UsrDat->FrstName);
}
HTM_BR ();
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);

View File

@ -340,7 +340,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
else
{
/***** Show potential recipients *****/
HTM_TABLE_BeginWide ();
HTM_TABLE_Begin ("TBL_SCROLL");
if (ShowUsrsInCrs)
{
Usr_ListUsersToSelect (Rol_TCH,&Gbl.Usrs.Selected); // All teachers in course
@ -546,7 +546,7 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan);
HTM_TEXTAREA_Begin ("id=\"OtherRecipients\" name=\"OtherRecipients\""
" class=\"MSG_RECIPIENTS INPUT_%s\" rows=\"2\""
" class=\"REC_C2_BOT_INPUT INPUT_%s\" rows=\"2\""
" placeholder=\"%s\"",
The_GetSuffix (),
Txt_nicks_emails_or_IDs_separated_by_commas);
@ -587,12 +587,12 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","MsgSubject",Txt_MSG_Subject);
Frm_LabelColumn ("REC_C1_BOT RT","MsgSubject",Txt_MSG_Subject);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TEXTAREA_Begin ("id=\"MsgSubject\" name=\"Subject\""
" class=\"MSG_SUBJECT INPUT_%s\" rows=\"2\"",
" class=\"REC_C2_BOT_INPUT INPUT_%s\" rows=\"2\"",
The_GetSuffix ());
/* If message is a reply ==> get original message */
@ -627,12 +627,13 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","MsgContent",Txt_MSG_Content);
Frm_LabelColumn ("REC_C1_BOT RT","MsgContent",Txt_MSG_Content);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT INPUT_%s\" rows=\"20\"",
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
" rows=\"20\"",
The_GetSuffix ());
/* Begin textarea with a '\n', that will be not visible in textarea.
@ -662,12 +663,13 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","MsgContent",Txt_MSG_Content);
Frm_LabelColumn ("REC_C1_BOT RT","MsgContent",Txt_MSG_Content);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT INPUT_%s\" rows=\"20\"",
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
" rows=\"20\"",
The_GetSuffix ());
/* Begin textarea with a '\n', that will be not visible in textarea.

View File

@ -381,7 +381,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
The_GetSuffix ());
Ico_PutIcon (Net_WebsAndSocialNetworksIcons[Web],Ico_BLACK,
Net_WebsAndSocialNetworksTitle[Web],"ICOx16");
HTM_TxtF ("&nbsp;%s",Net_WebsAndSocialNetworksTitle[Web]);
HTM_NBSPTxt (Net_WebsAndSocialNetworksTitle[Web]);
HTM_TD_End ();
HTM_TD_Unsigned (NumUsrs);

View File

@ -1778,8 +1778,8 @@ void Ntf_WriteNumberOfNewNtfs (void)
"class=\"ICO16x16 NOTIF_ICO_%s\"",The_GetSuffix ());
HTM_TxtF ("&nbsp;%u",NumNewNtfs);
HTM_SPAN_Begin ("id=\"notif_new\"");
HTM_TxtF ("&nbsp;%s",NumNewNtfs == 1 ? Txt_NOTIF_new_SINGULAR :
Txt_NOTIF_new_PLURAL);
HTM_NBSPTxt (NumNewNtfs == 1 ? Txt_NOTIF_new_SINGULAR :
Txt_NOTIF_new_PLURAL);
HTM_SPAN_End ();
}

View File

@ -2719,8 +2719,9 @@ static void Prj_ShowTableAllProjectsMembersWithARole (const struct Prj_Project *
HTM_LI_Begin (NULL);
HTM_Txt (Gbl.Usrs.Other.UsrDat.Surname1);
if (Gbl.Usrs.Other.UsrDat.Surname2[0])
HTM_TxtF ("&nbsp;%s",Gbl.Usrs.Other.UsrDat.Surname2);
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
HTM_SPTxt (Gbl.Usrs.Other.UsrDat.Surname2);
HTM_Comma ();
HTM_SPTxt (Gbl.Usrs.Other.UsrDat.FrstName);
HTM_LI_End ();
}
}
@ -3686,6 +3687,7 @@ static void Prj_ReqCreatOrEditPrj (struct Prj_Projects *Projects)
Prj_FreeMemProject (&Projects->Prj);
/***** Show projects again *****/
HTM_BR ();
Prj_ShowProjects (Projects);
}

View File

@ -237,7 +237,7 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
"value=\"Y\"%s onclick=\"togglecheckChildren(this,'AnswerType');\"",
AnswerTypes->All ? " checked=\"checked\"" :
"");
HTM_TxtF ("&nbsp;%s",Txt_All_types_of_answers);
HTM_NBSPTxt (Txt_All_types_of_answers);
HTM_LABEL_End ();
HTM_TD_End ();
@ -262,14 +262,14 @@ void Qst_ShowFormAnswerTypes (const struct Qst_AnswerTypes *AnswerTypes)
}
}
HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"DAT_%s\"",
The_GetSuffix ());
HTM_LABEL_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
HTM_INPUT_CHECKBOX ("AnswerType",HTM_DONT_SUBMIT_ON_CHANGE,
"value=\"%u\"%s onclick=\"checkParent(this,'AllAnsTypes');\"",
"value=\"%u\"%s"
" onclick=\"checkParent(this,'AllAnsTypes');\"",
(unsigned) AnsType,
Checked ? " checked=\"checked\"" :
"");
HTM_TxtF ("&nbsp;%s",Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_NBSPTxt (Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_LABEL_End ();
HTM_TD_End ();
@ -1220,18 +1220,17 @@ void Qst_ListOneOrMoreQstsForSelectionForGame (struct Gam_Games *Games,
}
/*****************************************************************************/
/************** Select all questions to add them to set/game *****************/
/********* Checkbox to select all questions to add them to set/game **********/
/*****************************************************************************/
void Qst_PutCheckboxToSelectAllQuestions (void)
{
extern const char *Txt_All_questions;
/***** Checkbox to select all listed questions *****/
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
HTM_INPUT_CHECKBOX ("AllQsts",HTM_DONT_SUBMIT_ON_CHANGE,
"value=\"Y\" onclick=\"togglecheckChildren(this,'QstCods');\"");
HTM_TxtF ("&nbsp;%s",Txt_All_questions);
HTM_NBSPTxt (Txt_All_questions);
HTM_LABEL_End ();
}

View File

@ -156,7 +156,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Hie_Level_t DefaultScop
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Search,
Crs_PutIconToSelectMyCourses,NULL,
Hie_PutIconToSelectMyHierarchy,NULL,
Hlp_START_Search,Box_NOT_CLOSABLE);
/***** Begin form *****/

View File

@ -308,7 +308,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT FORM_IN_%s\"",
The_GetSuffix ());
HTM_TABLE_Begin (NULL);
HTM_TABLE_Begin ("TBL_SCROLL");
Usr_ListUsersToSelect (Rol_TCH,&Gbl.Usrs.Selected);
Usr_ListUsersToSelect (Rol_NET,&Gbl.Usrs.Selected);
Usr_ListUsersToSelect (Rol_STD,&Gbl.Usrs.Selected);
@ -365,7 +365,8 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
The_GetSuffix ());
HTM_TxtF ("&nbsp;%s&nbsp;",Txt_distributed_by);
HTM_Txt (Txt_distributed_by);
HTM_NBSP ();
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
"id=\"GroupedBy\" name=\"GroupedBy\""
" class=\"INPUT_%s\"",
@ -573,7 +574,8 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
/***** Type of statistic *****/
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",
The_GetSuffix ());
HTM_TxtF ("&nbsp;%s&nbsp;",Txt_distributed_by);
HTM_Txt (Txt_distributed_by);
HTM_NBSP ();
if (Stats->ClicksGroupedBy < Sta_CLICKS_GBL_PER_DAY ||
Stats->ClicksGroupedBy > Sta_CLICKS_GBL_PER_COURSE)

View File

@ -594,7 +594,8 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
HidVis_GroupClass[Surveys->Svy.Status.HiddenOrVisible],
The_GetSuffix ());
HTM_TxtColonNBSP (Txt_Scope);
HTM_TxtF ("%s&nbsp;%s",Txt_HIERARCHY_SINGUL_Abc[Surveys->Svy.Level],
HTM_TxtF ("%s %s",
Txt_HIERARCHY_SINGUL_Abc[Surveys->Svy.Level],
Gbl.Hierarchy.Node[Surveys->Svy.Level].ShrtName);
HTM_DIV_End ();
@ -1726,13 +1727,15 @@ void Svy_ReqCreatOrEditSvy (void)
/***** End form *****/
Frm_EndForm ();
HTM_BR ();
/***** Show questions of the survey ready to be edited *****/
if (!ItsANewSurvey)
{
HTM_BR ();
Svy_ListSvyQuestions (&Surveys);
}
/***** Show all surveys *****/
HTM_BR ();
Svy_ListAllSurveys (&Surveys);
}
@ -1816,7 +1819,6 @@ static void Svy_SetAllowedScopes (struct Svy_Survey *Svy)
static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
{
extern const char *Txt_Groups;
extern const char *Txt_The_whole_course;
unsigned NumGrpTyp;
/***** Get list of groups types and groups in this course *****/
@ -1846,7 +1848,7 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
"SvyCod",
SvyCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_LABEL_End ();
HTM_TD_End ();
@ -2068,7 +2070,6 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Svy_Survey *Svy)
extern const char *Txt_Group;
extern const char *Txt_Groups;
extern const char *Txt_and;
extern const char *Txt_The_whole_course;
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumGrps;
@ -2096,7 +2097,7 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Svy_Survey *Svy)
row = mysql_fetch_row (mysql_res);
/* Write group type name and group name */
HTM_TxtF ("%s&nbsp;%s",row[0],row[1]);
HTM_TxtF ("%s %s",row[0],row[1]);
if (NumGrps >= 2)
{
@ -2109,8 +2110,7 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Svy_Survey *Svy)
}
}
else
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,
Gbl.Hierarchy.Node[Hie_CRS].ShrtName);
Grp_WriteTheWholeCourse ();
HTM_DIV_End ();
@ -3030,7 +3030,7 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
"class=\"LT\" style=\"width:%upx; height:20px;\"",BarWidth);
/***** Write the number of users *****/
HTM_TxtF ("&nbsp;%s",Title);
HTM_NBSPTxt (Title);
/***** Free string with the number of users *****/
free (Title);

View File

@ -313,7 +313,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
"value=\"Y\"%s onclick=\"togglecheckChildren(this,'ChkTag');\"",
Tags->All ? " checked=\"checked\"" :
"");
HTM_TxtF ("&nbsp;%s",Txt_All_tags);
HTM_NBSPTxt (Txt_All_tags);
HTM_LABEL_End ();
HTM_TD_End ();
@ -361,7 +361,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags,
row[1],
Checked ? " checked=\"checked\"" :
"");
HTM_TxtF ("&nbsp;%s",row[1]);
HTM_NBSPTxt (row[1]);
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -529,7 +529,7 @@ static void TstPrn_PutCheckBoxAllowTeachers (bool AllowTeachers)
"value=\"Y\"%s",
AllowTeachers ? " checked=\"checked\"" : // Teachers can see test exam
"");
HTM_TxtF ("&nbsp;%s",Txt_Allow_teachers_to_consult_this_test);
HTM_NBSPTxt (Txt_Allow_teachers_to_consult_this_test);
HTM_LABEL_End ();
HTM_DIV_End ();
}
@ -2260,9 +2260,9 @@ void TstPrn_ShowOnePrint (void)
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
ID_WriteUsrIDs (&Gbl.Usrs.Other.UsrDat,NULL);
HTM_TxtF ("&nbsp;%s",Gbl.Usrs.Other.UsrDat.Surname1);
HTM_SPTxt (Gbl.Usrs.Other.UsrDat.Surname1);
if (Gbl.Usrs.Other.UsrDat.Surname2[0])
HTM_TxtF ("&nbsp;%s",Gbl.Usrs.Other.UsrDat.Surname2);
HTM_SPTxt (Gbl.Usrs.Other.UsrDat.Surname2);
if (Gbl.Usrs.Other.UsrDat.FrstName[0])
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
HTM_BR ();

View File

@ -14111,7 +14111,7 @@ const char *Txt_FORUM_THREAD_ORDER[Dat_NUM_START_END_TIME] =
#elif L==9 // pt
"Primeira post"
#elif L==10 // tr
"First post" // Çeviri lazim!
"&Idot;lk posta"
#endif
,
[Dat_END_TIME] =
@ -14134,7 +14134,7 @@ const char *Txt_FORUM_THREAD_ORDER[Dat_NUM_START_END_TIME] =
#elif L==9 // pt
"&Uacute;ltima post"
#elif L==10 // tr
"Last post" // Çeviri lazim!
"Son posta"
#endif
};
@ -40816,7 +40816,7 @@ const char *Txt_Save_changes =
#elif L==9 // pt
"Salvar altera&ccedil;&otilde;es";
#elif L==10 // tr
"Save changes"; // Çeviri lazim!
"De&gbreve;i&scedil;iklikleri kaydet";
#endif
const char *Txt_Save_file_properties =

View File

@ -498,19 +498,19 @@ static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
case TmlNot_INS_DOC_PUB_FILE:
case TmlNot_INS_SHA_PUB_FILE:
/* Write location (institution) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s",
HTM_TxtF ("%s: %s",
Txt_HIERARCHY_SINGUL_Abc[Hie_INS],Hie[Hie_INS].ShrtName);
break;
case TmlNot_CTR_DOC_PUB_FILE:
case TmlNot_CTR_SHA_PUB_FILE:
/* Write location (center) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s",
HTM_TxtF ("%s: %s",
Txt_HIERARCHY_SINGUL_Abc[Hie_CTR],Hie[Hie_CTR].ShrtName);
break;
case TmlNot_DEG_DOC_PUB_FILE:
case TmlNot_DEG_SHA_PUB_FILE:
/* Write location (degree) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s",
HTM_TxtF ("%s: %s",
Txt_HIERARCHY_SINGUL_Abc[Hie_DEG],Hie[Hie_DEG].ShrtName);
break;
case TmlNot_CRS_DOC_PUB_FILE:
@ -518,12 +518,12 @@ static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
case TmlNot_CALL_FOR_EXAM:
case TmlNot_NOTICE:
/* Write location (course) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s",
HTM_TxtF ("%s: %s",
Txt_HIERARCHY_SINGUL_Abc[Hie_CRS],Hie[Hie_CRS].ShrtName);
break;
case TmlNot_FORUM_POST:
/* Write forum name */
HTM_TxtF ("%s:&nbsp;%s",Txt_Forum,ForumName);
HTM_TxtF ("%s: %s",Txt_Forum,ForumName);
break;
default:
break;
@ -692,7 +692,7 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
/* Icon and text */
Ico_PutIcon (Tml_Icons[Not->Type],Ico_BLACK,
Txt_TIMELINE_NOTE[Not->Type],"CONTEXT_ICOx16");
HTM_TxtF ("&nbsp;%s",Txt_TIMELINE_NOTE[Not->Type]);
HTM_NBSPTxt (Txt_TIMELINE_NOTE[Not->Type]);
/* End button */
HTM_BUTTON_End ();

View File

@ -715,7 +715,7 @@ void Usr_WriteFirstNameBRSurnames (const struct Usr_Data *UsrDat)
/***** Write surname2 if exists *****/
if (UsrDat->Surname2[0])
HTM_TxtF ("&nbsp;%s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
}
/*****************************************************************************/
@ -3671,7 +3671,7 @@ static void Set_FormToSelectUsrListType (void (*FuncPars) (void *Args),void *Arg
"");
Ico_PutIcon (Usr_IconsClassPhotoOrList[ListType],Ico_BLACK,
Txt_USR_LIST_TYPES[ListType],"ICO20x20");
HTM_TxtF ("&nbsp;%s",Txt_USR_LIST_TYPES[ListType]);
HTM_NBSPTxt (Txt_USR_LIST_TYPES[ListType]);
HTM_BUTTON_End ();
/***** End form *****/
@ -3756,10 +3756,13 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
/* Put list of users to select some of them */
HTM_TR_Begin (NULL);
HTM_TD_TxtColon (Txt_Users);
/* Label */
Frm_LabelColumn ("RT","Txt",Txt_Users);
/* Data */
HTM_TD_Begin ("class=\"LT FORM_IN_%s\"",
The_GetSuffix ());
HTM_TABLE_BeginCenterPadding (2);
HTM_TABLE_Begin ("TBL_SCROLL");
Usr_ListUsersToSelect (Rol_TCH,SelectedUsrs);
Usr_ListUsersToSelect (Rol_NET,SelectedUsrs);
Usr_ListUsersToSelect (Rol_STD,SelectedUsrs);
@ -4447,7 +4450,7 @@ void Usr_ListAllDataStds (void)
if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) // If current course tiene groups of este type
{
HTM_TH_Span_Begin (HTM_HEAD_LEFT,1,1,"BG_HIGHLIGHT");
HTM_TxtF ("%s&nbsp;%s",
HTM_TxtF ("%s %s",
Txt_Group,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
HTM_TH_End ();
@ -4753,8 +4756,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
Usr_SearchListUsrs (Role);
if ((NumUsrs = Gbl.Usrs.LstUsrs[Role].NumUsrs))
{
/***** Begin box and table *****/
/* Number of users found */
/***** Begin box with number of users found *****/
Sex = Usr_GetSexOfUsrsLst (Role);
if (asprintf (&Title,"%u %s",NumUsrs,
(Role == Rol_UNK) ? (NumUsrs == 1 ? Txt_user[Sex] :
@ -4762,65 +4764,67 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
(NumUsrs == 1 ? Txt_ROLES_SINGUL_abc[Role][Sex] :
Txt_ROLES_PLURAL_abc[Role][Sex])) < 0)
Err_NotEnoughMemoryExit ();
Box_BoxTableBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE);
free (Title);
/***** Heading row with column names *****/
Gbl.Usrs.Listing.WithPhotos = true;
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
/***** Heading row with column names *****/
Gbl.Usrs.Listing.WithPhotos = true;
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
/***** List data of users *****/
for (NumUsr = 0, The_ResetRowColor ();
NumUsr < NumUsrs;
NumUsr++, The_ChangeRowColor ())
{
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
/* Copy user's basic data from list */
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
/* Get list of user's IDs */
ID_GetListIDsFromUsrCod (&UsrDat);
/* Write data of this user */
Usr_WriteRowUsrMainData (NumUsr + 1,&UsrDat,false,Role,
&Gbl.Usrs.Selected);
/* Write all courses this user belongs to */
if (Role != Rol_GST && // Guests do not belong to any course
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only admins can view the courses
/***** List data of users *****/
for (NumUsr = 0, The_ResetRowColor ();
NumUsr < NumUsrs;
NumUsr++, The_ChangeRowColor ())
{
HTM_TR_Begin (NULL);
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
HTM_TD_Begin ("colspan=\"2\" class=\"%s\"",
The_GetColorRows ());
HTM_TD_End ();
/* Copy user's basic data from list */
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
HTM_TD_Begin ("colspan=\"%u\" class=\"%s\"",
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
The_GetColorRows ());
if (Role == Rol_UNK)
{
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TCH);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD);
}
else
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Role);
HTM_TD_End ();
/* Get list of user's IDs */
ID_GetListIDsFromUsrCod (&UsrDat);
HTM_TR_End ();
/* Write data of this user */
Usr_WriteRowUsrMainData (NumUsr + 1,&UsrDat,false,Role,
&Gbl.Usrs.Selected);
/* Write all courses this user belongs to */
if (Role != Rol_GST && // Guests do not belong to any course
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only admins can view the courses
{
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"2\" class=\"%s\"",
The_GetColorRows ());
HTM_TD_End ();
HTM_TD_Begin ("colspan=\"%u\" class=\"%s\"",
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
The_GetColorRows ());
if (Role == Rol_UNK)
{
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TCH);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET);
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD);
}
else
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Role);
HTM_TD_End ();
HTM_TR_End ();
}
}
}
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
/***** End table and box *****/
Box_BoxTableEnd ();
HTM_TABLE_End ();
Box_BoxEnd ();
}
/***** Free memory for teachers list *****/
@ -4932,7 +4936,7 @@ void Usr_ListDataAdms (void)
HTM_DIV_End ();
/***** Heading row with column names *****/
HTM_TABLE_Begin (NULL);
HTM_TABLE_Begin ("TBL_SCROLL");
HTM_TR_Begin (NULL);
for (NumCol = 0;
@ -5087,7 +5091,7 @@ void Usr_SeeGuests (void)
Frm_BeginForm (ActDoActOnSevGst);
/* Begin table */
HTM_TABLE_BeginWide ();
HTM_TABLE_Begin ("TBL_SCROLL");
/* Draw the classphoto/list */
switch (Gbl.Usrs.Me.ListType)
@ -5241,7 +5245,7 @@ void Usr_SeeStudents (void)
}
/* Begin table */
HTM_TABLE_BeginWide ();
HTM_TABLE_Begin ("TBL_SCROLL");
/* Draw the classphoto/list */
switch (Gbl.Usrs.Me.ListType)
@ -5408,7 +5412,7 @@ void Usr_SeeTeachers (void)
}
/* Begin table */
HTM_TABLE_BeginWide ();
HTM_TABLE_Begin ("TBL_SCROLL");
/***** Draw the classphoto/list *****/
switch (Gbl.Usrs.Me.ListType)
@ -6450,7 +6454,7 @@ void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows)
HTM_BR ();
HTM_Txt (UsrDat->Surname1);
if (UsrDat->Surname2[0])
HTM_TxtF ("&nbsp;%s",UsrDat->Surname2);
HTM_SPTxt (UsrDat->Surname2);
if (UsrDat->FrstName[0])
{
HTM_Comma ();

View File

@ -540,7 +540,9 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL,
URL,FileName);
HTM_IMG (CfG_URL_ICON_FILEXT_PUBLIC "32x32","zip32x32.gif",Txt_ZIP_file,
"class=\"ICO40x40\"");
HTM_TxtF ("&nbsp;%s&nbsp;",FileName);
HTM_NBSP ();
HTM_Txt (FileName);
HTM_NBSP ();
Ico_PutIcon ("download.svg",Ico_BLACK,Txt_Download,"ICO40x40");
HTM_A_End ();
HTM_TD_End ();