Version 17.5.7

This commit is contained in:
Antonio Cañas Vargas 2017-09-21 21:58:14 +02:00
parent 6d3322da24
commit d3b9484bfe
5 changed files with 26 additions and 9 deletions

View File

@ -252,13 +252,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 17.5.6 (2017-09-21)"
#define Log_PLATFORM_VERSION "SWAD 17.5.7 (2017-09-21)"
#define CSS_FILE "swad17.0.css"
#define JS_FILE "swad16.206.3.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 17.5.7: Sep 21, 2017 Selector for department in edition of a project. (230363 lines)
Version 17.5.6: Sep 21, 2017 Added evaluators to projects. (230347 lines)
Version 17.5.5: Sep 21, 2017 Changes in listing and edition of projects. (230318 lines)
Version 17.5.4: Sep 21, 2017 Added field in projects for department. (230304 lines)

View File

@ -1130,7 +1130,7 @@ unsigned Dpt_GetNumDptsInIns (long InsCod)
/*********************** Put selector for department *************************/
/*****************************************************************************/
void Dpt_WriteSelectorDepartment (long InsCod)
void Dpt_WriteSelectorDepartment (long InsCod,bool SubmitFormOnChange)
{
extern const char *Txt_Any_department;
unsigned NumDpt;
@ -1141,9 +1141,11 @@ void Dpt_WriteSelectorDepartment (long InsCod)
/* List departments */
fprintf (Gbl.F.Out,"<select id=\"DptCod\" name=\"DptCod\""
" style=\"width:375px;\""
" onchange=\"document.getElementById('%s').submit();\">",
Gbl.Form.Id);
" style=\"width:375px;\"");
if (SubmitFormOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">");
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Stat.DptCod == -1L)

View File

@ -71,6 +71,6 @@ void Dpt_RecFormNewDpt (void);
unsigned Dpt_GetTotalNumberOfDepartments (void);
unsigned Dpt_GetNumDptsInIns (long InsCod);
void Dpt_WriteSelectorDepartment (long InsCod);
void Dpt_WriteSelectorDepartment (long InsCod,bool SubmitFormOnChange);
#endif

View File

@ -147,7 +147,8 @@ void Ind_ReqIndicatorsCourses (void)
"</td>"
"<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (-1L);
Dpt_WriteSelectorDepartment (-1L, // All institutions
true); // Don't submit on change
fprintf (Gbl.F.Out,"</td>"
"</tr>");

View File

@ -1371,13 +1371,14 @@ static void Prj_RequestCreatOrEditPrj (long PrjCod)
extern const char *Txt_Edit_project;
extern const char *Txt_Project_data;
extern const char *Txt_Title;
extern const char *Txt_No;
extern const char *Txt_Yes;
extern const char *Txt_Department;
extern const char *Txt_Description;
extern const char *Txt_Required_knowledge;
extern const char *Txt_Required_materials;
extern const char *Txt_URL;
extern const char *Txt_Preassigned_QUESTION;
extern const char *Txt_No;
extern const char *Txt_Yes;
extern const char *Txt_Create_project;
extern const char *Txt_Save;
extern const char *Txt_Project_members;
@ -1449,6 +1450,18 @@ static void Prj_RequestCreatOrEditPrj (long PrjCod)
/* Project start and end dates */
Dat_PutFormStartEndClientLocalDateTimes (Prj.TimeUTC,Dat_FORM_SECONDS_ON);
/* Department */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<label for=\"DptCod\" class=\"%s\">%s:</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod,
false); // Don't submit on change
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/* Description of the project */
Prj_EditOneProjectTxtArea ("Description",Txt_Description,Prj.Description);