Version 16.196.3

This commit is contained in:
Antonio Cañas Vargas 2017-04-30 12:44:53 +02:00
parent 08f4af4783
commit 9ce18f4589
6 changed files with 64 additions and 57 deletions

View File

@ -1711,7 +1711,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActRecDegLog */{ 553,-1,TabUnk,ActSeeDegInf , 0, 0,0x1E0, 0, 0, 0, 0,Act_CONT_DATA,Act_THIS_WINDOW,Deg_ReceiveLogo ,Deg_ShowConfiguration ,NULL},
/* ActRemDegLog */{1343,-1,TabUnk,ActSeeDegInf , 0, 0,0x1E0, 0, 0, 0, 0,Act_CONT_DATA,Act_THIS_WINDOW,Deg_RemoveLogo ,Deg_ShowConfiguration ,NULL},
/* ActEdiCrs */{ 555,-1,TabUnk,ActSeeCrs , 0, 0,0x1FE, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_ReqEditCourses ,NULL},
/* ActEdiCrs */{ 555,-1,TabUnk,ActSeeCrs , 0, 0,0x1FE, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_EditCourses ,NULL},
/* ActReqCrs */{1053,-1,TabUnk,ActSeeCrs , 0, 0,0x1FE, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Crs_RecFormReqCrs ,Crs_ContEditAfterChgCrs ,NULL},
/* ActNewCrs */{ 556,-1,TabUnk,ActSeeCrs , 0, 0,0x1E0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Crs_RecFormNewCrs ,Crs_ContEditAfterChgCrs ,NULL},
/* ActRemCrs */{ 560,-1,TabUnk,ActSeeCrs , 0, 0,0x1FE, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_RemoveCourse ,NULL},

View File

@ -223,14 +223,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.196.2 (2017-04-30)"
#define Log_PLATFORM_VERSION "SWAD 16.196.3 (2017-04-30)"
#define CSS_FILE "swad16.195.8.css"
#define JS_FILE "swad16.181.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.196.2: Apr 30, 2017 Changes in layout of edition of centres. (218537 lines)
Version 16.196.3: Apr 30, 2017 Changes in layout of edition of courses. (218540 lines)
Version 16.196.2: Apr 30, 2017 Changes in layout of edition of degrees. (218537 lines)
Version 16.196.1: Apr 30, 2017 Changes in layout of edition of centres. (218538 lines)
Version 16.196: Apr 30, 2017 Changes in layout of edition of institutions. (218525 lines)
Version 16.195.8: Apr 29, 2017 Changes in layout of file browser. (218511 lines)

View File

@ -83,7 +83,7 @@ static void Crs_PutIconsListCourses (void);
static void Crs_PutIconToEditCourses (void);
static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year);
static void Crs_EditCourses (void);
static void Crs_PutIconToViewCourses (void);
static void Crs_ListCoursesForEdition (void);
static void Crs_ListCoursesOfAYearForEdition (unsigned Year);
static bool Crs_CheckIfICanEdit (struct Course *Crs);
@ -960,31 +960,6 @@ void Crs_ShowCrssOfCurrentDeg (void)
}
}
/*****************************************************************************/
/************************ Request edition of courses *************************/
/*****************************************************************************/
void Crs_ReqEditCourses (void)
{
if (Gbl.CurrentDeg.Deg.DegCod > 0)
{
/***** Get list of courses in this degree *****/
Crs_GetListCoursesInDegree (Crs_ALL_COURSES_EXCEPT_REMOVED);
/***** Get list of degrees in this centre *****/
Deg_GetListDegsOfCurrentCtr ();
/***** Put form to edit courses *****/
Crs_EditCourses ();
/***** Free list of courses in this degree *****/
Crs_FreeListCoursesInDegree (&Gbl.CurrentDeg.Deg);
/***** Free list of degrees in this centre *****/
Deg_FreeListDegs (&Gbl.CurrentCtr.Ctr.Degs);
}
}
/*****************************************************************************/
/*************** Create a list with courses in current degree ****************/
/*****************************************************************************/
@ -1343,14 +1318,52 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
/****************** Put forms to edit courses in this degree *****************/
/*****************************************************************************/
static void Crs_EditCourses (void)
void Crs_EditCourses (void)
{
extern const char *Hlp_DEGREE_Courses;
extern const char *Txt_Courses_of_DEGREE_X;
/***** Get list of courses in this degree *****/
Crs_GetListCoursesInDegree (Crs_ALL_COURSES_EXCEPT_REMOVED);
/***** Get list of degrees in this centre *****/
Deg_GetListDegsOfCurrentCtr ();
/***** Start frame *****/
sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X,Gbl.CurrentDeg.Deg.ShrtName);
Lay_StartRoundFrame (NULL,Gbl.Message,Crs_PutIconToViewCourses,
Hlp_DEGREE_Courses);
/***** Put a form to create or request a new course *****/
Crs_PutFormToCreateCourse ();
/***** Forms to edit current courses *****/
if (Gbl.CurrentDeg.NumCrss)
Crs_ListCoursesForEdition ();
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free list of courses in this degree *****/
Crs_FreeListCoursesInDegree (&Gbl.CurrentDeg.Deg);
/***** Free list of degrees in this centre *****/
Deg_FreeListDegs (&Gbl.CurrentCtr.Ctr.Degs);
}
/*****************************************************************************/
/**************** Put contextual icons in edition of courses *****************/
/*****************************************************************************/
static void Crs_PutIconToViewCourses (void)
{
extern const char *Txt_View;
/***** Put form to view courses *****/
Lay_PutContextualLink (ActSeeCrs,NULL,NULL,
"eye-on64x64.png",
Txt_View,NULL,
NULL);
}
/*****************************************************************************/
@ -1359,14 +1372,10 @@ static void Crs_EditCourses (void)
static void Crs_ListCoursesForEdition (void)
{
extern const char *Hlp_DEGREE_Courses;
extern const char *Txt_Courses_of_DEGREE_X;
unsigned Year;
/***** Write heading *****/
sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X,
Gbl.CurrentDeg.Deg.ShrtName);
Lay_StartRoundFrameTable (NULL,Gbl.Message,NULL,Hlp_DEGREE_Courses,2);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE CELLS_PAD_2\">");
Crs_PutHeadCoursesForEdition ();
/***** List the courses *****/
@ -1377,7 +1386,7 @@ static void Crs_ListCoursesForEdition (void)
Crs_ListCoursesOfAYearForEdition (0);
/***** End table *****/
Lay_EndRoundFrameTable ();
fprintf (Gbl.F.Out,"</table>");
}
/*****************************************************************************/
@ -1622,8 +1631,7 @@ static Crs_Status_t Crs_GetStatusBitsFromStatusTxt (Crs_StatusTxt_t StatusTxt)
static void Crs_PutFormToCreateCourse (void)
{
extern const char *Hlp_DEGREE_Courses;
extern const char *Txt_New_course_of_DEGREE_X;
extern const char *Txt_New_course;
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
extern const char *Txt_Create_course;
struct Course *Crs;
@ -1641,9 +1649,7 @@ static void Crs_PutFormToCreateCourse (void)
Crs = &Gbl.Degs.EditingCrs;
/***** Write heading *****/
sprintf (Gbl.Message,Txt_New_course_of_DEGREE_X,
Gbl.CurrentDeg.Deg.ShrtName);
Lay_StartRoundFrameTable (NULL,Gbl.Message,NULL,Hlp_DEGREE_Courses,2);
Lay_StartRoundFrameTable (NULL,Txt_New_course,NULL,NULL,2);
Crs_PutHeadCoursesForEdition ();
/***** Disabled icon to remove course *****/
@ -1973,7 +1979,7 @@ void Crs_RemoveCourse (void)
/***** Check if this course has users *****/
if (Crs.NumUsrs) // Course has users ==> don't remove
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_course_you_must_first_remove_all_users_in_the_course);
else // Course has no users ==> remove it
else // Course has no users ==> remove it
{
/***** Remove course *****/
Crs_RemoveCourseCompletely (Crs.CrsCod);
@ -1988,7 +1994,7 @@ void Crs_RemoveCourse (void)
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
/***** Show the form again *****/
Crs_ReqEditCourses ();
Crs_EditCourses ();
}
/*****************************************************************************/
@ -2832,7 +2838,7 @@ void Crs_ContEditAfterChgCrs (void)
}
/***** Show the form again *****/
Crs_ReqEditCourses ();
Crs_EditCourses ();
}
/*****************************************************************************/

View File

@ -107,11 +107,11 @@ unsigned Crs_GetNumCrssWithUsrs (Rol_Role_t Role,const char *SubQuery);
void Crs_WriteSelectorOfCourse (void);
void Crs_ShowCrssOfCurrentDeg (void);
void Crs_ReqEditCourses (void);
void Crs_FreeListCoursesInDegree (struct Degree *Deg);
void Crs_WriteSelectorMyCourses (void);
void Crs_EditCourses (void);
void Crs_RecFormReqCrs (void);
void Crs_RecFormNewCrs (void);

View File

@ -953,7 +953,7 @@ void Ins_EditInstitutions (void)
}
/*****************************************************************************/
/***************** Put contextual icon to view institutions ******************/
/************* Put contextual icons in edition of institutions ***************/
/*****************************************************************************/
static void Ins_PutIconToViewInstitutions (void)

View File

@ -23796,25 +23796,25 @@ const char *Txt_New_country =
"Novo pa&iacute;s";
#endif
const char *Txt_New_course_of_DEGREE_X = // Warning: it is very important to include %s in the following sentences
const char *Txt_New_course =
#if L==1
"Nova assignatura (assignatura, curs, mat&egrave;ria, disciplina...) de %s";
"Nova assignatura (assignatura, curs, mat&egrave;ria, disciplina...)";
#elif L==2
"Neue Kurs (Kurs, Thema, Disziplin...) der %s";
"Neue Kurs (Kurs, Thema, Disziplin...)";
#elif L==3
"New course (course, subject, discipline...) of %s";
"New course (course, subject, discipline...)";
#elif L==4
"Nueva asignatura (asignatura, curso, materia, disciplina...) de %s";
"Nueva asignatura (asignatura, curso, materia, disciplina...)";
#elif L==5
"Nouvelle mati&egrave;re (mati&egrave;re, cours, discipline...) de %s";
"Nouvelle mati&egrave;re (mati&egrave;re, cours, discipline...)";
#elif L==6
"Nueva asignatura (asignatura, curso, materia, disciplina...) de %s"; // Okoteve traducción
"Nueva asignatura (asignatura, curso, materia, disciplina...)"; // Okoteve traducción
#elif L==7
"Nuovo corso (corso, materia...) di %s";
"Nuovo corso (corso, materia...)";
#elif L==8
"Nowy kurs %s";
"Nowy kurs";
#elif L==9
"Nova disciplina (disciplina, curso...) de %s";
"Nova disciplina (disciplina, curso...)";
#endif
const char *Txt_New_degree =