diff --git a/swad_changelog.h b/swad_changelog.h index 6617f7485..1a1a080b7 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -182,21 +182,19 @@ // TODO: Fix bug in notification content about files sent to plugins like SWADroid: do not write internal name (for example "comun"). Call instead Brw_GetFileNameToShow or similar. // TODO: Draw future dates in attendance, surveys, assignments in blue? -// TODO: change checkbox "Obligar a los estudiantes a leer esta información" - -// TODO: Fix bug: after registering a teacher in a course in USERS > Teachers, the confirmation is displayed in USERS > Others. /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.103.6 (2016-12-18)" +#define Log_PLATFORM_VERSION "SWAD 16.103.7 (2016-12-18)" #define CSS_FILE "swad16.103.1.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.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) Version 16.103.4: Dec 17, 2016 Code refactoring in user enrollment. (211170 lines) diff --git a/swad_info.c b/swad_info.c index 4f04433fc..d8ec477db 100644 --- a/swad_info.c +++ b/swad_info.c @@ -298,7 +298,7 @@ extern const char *Hlp_ASSESSMENT_System_edit; /*****************************************************************************/ static void Inf_PutButtonToEditInfo (void); -static void Inf_PutFormToForceStdsToReadInfo (bool MustBeRead); +static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead); static void Inf_PutFormToConfirmIHaveReadInfo (void); static bool Inf_CheckIfIHaveReadInfo (void); static bool Inf_GetMustBeReadFromForm (void); @@ -383,7 +383,11 @@ void Inf_ShowInfo (void) case Rol_SYS_ADM: /* Put checkbox to force students to read this couse info */ if (InfoSrc != Inf_INFO_SRC_NONE) - Inf_PutFormToForceStdsToReadInfo (MustBeRead); + { + fprintf (Gbl.F.Out,"
"); + Inf_PutCheckboxForceStdsToReadInfo (MustBeRead); + fprintf (Gbl.F.Out,"
"); + } break; default: break; @@ -471,24 +475,15 @@ void Inf_PutIconToEditInfo (void) /********** Put a form (checkbox) to force students to read info *************/ /*****************************************************************************/ -static void Inf_PutFormToForceStdsToReadInfo (bool MustBeRead) +static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead) { - extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_Force_students_to_read_this_information; - fprintf (Gbl.F.Out,"
", - The_ClassForm[Gbl.Prefs.Theme]); - Act_FormStart (Inf_ActionsChangeForceReadInfo[Gbl.CurrentCrs.Info.Type]); - fprintf (Gbl.F.Out,"" - " %s", - Gbl.Form.Id, - Txt_Force_students_to_read_this_information); - Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); + Lay_PutContextualCheckbox (Inf_ActionsChangeForceReadInfo[Gbl.CurrentCrs.Info.Type], + NULL, + "MustBeRead",MustBeRead, + Txt_Force_students_to_read_this_information, + Txt_Force_students_to_read_this_information); } /*****************************************************************************/