Version 16.103.7

This commit is contained in:
Antonio Cañas Vargas 2016-12-18 20:10:37 +01:00
parent 8f85e08e98
commit 00c89519bc
2 changed files with 14 additions and 21 deletions

View File

@ -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)

View File

@ -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,"<div class=\"CONTEXT_MENU\">");
Inf_PutCheckboxForceStdsToReadInfo (MustBeRead);
fprintf (Gbl.F.Out,"</div>");
}
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,"<div class=\"%s CENTER_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme]);
Act_FormStart (Inf_ActionsChangeForceReadInfo[Gbl.CurrentCrs.Info.Type]);
fprintf (Gbl.F.Out,"<input type=\"checkbox\"");
if (MustBeRead)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," name=\"MustBeRead\" value=\"Y\""
" onchange=\"document.getElementById('%s').submit();\" />"
" %s",
Gbl.Form.Id,
Txt_Force_students_to_read_this_information);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
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);
}
/*****************************************************************************/