mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 22:35:28 +02:00
Version 15.155.4
This commit is contained in:
parent
bf5ac1b324
commit
17cee29b97
|
@ -134,13 +134,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.155.3 (2016-03-20)"
|
#define Log_PLATFORM_VERSION "SWAD 15.155.4 (2016-03-20)"
|
||||||
#define CSS_FILE "swad15.152.css"
|
#define CSS_FILE "swad15.152.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// 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.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.3: Mar 20, 2016 Changes in some help messages. (196062 lines)
|
||||||
Version 15.155.2: Mar 20, 2016 Fixed bug in surveys.
|
Version 15.155.2: Mar 20, 2016 Fixed bug in surveys.
|
||||||
Changes in edition of questions of surveys. (196060 lines)
|
Changes in edition of questions of surveys. (196060 lines)
|
||||||
|
|
|
@ -80,10 +80,10 @@ static void Crs_WriteListMyCoursesToSelectOne (void);
|
||||||
|
|
||||||
static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses);
|
static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses);
|
||||||
static void Crs_ListCourses (void);
|
static void Crs_ListCourses (void);
|
||||||
static void Crs_EditCourses (void);
|
|
||||||
static void Crs_ListCoursesForSeeing (bool ICanEdit);
|
|
||||||
static void Crs_PutIconToEditCourses (void);
|
static void Crs_PutIconToEditCourses (void);
|
||||||
static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year);
|
static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year);
|
||||||
|
|
||||||
|
static void Crs_EditCourses (void);
|
||||||
static void Crs_ListCoursesForEdition (void);
|
static void Crs_ListCoursesForEdition (void);
|
||||||
static bool Crs_CheckIfICanEdit (struct Course *Crs);
|
static bool Crs_CheckIfICanEdit (struct Course *Crs);
|
||||||
static Crs_StatusTxt_t Crs_GetStatusTxtFromStatusBits (Crs_Status_t Status);
|
static Crs_StatusTxt_t Crs_GetStatusTxtFromStatusBits (Crs_Status_t Status);
|
||||||
|
@ -1116,16 +1116,40 @@ void Crs_WriteSelectorMyCourses (void)
|
||||||
|
|
||||||
static void Crs_ListCourses (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_have_been_created_in_this_degree;
|
||||||
extern const char *Txt_Create_another_course;
|
extern const char *Txt_Create_another_course;
|
||||||
extern const char *Txt_Create_course;
|
extern const char *Txt_Create_course;
|
||||||
|
unsigned Year;
|
||||||
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
|
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
|
||||||
|
|
||||||
|
/***** Start frame *****/
|
||||||
|
sprintf (Gbl.Title,Txt_Courses_of_DEGREE_X,Gbl.CurrentDeg.Deg.ShortName);
|
||||||
|
Lay_StartRoundFrame (NULL,Gbl.Title,ICanEdit ? Crs_PutIconToEditCourses :
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (Gbl.CurrentDeg.Deg.NumCrss) // There are courses in the current degree
|
if (Gbl.CurrentDeg.Deg.NumCrss) // There are courses in the current degree
|
||||||
Crs_ListCoursesForSeeing (ICanEdit);
|
{
|
||||||
else // No courses created in the current degree
|
/***** Start table *****/
|
||||||
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\""
|
||||||
|
" style=\"margin-bottom:20px;\">");
|
||||||
|
Crs_PutHeadCoursesForSeeing ();
|
||||||
|
|
||||||
|
/***** List the courses *****/
|
||||||
|
for (Year = 1;
|
||||||
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
|
Year++)
|
||||||
|
if (Crs_ListCoursesOfAYearForSeeing (Year)) // If this year has courses ==>
|
||||||
|
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; // ==> change color for the next year
|
||||||
|
Crs_ListCoursesOfAYearForSeeing (0); // Courses without a year selected
|
||||||
|
|
||||||
|
/***** End table *****/
|
||||||
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
}
|
||||||
|
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_have_been_created_in_this_degree);
|
||||||
|
|
||||||
|
/***** Button to create course *****/
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
Act_FormStart (ActEdiCrs);
|
Act_FormStart (ActEdiCrs);
|
||||||
|
@ -1133,50 +1157,8 @@ static void Crs_ListCourses (void)
|
||||||
Txt_Create_course);
|
Txt_Create_course);
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/***** End frame *****/
|
||||||
/****************** Put forms to edit courses in this degree *****************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Crs_EditCourses (void)
|
|
||||||
{
|
|
||||||
/***** Put a form to create or request a new course *****/
|
|
||||||
Crs_PutFormToCreateCourse ();
|
|
||||||
|
|
||||||
/***** Forms to edit current courses *****/
|
|
||||||
if (Gbl.CurrentDeg.Deg.NumCrss)
|
|
||||||
Crs_ListCoursesForEdition ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********************** List current courses for seeing **********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Crs_ListCoursesForSeeing (bool ICanEdit)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Courses_of_DEGREE_X;
|
|
||||||
unsigned Year;
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
|
||||||
sprintf (Gbl.Title,Txt_Courses_of_DEGREE_X,
|
|
||||||
Gbl.CurrentDeg.Deg.ShortName);
|
|
||||||
Lay_StartRoundFrame (NULL,Gbl.Title,
|
|
||||||
ICanEdit ? Crs_PutIconToEditCourses :
|
|
||||||
NULL);
|
|
||||||
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">");
|
|
||||||
Crs_PutHeadCoursesForSeeing ();
|
|
||||||
|
|
||||||
/***** List the courses *****/
|
|
||||||
for (Year = 1;
|
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
|
||||||
Year++)
|
|
||||||
if (Crs_ListCoursesOfAYearForSeeing (Year)) // If this year has courses ==>
|
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; // ==> change color for the next year
|
|
||||||
Crs_ListCoursesOfAYearForSeeing (0); // Courses without a year selected
|
|
||||||
|
|
||||||
/***** Table end *****/
|
|
||||||
fprintf (Gbl.F.Out,"</table>");
|
|
||||||
Lay_EndRoundFrame ();
|
Lay_EndRoundFrame ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1300,6 +1282,20 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
return ThisYearHasCourses;
|
return ThisYearHasCourses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****************** Put forms to edit courses in this degree *****************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Crs_EditCourses (void)
|
||||||
|
{
|
||||||
|
/***** Put a form to create or request a new course *****/
|
||||||
|
Crs_PutFormToCreateCourse ();
|
||||||
|
|
||||||
|
/***** Forms to edit current courses *****/
|
||||||
|
if (Gbl.CurrentDeg.Deg.NumCrss)
|
||||||
|
Crs_ListCoursesForEdition ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************* List current courses for edition **********************/
|
/********************* List current courses for edition **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user