diff --git a/swad_changelog.h b/swad_changelog.h
index cda37a1ce..3abe4cf42 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -134,13 +134,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.155.4 (2016-03-20)"
+#define Log_PLATFORM_VERSION "SWAD 15.155.5 (2016-03-20)"
#define CSS_FILE "swad15.152.css"
#define JS_FILE "swad15.131.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 15.155.5: Mar 20, 2016 Changes in behaviour of hierarchy breadcrumb.
+ Changes in layout of listing of degrees. (196057 lines)
Version 15.155.4: Mar 20, 2016 Changes in layout of listing of courses. (196059 lines)
Version 15.155.3: Mar 20, 2016 Changes in some help messages. (196062 lines)
Version 15.155.2: Mar 20, 2016 Fixed bug in surveys.
diff --git a/swad_course.c b/swad_course.c
index a4900b2ef..8df07bdd8 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -1117,7 +1117,7 @@ void Crs_WriteSelectorMyCourses (void)
static void Crs_ListCourses (void)
{
extern const char *Txt_Courses_of_DEGREE_X;
- extern const char *Txt_No_courses_have_been_created_in_this_degree;
+ extern const char *Txt_No_courses;
extern const char *Txt_Create_another_course;
extern const char *Txt_Create_course;
unsigned Year;
@@ -1147,7 +1147,7 @@ static void Crs_ListCourses (void)
fprintf (Gbl.F.Out,"");
}
else // No courses created in the current degree
- Lay_ShowAlert (Lay_INFO,Txt_No_courses_have_been_created_in_this_degree);
+ Lay_ShowAlert (Lay_INFO,Txt_No_courses);
/***** Button to create course *****/
if (ICanEdit)
diff --git a/swad_degree.c b/swad_degree.c
index b03452ff1..3a900513a 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -91,11 +91,9 @@ static void Deg_ListDegreeTypes (void);
static void Deg_WriteSelectorOfDegree (void);
static void Deg_EditDegreeTypes (void);
static void Deg_ListDegreeTypesForSeeing (void);
-static void Deg_ListDegreeTypesForEdition (void);
-static void Deg_ListDegreesForSeeing (bool ICanEdit);
static void Deg_PutIconToEditDegTypes (void);
-static void Deg_PutIconToEditDegrees (void);
-static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg);
+static void Deg_ListDegreeTypesForEdition (void);
+
static void Deg_ListDegreesForEdition (void);
static bool Deg_CheckIfICanEdit (struct Degree *Deg);
static Deg_StatusTxt_t Deg_GetStatusTxtFromStatusBits (Deg_Status_t Status);
@@ -108,7 +106,11 @@ static void Deg_PutHeadDegreesForSeeing (void);
static void Deg_PutHeadDegreesForEdition (void);
static void Deg_CreateDegreeType (struct DegreeType *DegTyp);
static void Deg_CreateDegree (struct Degree *Deg,unsigned Status);
+
static void Deg_ListDegrees (void);
+static void Deg_PutIconToEditDegrees (void);
+static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg);
+
static void Deg_GetListDegTypes (void);
static void Deg_GetListDegsOfCurrentCtr (void);
static void Deg_FreeListDegsOfCurrentCtr (void);
@@ -654,10 +656,10 @@ static void Deg_WriteSelectorOfDegree (void)
}
/*****************************************************************************/
-/**************** Write degree full name in the top of the page **************/
+/************* Write hierarchy breadcrumb in the top of the page *************/
/*****************************************************************************/
-void Deg_WriteCtyInsCtrDeg (void)
+void Deg_WriteHierarchyBreadcrumb (void)
{
extern const char *The_ClassBreadcrumb[The_NUM_THEMES];
extern const char *Txt_System;
@@ -687,8 +689,8 @@ void Deg_WriteCtyInsCtrDeg (void)
/***** Separator *****/
fprintf (Gbl.F.Out," > ",ClassOn);
- /***** Form to go to select institutions *****/
- Act_FormGoToStart (ActSeeCtyInf);
+ /***** Form to go to see institutions of this country *****/
+ Act_FormGoToStart (ActSeeIns);
Cty_PutParamCtyCod (Gbl.CurrentCty.Cty.CtyCod);
Act_LinkFormSubmit (Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language],ClassOn);
fprintf (Gbl.F.Out,"%s",
@@ -712,8 +714,8 @@ void Deg_WriteCtyInsCtrDeg (void)
/***** Separator *****/
fprintf (Gbl.F.Out," > ",ClassOn);
- /***** Form to go to select centres *****/
- Act_FormGoToStart (ActSeeInsInf);
+ /***** Form to see centres of this institution *****/
+ Act_FormGoToStart (ActSeeCtr);
Ins_PutParamInsCod (Gbl.CurrentIns.Ins.InsCod);
Act_LinkFormSubmit (Gbl.CurrentIns.Ins.FullName,ClassOn);
fprintf (Gbl.F.Out,"%s",
@@ -741,8 +743,8 @@ void Deg_WriteCtyInsCtrDeg (void)
/***** Separator *****/
fprintf (Gbl.F.Out," > ",ClassOn);
- /***** Form to go to the centre *****/
- Act_FormGoToStart (ActSeeCtrInf);
+ /***** Form to see degrees of this centre *****/
+ Act_FormGoToStart (ActSeeDeg);
Ctr_PutParamCtrCod (Gbl.CurrentCtr.Ctr.CtrCod);
Act_LinkFormSubmit (Gbl.CurrentCtr.Ctr.FullName,ClassOn);
fprintf (Gbl.F.Out,"%s",
@@ -770,8 +772,8 @@ void Deg_WriteCtyInsCtrDeg (void)
/***** Separator *****/
fprintf (Gbl.F.Out," > ",ClassOn);
- /***** Form to go to the degree *****/
- Act_FormGoToStart (ActSeeDegInf);
+ /***** Form to go see courses of this degree *****/
+ Act_FormGoToStart (ActSeeCrs);
Deg_PutParamDegCod (Gbl.CurrentDeg.Deg.DegCod);
Act_LinkFormSubmit (Gbl.CurrentDeg.Deg.FullName,ClassOn);
strcpy (DegreeShortName,Gbl.CurrentDeg.Deg.ShortName);
@@ -1200,6 +1202,17 @@ static void Deg_ListDegreeTypesForSeeing (void)
Lay_EndRoundFrame ();
}
+/*****************************************************************************/
+/******************* Put link (form) to edit degree types ********************/
+/*****************************************************************************/
+
+static void Deg_PutIconToEditDegTypes (void)
+ {
+ extern const char *Txt_Edit;
+
+ Lay_PutContextualLink (ActEdiDegTyp,NULL,"edit64x64.png",Txt_Edit,NULL);
+ }
+
/*****************************************************************************/
/******************* List current degree types for edition *******************/
/*****************************************************************************/
@@ -1262,142 +1275,6 @@ static void Deg_ListDegreeTypesForEdition (void)
Lay_EndRoundFrameTable ();
}
-/*****************************************************************************/
-/********************** List current degrees for seeing **********************/
-/*****************************************************************************/
-
-static void Deg_ListDegreesForSeeing (bool ICanEdit)
- {
- extern const char *Txt_Degrees_of_CENTRE_X;
- unsigned NumDeg;
-
- /***** Write heading *****/
- sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X,
- Gbl.CurrentCtr.Ctr.ShortName);
- Lay_StartRoundFrame (NULL,Gbl.Title,
- ICanEdit ? Deg_PutIconToEditDegrees :
- NULL);
- fprintf (Gbl.F.Out,"
");
- Deg_PutHeadDegreesForSeeing ();
-
- /***** List the degrees *****/
- for (NumDeg = 0;
- NumDeg < Gbl.CurrentCtr.Ctr.NumDegs;
- NumDeg++)
- Deg_ListOneDegreeForSeeing (&(Gbl.CurrentCtr.LstDegs[NumDeg]),NumDeg + 1);
-
- /***** Table end *****/
- fprintf (Gbl.F.Out,"
");
- Lay_EndRoundFrame ();
- }
-
-/*****************************************************************************/
-/******************* Put link (form) to edit degree types ********************/
-/*****************************************************************************/
-
-static void Deg_PutIconToEditDegTypes (void)
- {
- extern const char *Txt_Edit;
-
- Lay_PutContextualLink (ActEdiDegTyp,NULL,"edit64x64.png",Txt_Edit,NULL);
- }
-
-/*****************************************************************************/
-/********************** Put link (form) to edit degrees **********************/
-/*****************************************************************************/
-
-static void Deg_PutIconToEditDegrees (void)
- {
- extern const char *Txt_Edit;
-
- Lay_PutContextualLink (ActEdiDeg,NULL,"edit64x64.png",Txt_Edit,NULL);
- }
-
-/*****************************************************************************/
-/************************ List one degree for seeing *************************/
-/*****************************************************************************/
-
-static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
- {
- extern const char *Txt_DEGREE_With_courses;
- extern const char *Txt_DEGREE_Without_courses;
- extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT];
- struct DegreeType DegTyp;
- const char *TxtClassNormal;
- const char *TxtClassStrong;
- const char *BgColor;
- Crs_StatusTxt_t StatusTxt;
-
- /***** Get data of type of degree of this degree *****/
- DegTyp.DegTypCod = Deg->DegTypCod;
- if (!Deg_GetDataOfDegreeTypeByCod (&DegTyp))
- Lay_ShowErrorAndExit ("Code of type of degree not found.");
-
- if (Deg->Status & Deg_STATUS_BIT_PENDING)
- {
- TxtClassNormal = "DAT_LIGHT";
- TxtClassStrong = "DAT_LIGHT";
- }
- else
- {
- TxtClassNormal = "DAT";
- TxtClassStrong = "DAT_N";
- }
- BgColor = (Deg->DegCod == Gbl.CurrentDeg.Deg.DegCod) ? "LIGHT_BLUE" :
- Gbl.ColorRows[Gbl.RowEvenOdd];
-
- /***** Put green tip if degree has courses *****/
- fprintf (Gbl.F.Out,""
- ""
- ""
- " | ",
- BgColor,
- Gbl.Prefs.IconsURL,
- Deg->NumCrss ? "ok_green" :
- "tr",
- Deg->NumCrss ? Txt_DEGREE_With_courses :
- Txt_DEGREE_Without_courses,
- Deg->NumCrss ? Txt_DEGREE_With_courses :
- Txt_DEGREE_Without_courses);
-
- /***** Number of degree in this list *****/
- fprintf (Gbl.F.Out,""
- "%u"
- " | ",
- TxtClassNormal,BgColor,
- NumDeg);
-
- /***** Degree logo and name *****/
- fprintf (Gbl.F.Out,"",BgColor);
- Deg_DrawDegreeLogoAndNameWithLink (Deg,ActSeeCrs,
- TxtClassStrong,"CENTER_MIDDLE");
- fprintf (Gbl.F.Out," | ");
-
- /***** Type of degree *****/
- fprintf (Gbl.F.Out,""
- "%s"
- " | ",
- TxtClassNormal,BgColor,DegTyp.DegTypName);
-
- /***** Current number of courses in this degree *****/
- fprintf (Gbl.F.Out,""
- "%u"
- " | ",
- TxtClassNormal,BgColor,Deg->NumCrss);
-
- /***** Degree status *****/
- StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
- fprintf (Gbl.F.Out,""
- "%s"
- " | "
- "
",
- TxtClassNormal,BgColor,Txt_DEGREE_STATUS[StatusTxt]);
-
- Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
- }
-
/*****************************************************************************/
/********************* List current degrees for edition **********************/
/*****************************************************************************/
@@ -2058,16 +1935,38 @@ static void Deg_CreateDegree (struct Degree *Deg,unsigned Status)
static void Deg_ListDegrees (void)
{
- extern const char *Txt_No_degrees_have_been_created_in_this_centre;
+ extern const char *Txt_Degrees_of_CENTRE_X;
+ extern const char *Txt_No_degrees;
extern const char *Txt_Create_another_degree;
extern const char *Txt_Create_degree;
+ unsigned NumDeg;
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
- if (Gbl.CurrentCtr.Ctr.NumDegs) // There are degrees in the current centre
- Deg_ListDegreesForSeeing (ICanEdit);
- else // No degrees created in the current centre
- Lay_ShowAlert (Lay_INFO,Txt_No_degrees_have_been_created_in_this_centre);
+ /***** Start frame *****/
+ sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X,Gbl.CurrentCtr.Ctr.ShortName);
+ Lay_StartRoundFrame (NULL,Gbl.Title,ICanEdit ? Deg_PutIconToEditDegrees :
+ NULL);
+ if (Gbl.CurrentCtr.Ctr.NumDegs) // There are degrees in the current centre
+ {
+ /***** Start table *****/
+ fprintf (Gbl.F.Out,"");
+ Deg_PutHeadDegreesForSeeing ();
+
+ /***** List the degrees *****/
+ for (NumDeg = 0;
+ NumDeg < Gbl.CurrentCtr.Ctr.NumDegs;
+ NumDeg++)
+ Deg_ListOneDegreeForSeeing (&(Gbl.CurrentCtr.LstDegs[NumDeg]),NumDeg + 1);
+
+ /***** End table *****/
+ fprintf (Gbl.F.Out,"
");
+ }
+ else // No degrees created in the current centre
+ Lay_ShowAlert (Lay_INFO,Txt_No_degrees);
+
+ /***** Button to create degree *****/
if (ICanEdit)
{
Act_FormStart (ActEdiDeg);
@@ -2075,6 +1974,105 @@ static void Deg_ListDegrees (void)
Txt_Create_degree);
Act_FormEnd ();
}
+
+ /***** End frame *****/
+ Lay_EndRoundFrame ();
+ }
+
+/*****************************************************************************/
+/********************** Put link (form) to edit degrees **********************/
+/*****************************************************************************/
+
+static void Deg_PutIconToEditDegrees (void)
+ {
+ extern const char *Txt_Edit;
+
+ Lay_PutContextualLink (ActEdiDeg,NULL,"edit64x64.png",Txt_Edit,NULL);
+ }
+
+/*****************************************************************************/
+/************************ List one degree for seeing *************************/
+/*****************************************************************************/
+
+static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
+ {
+ extern const char *Txt_DEGREE_With_courses;
+ extern const char *Txt_DEGREE_Without_courses;
+ extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT];
+ struct DegreeType DegTyp;
+ const char *TxtClassNormal;
+ const char *TxtClassStrong;
+ const char *BgColor;
+ Crs_StatusTxt_t StatusTxt;
+
+ /***** Get data of type of degree of this degree *****/
+ DegTyp.DegTypCod = Deg->DegTypCod;
+ if (!Deg_GetDataOfDegreeTypeByCod (&DegTyp))
+ Lay_ShowErrorAndExit ("Code of type of degree not found.");
+
+ if (Deg->Status & Deg_STATUS_BIT_PENDING)
+ {
+ TxtClassNormal = "DAT_LIGHT";
+ TxtClassStrong = "DAT_LIGHT";
+ }
+ else
+ {
+ TxtClassNormal = "DAT";
+ TxtClassStrong = "DAT_N";
+ }
+ BgColor = (Deg->DegCod == Gbl.CurrentDeg.Deg.DegCod) ? "LIGHT_BLUE" :
+ Gbl.ColorRows[Gbl.RowEvenOdd];
+
+ /***** Put green tip if degree has courses *****/
+ fprintf (Gbl.F.Out,""
+ ""
+ ""
+ " | ",
+ BgColor,
+ Gbl.Prefs.IconsURL,
+ Deg->NumCrss ? "ok_green" :
+ "tr",
+ Deg->NumCrss ? Txt_DEGREE_With_courses :
+ Txt_DEGREE_Without_courses,
+ Deg->NumCrss ? Txt_DEGREE_With_courses :
+ Txt_DEGREE_Without_courses);
+
+ /***** Number of degree in this list *****/
+ fprintf (Gbl.F.Out,""
+ "%u"
+ " | ",
+ TxtClassNormal,BgColor,
+ NumDeg);
+
+ /***** Degree logo and name *****/
+ fprintf (Gbl.F.Out,"",BgColor);
+ Deg_DrawDegreeLogoAndNameWithLink (Deg,ActSeeCrs,
+ TxtClassStrong,"CENTER_MIDDLE");
+ fprintf (Gbl.F.Out," | ");
+
+ /***** Type of degree *****/
+ fprintf (Gbl.F.Out,""
+ "%s"
+ " | ",
+ TxtClassNormal,BgColor,DegTyp.DegTypName);
+
+ /***** Current number of courses in this degree *****/
+ fprintf (Gbl.F.Out,""
+ "%u"
+ " | ",
+ TxtClassNormal,BgColor,Deg->NumCrss);
+
+ /***** Degree status *****/
+ StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
+ fprintf (Gbl.F.Out,""
+ "%s"
+ " | "
+ "
",
+ TxtClassNormal,BgColor,Txt_DEGREE_STATUS[StatusTxt]);
+
+ Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
}
/*****************************************************************************/
diff --git a/swad_degree.h b/swad_degree.h
index 51ef881bc..8c2607db2 100644
--- a/swad_degree.h
+++ b/swad_degree.h
@@ -101,7 +101,7 @@ void Deg_ShowConfiguration (void);
void Deg_PrintConfiguration (void);
void Deg_WriteMenuAllCourses (void);
-void Deg_WriteCtyInsCtrDeg (void);
+void Deg_WriteHierarchyBreadcrumb (void);
void Deg_WriteBigNameCtyInsCtrDegCrs (void);
void Deg_InitCurrentCourse (void);
diff --git a/swad_layout.c b/swad_layout.c
index 854af99ad..562cbd8ca 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -863,7 +863,7 @@ static void Lay_WritePageTopHeading (void)
static void Lay_WriteBreadcrumb (void)
{
fprintf (Gbl.F.Out,"");
- Deg_WriteCtyInsCtrDeg ();
+ Deg_WriteHierarchyBreadcrumb ();
Crs_WriteSelectorMyCourses ();
fprintf (Gbl.F.Out,"
");
}
diff --git a/swad_text.c b/swad_text.c
index 8ae5103c4..ba77a28c7 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -23490,46 +23490,46 @@ const char *Txt_No_countries_have_been_created =
"No countries have been created."; // Necessita de tradução
#endif
-const char *Txt_No_courses_have_been_created_in_this_degree =
+const char *Txt_No_courses =
#if L==1
- "No se han creado asignaturas en esta titulación."; // Necessita traduccio
+ "No hi ha assignatures.";
#elif L==2
- "No courses have been created in this degree."; // Need Übersetzung
+ "Keine Kursen.";
#elif L==3
- "No courses have been created in this degree.";
+ "No courses.";
#elif L==4
- "No se han creado asignaturas en esta titulación.";
+ "No hay asignaturas.";
#elif L==5
- "No courses have been created in this degree."; // Besoin de traduction
+ "Il n'y a pas de matières.";
#elif L==6
- "No se han creado asignaturas en esta titulación."; // Okoteve traducción
+ "No hay asignaturas."; // Okoteve traducción
#elif L==7
- "No courses have been created in this degree."; // Bisogno di traduzione
+ "Non ci sono laurea.";
#elif L==8
- "No courses have been created in this degree."; // Potrzebujesz tlumaczenie
+ "Brak kursów.";
#elif L==9
- "No courses have been created in this degree."; // Necessita de tradução
+ "Não há disciplinas.";
#endif
-const char *Txt_No_degrees_have_been_created_in_this_centre =
+const char *Txt_No_degrees =
#if L==1
- "No se han creado titulaciones en este centro."; // Necessita traduccio
+ "No hi ha titulacions.";
#elif L==2
- "No degrees have been created in this centre."; // Need Übersetzung
+ "Keine Studiengänge.";
#elif L==3
- "No degrees have been created in this centre.";
+ "No degrees.";
#elif L==4
- "No se han creado titulaciones en este centro.";
+ "No hay titulaciones.";
#elif L==5
- "No degrees have been created in this centre."; // Besoin de traduction
+ "Il n'y a pas d'études.";
#elif L==6
- "No se han creado titulaciones en este centro."; // Okoteve traducción
+ "No hay titulaciones."; // Okoteve traducción
#elif L==7
- "No degrees have been created in this centre."; // Bisogno di traduzione
+ "Non ci sono corsi.";
#elif L==8
- "No degrees have been created in this centre."; // Potrzebujesz tlumaczenie
+ "Brak stopni.";
#elif L==9
- "No degrees have been created in this centre."; // Necessita de tradução
+ "Não há titulaçoes.";
#endif
const char *Txt_No_enrollment_requests =
@@ -30525,7 +30525,7 @@ const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT] =
#elif L==6
"administradores de titulaciones" // Okoteve traducción
#elif L==7
- "amministratori di gradi"
+ "amministratori di laurea"
#elif L==8
"Administratorzy stopni"
#elif L==9