Version 15.222.3

This commit is contained in:
Antonio Cañas Vargas 2016-06-09 17:56:57 +02:00
parent 6f8778760d
commit 02d97f4fdb
5 changed files with 34 additions and 48 deletions

View File

@ -135,13 +135,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.222.2 (2016-06-09)"
#define Log_PLATFORM_VERSION "SWAD 15.222.3 (2016-06-09)"
#define CSS_FILE "swad15.218.css"
#define JS_FILE "swad15.216.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 15.222.3: Jun 09, 2016 Indicators form is sended automatically when any parameter changes. (202214 lines)
Version 15.222.2: Jun 09, 2016 Code refactoring in indicators. (202233 lines)
Version 15.222.1: Jun 09, 2016 Optimization in number of indicators. (202230 lines)
Version 15.222: Jun 09, 2016 Number of indicators is stored in table of courses. (202224 lines)

View File

@ -88,15 +88,20 @@ void DT_WriteSelectorDegreeTypes (void)
extern const char *Txt_Any_type_of_degree;
unsigned NumDegTyp;
/***** Get list of degree types *****/
/***** Form to select degree types *****/
/* Get list of degree types */
DT_GetListDegreeTypes ();
/***** List degree types *****/
fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\">"
"<option value=\"-1\"");
/* List degree types */
fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\""
" onchange=\"document.getElementById('%s').submit();\">",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Stat.DegTypCod == -1L)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Any_type_of_degree);
for (NumDegTyp = 0;
NumDegTyp < Gbl.Degs.DegTypes.Num;
NumDegTyp++)
@ -106,6 +111,7 @@ void DT_WriteSelectorDegreeTypes (void)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypName);
}
fprintf (Gbl.F.Out,"</select>");
/***** Free list of degree types *****/

View File

@ -1110,11 +1110,16 @@ void Dpt_WriteSelectorDepartment (long InsCod)
/* Get list of departments */
Dpt_GetListDepartments (InsCod);
fprintf (Gbl.F.Out,"<select name=\"DptCod\" style=\"width:375px;\">"
"<option value=\"-1\"");
/* List departments */
fprintf (Gbl.F.Out,"<select name=\"DptCod\" style=\"width:375px;\""
" onchange=\"document.getElementById('%s').submit();\">",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Stat.DptCod == -1L)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Any_department);
for (NumDpt = 0;
NumDpt < Gbl.Dpts.Num;
NumDpt++)
@ -1124,6 +1129,7 @@ void Dpt_WriteSelectorDepartment (long InsCod)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Gbl.Dpts.Lst[NumDpt].FullName);
}
fprintf (Gbl.F.Out,"</select>");
/* Free list of departments */

View File

@ -87,13 +87,11 @@ static unsigned long Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod);
void Ind_ReqIndicatorsCourses (void)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Scope;
extern const char *Txt_Types_of_degree;
extern const char *Txt_only_if_the_scope_is_X;
extern const char *Txt_Department;
extern const char *Txt_No_of_indicators;
extern const char *Txt_Update_indicators;
extern const char *Txt_Indicators_of_courses;
extern const char *Txt_Show_more_details;
MYSQL_RES *mysql_res;
@ -114,11 +112,15 @@ void Ind_ReqIndicatorsCourses (void)
Sco_GetScope ();
/* Get degree type code */
Gbl.Stat.DegTypCod = DT_GetParamOtherDegTypCod ();
Gbl.Stat.DegTypCod = (Gbl.Scope.Current == Sco_SCOPE_SYS) ? DT_GetParamOtherDegTypCod () :
-1L;
/* Get department code */
Gbl.Stat.DptCod = Dpt_GetParamDptCod ();
/* Get number of indicators */
Ind_GetParamNumIndicators ();
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Indicators_of_courses,NULL);
@ -134,7 +136,7 @@ void Ind_ReqIndicatorsCourses (void)
"</td>"
"<td class=\"LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Scope);
Sco_PutSelectorScope (false);
Sco_PutSelectorScope (true);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
@ -175,7 +177,6 @@ void Ind_ReqIndicatorsCourses (void)
Ind_GetNumCoursesWithIndicators (NumCrssWithIndicatorYes,NumCrss,mysql_res);
/* Selection of the number of indicators */
Ind_GetParamNumIndicators ();
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP\">"
"<label class=\"%s\">%s:</label>"
@ -186,16 +187,8 @@ void Ind_ReqIndicatorsCourses (void)
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/* Send button */
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"CENTER_MIDDLE\" style=\"padding:10px 0\">");
Act_LinkFormSubmitAnimated (Txt_Update_indicators,The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Update_indicators,Txt_Update_indicators);
fprintf (Gbl.F.Out,"</td>"
"</tr>"
"</table>");
/* End form */
fprintf (Gbl.F.Out,"</table>");
Act_FormEnd ();
/***** Show the stats of courses *****/
@ -238,11 +231,11 @@ void Ind_ShowIndicatorsCourses (void)
unsigned NumCrssWithIndicatorYes[1+Ind_NUM_INDICATORS];
/***** Get users range for statistics of courses *****/
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
1 << Sco_SCOPE_INS |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
Gbl.Scope.Default = Sco_SCOPE_CRS;
Sco_GetScope ();
@ -634,8 +627,9 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
Class,Ind);
if (Gbl.Stat.IndicatorsSelected[Ind])
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"</td>");
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\" />"
"</td>",
Gbl.Form.Id);
}
fprintf (Gbl.F.Out,"<td class=\"%s\">"
"%u"

View File

@ -48577,27 +48577,6 @@ const char *Txt_Update_attendance_according_to_selected_events =
"Atualizar presen&ccedil;a de acordo com eventos selecionados";
#endif
const char *Txt_Update_indicators =
#if L==1
"Actualitzar indicadors";
#elif L==2
"Update Indikatoren";
#elif L==3
"Update indicators";
#elif L==4
"Actualizar indicadores";
#elif L==5
"Mise &agrave; jour des indicateurs";
#elif L==6
"Actualizar indicadores"; // Okoteve traducción
#elif L==7
"Aggiornamento indicatori";
#elif L==8
"Aktualizacja wska&zacute;niki";
#elif L==9
"Atualizar indocadores";
#endif
const char *Txt_Update_messages =
#if L==1
"Actualitzar missatges";