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 input
{ {
font-size:12pt; font-size:12pt;
vertical-align:middle;
} }
select select
{ {
@ -1758,20 +1757,13 @@ a:hover img.CENTRE_PHOTO_SHOW
/*********************************** Lists ***********************************/ /*********************************** Lists ***********************************/
.LIST_LEFT .LIST_LEFT
{ {
display:inline-block;
list-style-type:none; list-style-type:none;
padding:0; padding:0;
margin:0; margin:0;
text-align:left; text-align:left;
vertical-align:middle; 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 *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.103.7 (2016-12-18)" #define Log_PLATFORM_VERSION "SWAD 16.104 (2016-12-19)"
#define CSS_FILE "swad16.103.1.css" #define CSS_FILE "swad16.104.css"
#define JS_FILE "swad16.101.js" #define JS_FILE "swad16.101.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.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.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.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) 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 *****/ /***** Table start *****/
Lay_StartRoundFrame (NULL,Txt_Chat_rooms,NULL,NULL); Lay_StartRoundFrame (NULL,Txt_Chat_rooms,NULL,NULL);
fprintf (Gbl.F.Out,"<div style=\"display:inline-block; margin:0 auto;\">" fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
"<ul class=\"LIST_LEFT\">");
/***** Title of top level *****/ /***** Title of top level *****/
fprintf (Gbl.F.Out,"<li class=\"DAT\" style=\"height:25px;\">" fprintf (Gbl.F.Out,"<li class=\"DAT\" style=\"height:25px;\">"
@ -227,8 +226,7 @@ void Cht_ShowListOfAvailableChatRooms (void)
} }
/***** End table *****/ /***** End table *****/
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>");
Lay_EndRoundFrame (); Lay_EndRoundFrame ();
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31638,6 +31638,27 @@ const char *Txt_Requester =
"Requerente"; "Requerente";
#endif #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 = const char *Txt_Reset =
#if L==1 #if L==1
"Posar a zero"; "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 " containing a list of questions."; // Necessita de tradução
#endif #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 #if L==1
"Usted debe leer la siguiente informaci&oacute;n" "Vost&egrave; ha de llegir la seg%uuml;ent informaci&oacute;:";
" sobre la asignatura <strong>%s</strong>:"; // Necessita traduccio
#elif L==2 #elif L==2
"You should read the following information" "Sie sollten die folgenden Informationen lesen:";
" on the course <strong>%s</strong>:"; // Need Übersetzung
#elif L==3 #elif L==3
"You should read the following information" "You should read the following information:";
" on the course <strong>%s</strong>:";
#elif L==4 #elif L==4
"Usted debe leer la siguiente informaci&oacute;n" "Debe leer la siguiente informaci&oacute;n:";
" sobre la asignatura <strong>%s</strong>:";
#elif L==5 #elif L==5
"You should read the following information" "Vous devez lire les informations suivantes:";
" on the course <strong>%s</strong>:"; // Besoin de traduction
#elif L==6 #elif L==6
"Usted debe leer la siguiente informaci&oacute;n" "Debe leer la siguiente informaci&oacute;n:"; // Okoteve traducción
" sobre la asignatura <strong>%s</strong>:"; // Okoteve traducción
#elif L==7 #elif L==7
"Dovresti leggere le seguenti informazioni" "Dovresti leggere le seguenti informazioni:";
" sul corso <strong>%s</strong>:";
#elif L==8 #elif L==8
"You should read the following information" "Nale&zdot;y przeczyta&cacute; nast&eogon;puj&aogon;ce informacje:";
" on the course <strong>%s</strong>:"; // Potrzebujesz tlumaczenie
#elif L==9 #elif L==9
"You should read the following information" "Voc&ecirc; deve ler as seguintes informa&ccedil;&otilde;es:";
" on the course <strong>%s</strong>:"; // Necessita de tradução
#endif #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 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