Version 16.56.2

This commit is contained in:
Antonio Cañas Vargas 2016-11-13 20:54:06 +01:00
parent 1568e5b965
commit a369485712
8 changed files with 33 additions and 30 deletions

View File

@ -156,13 +156,15 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.56 (2016-11-13)" #define Log_PLATFORM_VERSION "SWAD 16.56.2 (2016-11-13)"
#define CSS_FILE "swad16.51.css" #define CSS_FILE "swad16.51.css"
#define JS_FILE "swad16.46.1.js" #define JS_FILE "swad16.46.1.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/* /*
Version 16.56.2: Nov 13, 2016 Contextual help on groups. (206938 lines)
Version 16.56.1: Nov 13, 2016 Code refactoring and changes in layout related with titles. (206923 lines)
Version 16.56: Nov 13, 2016 Contextual help on tests. Version 16.56: Nov 13, 2016 Contextual help on tests.
Change in layout of test import. (206935 lines) Change in layout of test import. (206935 lines)
Version 16.55: Nov 13, 2016 Contextual help on file zones. (206912 lines) Version 16.55: Nov 13, 2016 Contextual help on file zones. (206912 lines)

View File

@ -227,6 +227,7 @@ static void Grp_EditGroups (void)
static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction) static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Groups; extern const char *Txt_Groups;
@ -244,7 +245,7 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
Lay_StartRoundFrame (NULL,Txt_Groups, Lay_StartRoundFrame (NULL,Txt_Groups,
ICanEdit ? Grp_PutIconToEditGroups : ICanEdit ? Grp_PutIconToEditGroups :
NULL, NULL,
NULL); Hlp_USERS_Groups);
/***** Start form to update the students listed /***** Start form to update the students listed
depending on the groups selected *****/ depending on the groups selected *****/
@ -1123,6 +1124,7 @@ static void Grp_AddUsrToGroup (struct UsrData *UsrDat,long GrpCod)
static void Grp_ListGroupTypesForEdition (void) static void Grp_ListGroupTypesForEdition (void)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_Types_of_group; extern const char *Txt_Types_of_group;
extern const char *Txt_It_is_optional_to_choose_a_group; extern const char *Txt_It_is_optional_to_choose_a_group;
extern const char *Txt_It_is_mandatory_to_choose_a_group; extern const char *Txt_It_is_mandatory_to_choose_a_group;
@ -1135,7 +1137,8 @@ static void Grp_ListGroupTypesForEdition (void)
char Id[32]; char Id[32];
/***** Write heading *****/ /***** Write heading *****/
Lay_StartRoundFrameTable (NULL,2,Txt_Types_of_group); Lay_StartRoundFrame (NULL,Txt_Types_of_group,NULL,Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">");
Grp_WriteHeadingGroupTypes (); Grp_WriteHeadingGroupTypes ();
/***** List group types with forms for edition *****/ /***** List group types with forms for edition *****/
@ -1296,6 +1299,7 @@ static void Grp_WriteHeadingGroupTypes (void)
static void Grp_ListGroupsForEdition (void) static void Grp_ListGroupsForEdition (void)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_Groups; extern const char *Txt_Groups;
extern const char *Txt_Group_X_open_click_to_close_it; extern const char *Txt_Group_X_open_click_to_close_it;
extern const char *Txt_Group_X_closed_click_to_open_it; extern const char *Txt_Group_X_closed_click_to_open_it;
@ -1309,7 +1313,8 @@ static void Grp_ListGroupsForEdition (void)
struct Group *Grp; struct Group *Grp;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartRoundFrameTable (NULL,2,Txt_Groups); Lay_StartRoundFrame (NULL,Txt_Groups,NULL,Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">");
Grp_WriteHeadingGroups (); Grp_WriteHeadingGroups ();
/***** List the groups *****/ /***** List the groups *****/
@ -1546,6 +1551,7 @@ void Grp_ReqRegisterInGrps (void)
void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents) void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_My_groups; extern const char *Txt_My_groups;
extern const char *Txt_Change_my_groups; extern const char *Txt_Change_my_groups;
extern const char *Txt_Enroll_in_groups; extern const char *Txt_Enroll_in_groups;
@ -1572,7 +1578,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
Lay_StartRoundFrame (NULL,Txt_My_groups, Lay_StartRoundFrame (NULL,Txt_My_groups,
ICanEdit ? Grp_PutIconToEditGroups : ICanEdit ? Grp_PutIconToEditGroups :
NULL, NULL,
NULL); Hlp_USERS_Groups);
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups
{ {
@ -1747,6 +1753,7 @@ static unsigned Grp_ListGrpsForChange (struct GroupType *GrpTyp)
void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod) void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_Groups; extern const char *Txt_Groups;
unsigned NumGrpTyp; unsigned NumGrpTyp;
@ -1754,7 +1761,8 @@ void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod)
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Start table *****/ /***** Start table *****/
Lay_StartRoundFrameTable (NULL,0,Txt_Groups); Lay_StartRoundFrame (NULL,Txt_Groups,NULL,Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE\">");
/***** List to select the groups the user belongs to *****/ /***** List to select the groups the user belongs to *****/
for (NumGrpTyp = 0; for (NumGrpTyp = 0;
@ -2064,6 +2072,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
static void Grp_PutFormToCreateGroupType (void) static void Grp_PutFormToCreateGroupType (void)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_New_type_of_group; extern const char *Txt_New_type_of_group;
extern const char *Txt_It_is_optional_to_choose_a_group; extern const char *Txt_It_is_optional_to_choose_a_group;
extern const char *Txt_It_is_mandatory_to_choose_a_group; extern const char *Txt_It_is_mandatory_to_choose_a_group;
@ -2077,7 +2086,8 @@ static void Grp_PutFormToCreateGroupType (void)
Act_FormStart (ActNewGrpTyp); Act_FormStart (ActNewGrpTyp);
/***** Start of frame *****/ /***** Start of frame *****/
Lay_StartRoundFrameTable (NULL,2,Txt_New_type_of_group); Lay_StartRoundFrame (NULL,Txt_New_type_of_group,NULL,Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">");
/***** Write heading *****/ /***** Write heading *****/
Grp_WriteHeadingGroupTypes (); Grp_WriteHeadingGroupTypes ();
@ -2174,6 +2184,7 @@ static void Grp_PutFormToCreateGroupType (void)
static void Grp_PutFormToCreateGroup (void) static void Grp_PutFormToCreateGroup (void)
{ {
extern const char *Hlp_USERS_Groups;
extern const char *Txt_New_group; extern const char *Txt_New_group;
extern const char *Txt_Group_closed; extern const char *Txt_Group_closed;
extern const char *Txt_File_zones_disabled; extern const char *Txt_File_zones_disabled;
@ -2184,7 +2195,8 @@ static void Grp_PutFormToCreateGroup (void)
Act_FormStart (ActNewGrp); Act_FormStart (ActNewGrp);
/***** Start of frame *****/ /***** Start of frame *****/
Lay_StartRoundFrameTable (NULL,2,Txt_New_group); Lay_StartRoundFrame (NULL,Txt_New_group,NULL,Hlp_USERS_Groups);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">");
/***** Write heading *****/ /***** Write heading *****/
Grp_WriteHeadingGroups (); Grp_WriteHeadingGroups ();

View File

@ -89,6 +89,10 @@ const char *Hlp_ASSESSMENT_Tests = WIKI "ASSESSMENT.Tests";
const char *Hlp_ASSESSMENT_Marks = WIKI "ASSESSMENT.Marks"; const char *Hlp_ASSESSMENT_Marks = WIKI "ASSESSMENT.Marks";
/***** USERS tab *****/
const char *Hlp_USERS_Groups = WIKI "USERS.Groups";
/***** STATS tab *****/ /***** STATS tab *****/
const char *Hlp_STATS_Surveys = WIKI "STATS.Surveys"; const char *Hlp_STATS_Surveys = WIKI "STATS.Surveys";

View File

@ -1219,18 +1219,6 @@ void Lay_PutRemoveButtonInline (const char *Text)
Text); Text);
} }
/*****************************************************************************/
/************ Write a centered message with the title of a table *************/
/*****************************************************************************/
void Lay_WriteTitle (const char *Title)
{
fprintf (Gbl.F.Out,"<div class=\"TIT\">"
"%s"
"</div>",
Title);
}
/*****************************************************************************/ /*****************************************************************************/
/****************** Start and end a table with rounded frame *****************/ /****************** Start and end a table with rounded frame *****************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -69,7 +69,6 @@ typedef enum
/*****************************************************************************/ /*****************************************************************************/
void Lay_WriteStartOfPage (void); void Lay_WriteStartOfPage (void);
void Lay_WriteTitle (const char *Title);
void Lay_PutContextualLink (Act_Action_t NextAction, void Lay_PutContextualLink (Act_Action_t NextAction,
void (*FuncParams) (), void (*FuncParams) (),

View File

@ -3340,14 +3340,12 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat,
static void Rec_WriteLinkToDataProtectionClause (void) static void Rec_WriteLinkToDataProtectionClause (void)
{ {
extern const char *Txt_DATA_PROTECTION_CLAUSE; extern const char *Txt_DATA_PROTECTION_CLAUSE;
char Title[1024];
sprintf (Title,"<div class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<a href=\"%s/%s/\" target=\"_blank\">%s</a>" "<a class=\"TIT\" href=\"%s/%s/\" target=\"_blank\">%s</a>"
"</div>", "</div>",
Cfg_URL_SWAD_PUBLIC,Cfg_DATA_PROTECTION_FOLDER, Cfg_URL_SWAD_PUBLIC,Cfg_DATA_PROTECTION_FOLDER,
Txt_DATA_PROTECTION_CLAUSE); Txt_DATA_PROTECTION_CLAUSE);
Lay_WriteTitle (Title);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -509,11 +509,11 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
Lay_StartRoundFrame (NULL,Txt_Imported_questions,NULL,Hlp_ASSESSMENT_Tests); Lay_StartRoundFrame (NULL,Txt_Imported_questions,NULL,Hlp_ASSESSMENT_Tests);
/***** Print XML tree *****/ /***** Print XML tree *****/
Lay_WriteTitle (Txt_XML_file_content);
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\"" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"padding-bottom:20px;\">" " style=\"padding-bottom:20px;\">"
"<textarea cols=\"60\" rows=\"5\"" "<textarea title=\"%s\" cols=\"60\" rows=\"5\""
" spellcheck=\"false\" readonly>"); " spellcheck=\"false\" readonly>",
Txt_XML_file_content);
XML_PrintTree (RootElem); XML_PrintTree (RootElem);
fprintf (Gbl.F.Out,"</textarea>" fprintf (Gbl.F.Out,"</textarea>"
"</div>"); "</div>");

View File

@ -741,7 +741,7 @@ static void TT_CreatTimeTableFromDB (long UsrCod)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
if (TimeTableIsIncomplete) if (TimeTableIsIncomplete)
Lay_WriteTitle (Txt_Incomplete_timetable_for_lack_of_space); Lay_ShowAlert (Lay_INFO,Txt_Incomplete_timetable_for_lack_of_space);
} }
/*****************************************************************************/ /*****************************************************************************/