Version 16.104

This commit is contained in:
Antonio Cañas Vargas 2016-12-19 00:55:24 +01:00
parent 00c89519bc
commit ca8d9b0f8b
11 changed files with 82 additions and 104 deletions

View File

@ -33,7 +33,6 @@ body
input
{
font-size:12pt;
vertical-align:middle;
}
select
{
@ -1758,20 +1757,13 @@ a:hover img.CENTRE_PHOTO_SHOW
/*********************************** Lists ***********************************/
.LIST_LEFT
{
display:inline-block;
list-style-type:none;
padding:0;
margin:0;
text-align:left;
vertical-align:middle;
}
.LIST_CENTER
{
list-style-type:none;
padding:0;
margin:0 auto;
text-align:center;
vertical-align:middle;
}
/*****************************************************************************/

View File

@ -187,13 +187,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.103.7 (2016-12-18)"
#define CSS_FILE "swad16.103.1.css"
#define Log_PLATFORM_VERSION "SWAD 16.104 (2016-12-19)"
#define CSS_FILE "swad16.104.css"
#define JS_FILE "swad16.101.js"
// 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
/*
Version 16.104: Dec 19, 2016 Change in checkbox to confirm that I have read a course info.
Changes in layout of lists. (211183 lines)
Version 16.103.7: Dec 18, 2016 Change in checkbox to force students to read couse info. (211206 lines)
Version 16.103.6: Dec 18, 2016 Some div elements changed to header, footer, aside and nav elements. (211212 lines)
Version 16.103.5: Dec 17, 2016 Code refactoring in user enrollment. (211207 lines)

View File

@ -117,8 +117,7 @@ void Cht_ShowListOfAvailableChatRooms (void)
/***** Table start *****/
Lay_StartRoundFrame (NULL,Txt_Chat_rooms,NULL,NULL);
fprintf (Gbl.F.Out,"<div style=\"display:inline-block; margin:0 auto;\">"
"<ul class=\"LIST_LEFT\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
/***** Title of top level *****/
fprintf (Gbl.F.Out,"<li class=\"DAT\" style=\"height:25px;\">"
@ -227,8 +226,7 @@ void Cht_ShowListOfAvailableChatRooms (void)
}
/***** End table *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
Lay_EndRoundFrame ();
}

View File

@ -545,8 +545,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Table start *****/
Lay_StartRoundFrame (NULL,Txt_My_courses,NULL,Hlp_PROFILE_Courses);
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<ul class=\"LIST_LEFT\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
/***** Write link to platform *****/
Highlight = (Gbl.CurrentCty.Cty.CtyCod <= 0);
@ -789,8 +788,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
DB_FreeMySQLResult (&mysql_resCty);
/***** End frame *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
Lay_EndRoundFrame ();
}

View File

@ -871,9 +871,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
}
/***** Start list of options *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"display:inline-block; margin:12px;\">"
"<ul class=\"LIST_LEFT %s\">",
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT %s\" style=\"margin:12px;\">",
The_ClassForm[Gbl.Prefs.Theme]);
/***** Register user in course / Modify user's data *****/
@ -1084,8 +1082,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
}
/***** End list of options *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
return (NumOptionsShown ? true :
false);
@ -1105,9 +1102,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void)
extern const char *Txt_Eliminate_from_the_platform_the_users_indicated_in_step_1;
/***** Start list of options *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"display:inline-block;\">"
"<ul class=\"LIST_LEFT %s\">",
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT %s\" style=\"margin:12px;\">",
The_ClassForm[Gbl.Prefs.Theme]);
/***** Register / remove users listed or not listed *****/
@ -1142,8 +1137,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void)
Txt_Eliminate_from_the_platform_the_users_indicated_in_step_1);
/***** End list of options *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
}
/*****************************************************************************/

View File

@ -3861,9 +3861,6 @@ static void Brw_WriteSubtitleOfFileBrowser (void)
extern const char *Txt_nobody_else_can_access_this_content;
char Subtitle[1024];
/***** Container start *****/
fprintf (Gbl.F.Out,"<div style=\"margin:0 auto;\">");
/***** Form to change zone (course and group browsers) *****/
switch (Gbl.FileBrowser.Type)
{
@ -3981,11 +3978,8 @@ static void Brw_WriteSubtitleOfFileBrowser (void)
return;
}
if (Subtitle[0])
fprintf (Gbl.F.Out,"<span class=\"BROWSER_SUBTITLE\">%s</span>",
fprintf (Gbl.F.Out,"<div class=\"BROWSER_SUBTITLE\">%s</div>",
Subtitle);
/***** Container end *****/
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/

View File

@ -981,9 +981,7 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject)
For_PutFormWhichForums ();
/* Write a link to top level of forums */
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"display:inline-block;\">"
"<ul class=\"LIST_LEFT\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
For_WriteLinkToTopLevelOfForums ();
/* Write a link to current forum */
@ -1021,8 +1019,7 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject)
For_WriteNumPsts (NumPsts);
fprintf (Gbl.F.Out,"</li>"
"</ul>"
"</div>");
"</ul>");
Lay_EndRoundFrame ();
LastSubject[0] = '\0';
@ -1751,9 +1748,7 @@ void For_ShowForumList (void)
For_PutFormWhichForums ();
/***** Write a link to top level of forums *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"display:inline-block;\">"
"<ul class=\"LIST_LEFT\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
For_WriteLinkToTopLevelOfForums ();
/***** Links to global forums *****/
@ -1870,8 +1865,7 @@ void For_ShowForumList (void)
}
/***** End table *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
Lay_EndRoundFrame ();
}
@ -1889,8 +1883,8 @@ static void For_PutFormWhichForums (void)
Act_FormStart (ActSeeFor);
For_PutParamForumOrder ();
For_PutParamsForumInsDegCrs ();
fprintf (Gbl.F.Out,"<div style=\"margin:12px 0;\">"
"<ul class=\"LIST_CENTER\">");
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<ul class=\"LIST_LEFT\" style=\"margin:12px;\">");
for (WhichForums = (For_WhichForums_t) 0;
WhichForums < For_NUM_WHICH_FORUMS;
@ -2609,9 +2603,7 @@ void For_ShowForumThrs (void)
For_PutFormWhichForums ();
/* Write a link to top level of forums */
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"display:inline-block;\">"
"<ul class=\"LIST_LEFT\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
For_WriteLinkToTopLevelOfForums ();
/* Write a link to current forum */
@ -2619,8 +2611,7 @@ void For_ShowForumThrs (void)
For_WriteLinkToAForum (Gbl.Forum.ForumType,true,1,IsLastItemInLevel);
/* End table */
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
Lay_EndRoundFrame ();
/***** List the threads *****/

View File

@ -299,7 +299,7 @@ extern const char *Hlp_ASSESSMENT_System_edit;
static void Inf_PutButtonToEditInfo (void);
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead);
static void Inf_PutFormToConfirmIHaveReadInfo (void);
static void Inf_PutCheckboxConfirmIHaveReadInfo (void);
static bool Inf_CheckIfIHaveReadInfo (void);
static bool Inf_GetMustBeReadFromForm (void);
static bool Inf_GetIfIHaveReadFromForm (void);
@ -377,7 +377,11 @@ void Inf_ShowInfo (void)
case Rol_STUDENT:
/* Put checkbox to force students to read this couse info */
if (MustBeRead)
Inf_PutFormToConfirmIHaveReadInfo ();
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Inf_PutCheckboxConfirmIHaveReadInfo ();
fprintf (Gbl.F.Out,"</div>");
}
break;
case Rol_TEACHER:
case Rol_SYS_ADM:
@ -487,28 +491,19 @@ static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead)
}
/*****************************************************************************/
/***** Put a form (checkbox) to confirm that I have read a course info *******/
/********** Put a form (checkbox) to force students to read info *************/
/*****************************************************************************/
static void Inf_PutFormToConfirmIHaveReadInfo (void)
static void Inf_PutCheckboxConfirmIHaveReadInfo (void)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_I_have_read_this_information;
bool IHaveRead = Inf_CheckIfIHaveReadInfo ();
fprintf (Gbl.F.Out,"<div class=\"%s CENTER_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme]);
Act_FormStart (Inf_ActionsIHaveReadInfo[Gbl.CurrentCrs.Info.Type]);
fprintf (Gbl.F.Out,"<input type=\"checkbox\"");
if (IHaveRead)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," name=\"IHaveRead\" value=\"Y\""
" onchange=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,
Txt_I_have_read_this_information);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
Lay_PutContextualCheckbox (Inf_ActionsIHaveReadInfo[Gbl.CurrentCrs.Info.Type],
NULL,
"IHaveRead",IHaveRead,
Txt_I_have_read_this_information,
Txt_I_have_read_this_information);
}
/*****************************************************************************/
@ -582,19 +577,20 @@ bool Inf_GetIfIMustReadAnyCrsInfoInThisCrs (void)
void Inf_WriteMsgYouMustReadInfo (void)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_You_should_read_the_following_information_on_the_course_X;
extern const char *Txt_Required_reading;
extern const char *Txt_You_should_read_the_following_information;
Inf_InfoType_t InfoType;
/***** Start of frame *****/
Lay_StartRoundFrame (NULL,Txt_Required_reading,NULL,NULL);
/***** Write message *****/
sprintf (Gbl.Message,Txt_You_should_read_the_following_information_on_the_course_X,
Gbl.CurrentCrs.Crs.FullName);
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
Lay_ShowAlert (Lay_WARNING,Txt_You_should_read_the_following_information);
/***** Write every information I must read *****/
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
"<tr>"
"<td class=\"LEFT_MIDDLE\">"
"<ul>");
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<ul class=\"LIST_LEFT\""
" style=\"list-style-type:initial;\">");
for (InfoType = (Inf_InfoType_t) 0;
InfoType < Inf_NUM_INFO_TYPES;
InfoType++)
@ -611,9 +607,10 @@ void Inf_WriteMsgYouMustReadInfo (void)
fprintf (Gbl.F.Out,"</li>");
}
fprintf (Gbl.F.Out,"</ul>"
"</td>"
"</tr>"
"</table>");
"</div>");
/***** End of frame *****/
Lay_EndRoundFrame ();
}
/*****************************************************************************/

View File

@ -136,8 +136,8 @@ void Syl_PutFormWhichSyllabus (void)
/***** Form to select which forums I want to see
(all my forums or only the forums of current institution/degree/course) *****/
Act_FormStart (ActSeeSyl);
fprintf (Gbl.F.Out,"<div style=\"margin:12px auto;\">"
"<ul class=\"LIST_CENTER\">");
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<ul class=\"LIST_LEFT\" style=\"margin:12px;\">");
for (WhichSyllabus = (Syl_WhichSyllabus_t) 0;
WhichSyllabus < For_NUM_WHICH_FORUMS;

View File

@ -99,7 +99,7 @@ void Tab_DrawTabs (void)
/***** Start tabs container *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"<nav id=\"tabs\">"
"<ul class=\"LIST_CENTER\">",
"<ul class=\"LIST_LEFT\">",
ClassHeadRow3[Gbl.Prefs.Theme]);
/***** Draw the tabs *****/

View File

@ -31638,6 +31638,27 @@ const char *Txt_Requester =
"Requerente";
#endif
const char *Txt_Required_reading =
#if L==1
"Lectura obligat&ograve;ria";
#elif L==2
"Erforderliches Lesen";
#elif L==3
"Required reading";
#elif L==4
"Lectura obligatoria";
#elif L==5
"Lecture obligatoire";
#elif L==6
"Lectura obligatoria"; // Okoteve traducción
#elif L==7
"Lettura obbligatoria";
#elif L==8
"Obowi&aogon;zkowa lektura";
#elif L==9
"Leitura obrigat&oacute;ria";
#endif
const char *Txt_Reset =
#if L==1
"Posar a zero";
@ -54828,34 +54849,25 @@ const char *Txt_You_need_an_XML_file_containing_a_list_of_questions =
" containing a list of questions."; // Necessita de tradução
#endif
const char *Txt_You_should_read_the_following_information_on_the_course_X = // Warning: it is very important to include %s in the following sentences
const char *Txt_You_should_read_the_following_information =
#if L==1
"Usted debe leer la siguiente informaci&oacute;n"
" sobre la asignatura <strong>%s</strong>:"; // Necessita traduccio
"Vost&egrave; ha de llegir la seg%uuml;ent informaci&oacute;:";
#elif L==2
"You should read the following information"
" on the course <strong>%s</strong>:"; // Need Übersetzung
"Sie sollten die folgenden Informationen lesen:";
#elif L==3
"You should read the following information"
" on the course <strong>%s</strong>:";
"You should read the following information:";
#elif L==4
"Usted debe leer la siguiente informaci&oacute;n"
" sobre la asignatura <strong>%s</strong>:";
"Debe leer la siguiente informaci&oacute;n:";
#elif L==5
"You should read the following information"
" on the course <strong>%s</strong>:"; // Besoin de traduction
"Vous devez lire les informations suivantes:";
#elif L==6
"Usted debe leer la siguiente informaci&oacute;n"
" sobre la asignatura <strong>%s</strong>:"; // Okoteve traducción
"Debe leer la siguiente informaci&oacute;n:"; // Okoteve traducción
#elif L==7
"Dovresti leggere le seguenti informazioni"
" sul corso <strong>%s</strong>:";
"Dovresti leggere le seguenti informazioni:";
#elif L==8
"You should read the following information"
" on the course <strong>%s</strong>:"; // Potrzebujesz tlumaczenie
"Nale&zdot;y przeczyta&cacute; nast&eogon;puj&aogon;ce informacje:";
#elif L==9
"You should read the following information"
" on the course <strong>%s</strong>:"; // Necessita de tradução
"Voc&ecirc; deve ler as seguintes informa&ccedil;&otilde;es:";
#endif
const char *Txt_You_were_already_enrolled_as_X_in_the_course_Y = // Warning: it is very important to include two %s in the following sentences