mirror of https://github.com/acanas/swad-core.git
Version 15.58
This commit is contained in:
parent
37d95d4b00
commit
ab954d8327
|
@ -372,7 +372,7 @@ Degree:
|
|||
251. ActChgInsCrsCod Request change of institutional code of a course
|
||||
252. ActChgCrsDeg Request change of degree of a course
|
||||
253. ActChgCrsYea Request change of year of a course inside of its degree
|
||||
254. ActChgCrsSem Request change of semester of a course
|
||||
REMOVE-> 254. ActChgCrsSem Request change of semester of a course
|
||||
255. ActRenCrsSho Request change of short name of a course
|
||||
256. ActRenCrsFul Request change of full name of a course
|
||||
257. ActChgCrsSta Request change of status of a course
|
||||
|
@ -1779,7 +1779,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActChgInsCrsCod */{1025,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeInsCrsCod ,NULL},
|
||||
/* ActChgCrsDeg */{ 565,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsDegree ,NULL},
|
||||
/* ActChgCrsYea */{ 561,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsYear ,NULL},
|
||||
/* ActChgCrsSem */{ 562,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsSemester ,NULL},
|
||||
/* ActChgCrsSem *//*{ 562,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsSemester ,NULL},*/
|
||||
/* ActRenCrsSho */{ 563,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RenameCourseShort ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActRenCrsFul */{ 564,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RenameCourseFull ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActChgCrsSta */{1055,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsStatus ,NULL},
|
||||
|
@ -3363,7 +3363,8 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
|||
-1, // #559 (obsolete action)
|
||||
ActRemCrs, // #560
|
||||
ActChgCrsYea, // #561
|
||||
ActChgCrsSem, // #562
|
||||
// ActChgCrsSem, // #562
|
||||
-1, // #562
|
||||
ActRenCrsSho, // #563
|
||||
ActRenCrsFul, // #564
|
||||
ActChgCrsDeg, // #565
|
||||
|
|
105
swad_action.h
105
swad_action.h
|
@ -70,7 +70,8 @@ typedef enum
|
|||
|
||||
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_NUM_ACTIONS (7+52+15+90+73+68+205+183+154+171+27+80)
|
||||
// #define Act_NUM_ACTIONS (7+52+15+90+73+68+205+183+154+171+27+80)
|
||||
#define Act_NUM_ACTIONS (7+52+15+90+73+67+205+183+154+171+27+80)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1487
|
||||
|
||||
|
@ -383,59 +384,59 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
|||
#define ActChgInsCrsCod (ActDowComCtr+ 15)
|
||||
#define ActChgCrsDeg (ActDowComCtr+ 16)
|
||||
#define ActChgCrsYea (ActDowComCtr+ 17)
|
||||
#define ActChgCrsSem (ActDowComCtr+ 18)
|
||||
#define ActRenCrsSho (ActDowComCtr+ 19)
|
||||
#define ActRenCrsFul (ActDowComCtr+ 20)
|
||||
#define ActChgCrsSta (ActDowComCtr+ 21)
|
||||
// #define ActChgCrsSem (ActDowComCtr+ 18)
|
||||
#define ActRenCrsSho (ActDowComCtr+ 18)
|
||||
#define ActRenCrsFul (ActDowComCtr+ 19)
|
||||
#define ActChgCrsSta (ActDowComCtr+ 20)
|
||||
|
||||
#define ActChgToSeeDocDeg (ActDowComCtr+ 22)
|
||||
#define ActSeeDocDeg (ActDowComCtr+ 23)
|
||||
#define ActExpSeeDocDeg (ActDowComCtr+ 24)
|
||||
#define ActConSeeDocDeg (ActDowComCtr+ 25)
|
||||
#define ActZIPSeeDocDeg (ActDowComCtr+ 26)
|
||||
#define ActReqDatSeeDocDeg (ActDowComCtr+ 27)
|
||||
#define ActDowSeeDocDeg (ActDowComCtr+ 28)
|
||||
#define ActChgToAdmDocDeg (ActDowComCtr+ 29)
|
||||
#define ActAdmDocDeg (ActDowComCtr+ 30)
|
||||
#define ActReqRemFilDocDeg (ActDowComCtr+ 31)
|
||||
#define ActRemFilDocDeg (ActDowComCtr+ 32)
|
||||
#define ActRemFolDocDeg (ActDowComCtr+ 33)
|
||||
#define ActCopDocDeg (ActDowComCtr+ 34)
|
||||
#define ActPasDocDeg (ActDowComCtr+ 35)
|
||||
#define ActRemTreDocDeg (ActDowComCtr+ 36)
|
||||
#define ActFrmCreDocDeg (ActDowComCtr+ 37)
|
||||
#define ActCreFolDocDeg (ActDowComCtr+ 38)
|
||||
#define ActCreLnkDocDeg (ActDowComCtr+ 39)
|
||||
#define ActRenFolDocDeg (ActDowComCtr+ 40)
|
||||
#define ActRcvFilDocDegDZ (ActDowComCtr+ 41)
|
||||
#define ActRcvFilDocDegCla (ActDowComCtr+ 42)
|
||||
#define ActExpAdmDocDeg (ActDowComCtr+ 43)
|
||||
#define ActConAdmDocDeg (ActDowComCtr+ 44)
|
||||
#define ActZIPAdmDocDeg (ActDowComCtr+ 45)
|
||||
#define ActShoDocDeg (ActDowComCtr+ 46)
|
||||
#define ActHidDocDeg (ActDowComCtr+ 47)
|
||||
#define ActReqDatAdmDocDeg (ActDowComCtr+ 48)
|
||||
#define ActChgDatAdmDocDeg (ActDowComCtr+ 49)
|
||||
#define ActDowAdmDocDeg (ActDowComCtr+ 50)
|
||||
#define ActChgToSeeDocDeg (ActDowComCtr+ 21)
|
||||
#define ActSeeDocDeg (ActDowComCtr+ 22)
|
||||
#define ActExpSeeDocDeg (ActDowComCtr+ 23)
|
||||
#define ActConSeeDocDeg (ActDowComCtr+ 24)
|
||||
#define ActZIPSeeDocDeg (ActDowComCtr+ 25)
|
||||
#define ActReqDatSeeDocDeg (ActDowComCtr+ 26)
|
||||
#define ActDowSeeDocDeg (ActDowComCtr+ 27)
|
||||
#define ActChgToAdmDocDeg (ActDowComCtr+ 28)
|
||||
#define ActAdmDocDeg (ActDowComCtr+ 29)
|
||||
#define ActReqRemFilDocDeg (ActDowComCtr+ 30)
|
||||
#define ActRemFilDocDeg (ActDowComCtr+ 31)
|
||||
#define ActRemFolDocDeg (ActDowComCtr+ 32)
|
||||
#define ActCopDocDeg (ActDowComCtr+ 33)
|
||||
#define ActPasDocDeg (ActDowComCtr+ 34)
|
||||
#define ActRemTreDocDeg (ActDowComCtr+ 35)
|
||||
#define ActFrmCreDocDeg (ActDowComCtr+ 36)
|
||||
#define ActCreFolDocDeg (ActDowComCtr+ 37)
|
||||
#define ActCreLnkDocDeg (ActDowComCtr+ 38)
|
||||
#define ActRenFolDocDeg (ActDowComCtr+ 39)
|
||||
#define ActRcvFilDocDegDZ (ActDowComCtr+ 40)
|
||||
#define ActRcvFilDocDegCla (ActDowComCtr+ 41)
|
||||
#define ActExpAdmDocDeg (ActDowComCtr+ 42)
|
||||
#define ActConAdmDocDeg (ActDowComCtr+ 43)
|
||||
#define ActZIPAdmDocDeg (ActDowComCtr+ 44)
|
||||
#define ActShoDocDeg (ActDowComCtr+ 45)
|
||||
#define ActHidDocDeg (ActDowComCtr+ 46)
|
||||
#define ActReqDatAdmDocDeg (ActDowComCtr+ 47)
|
||||
#define ActChgDatAdmDocDeg (ActDowComCtr+ 48)
|
||||
#define ActDowAdmDocDeg (ActDowComCtr+ 49)
|
||||
|
||||
#define ActReqRemFilComDeg (ActDowComCtr+ 51)
|
||||
#define ActRemFilComDeg (ActDowComCtr+ 52)
|
||||
#define ActRemFolComDeg (ActDowComCtr+ 53)
|
||||
#define ActCopComDeg (ActDowComCtr+ 54)
|
||||
#define ActPasComDeg (ActDowComCtr+ 55)
|
||||
#define ActRemTreComDeg (ActDowComCtr+ 56)
|
||||
#define ActFrmCreComDeg (ActDowComCtr+ 57)
|
||||
#define ActCreFolComDeg (ActDowComCtr+ 58)
|
||||
#define ActCreLnkComDeg (ActDowComCtr+ 59)
|
||||
#define ActRenFolComDeg (ActDowComCtr+ 60)
|
||||
#define ActRcvFilComDegDZ (ActDowComCtr+ 61)
|
||||
#define ActRcvFilComDegCla (ActDowComCtr+ 62)
|
||||
#define ActExpComDeg (ActDowComCtr+ 63)
|
||||
#define ActConComDeg (ActDowComCtr+ 64)
|
||||
#define ActZIPComDeg (ActDowComCtr+ 65)
|
||||
#define ActReqDatComDeg (ActDowComCtr+ 66)
|
||||
#define ActChgDatComDeg (ActDowComCtr+ 67)
|
||||
#define ActDowComDeg (ActDowComCtr+ 68)
|
||||
#define ActReqRemFilComDeg (ActDowComCtr+ 50)
|
||||
#define ActRemFilComDeg (ActDowComCtr+ 51)
|
||||
#define ActRemFolComDeg (ActDowComCtr+ 52)
|
||||
#define ActCopComDeg (ActDowComCtr+ 53)
|
||||
#define ActPasComDeg (ActDowComCtr+ 54)
|
||||
#define ActRemTreComDeg (ActDowComCtr+ 55)
|
||||
#define ActFrmCreComDeg (ActDowComCtr+ 56)
|
||||
#define ActCreFolComDeg (ActDowComCtr+ 57)
|
||||
#define ActCreLnkComDeg (ActDowComCtr+ 58)
|
||||
#define ActRenFolComDeg (ActDowComCtr+ 59)
|
||||
#define ActRcvFilComDegDZ (ActDowComCtr+ 60)
|
||||
#define ActRcvFilComDegCla (ActDowComCtr+ 61)
|
||||
#define ActExpComDeg (ActDowComCtr+ 62)
|
||||
#define ActConComDeg (ActDowComCtr+ 63)
|
||||
#define ActZIPComDeg (ActDowComCtr+ 64)
|
||||
#define ActReqDatComDeg (ActDowComCtr+ 65)
|
||||
#define ActChgDatComDeg (ActDowComCtr+ 66)
|
||||
#define ActDowComDeg (ActDowComCtr+ 67)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Course tab *********************************/
|
||||
|
|
|
@ -116,12 +116,16 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.57 (2015/12/05)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.58 (2015/12/06)"
|
||||
#define CSS_FILE "swad15.57.css"
|
||||
|
||||
// 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.58: Dec 06, 2015 Year and semester are fusioned to one number: year/semester. (186960 lines)
|
||||
1 change necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='562';
|
||||
|
||||
Version 15.57: Dec 05, 2015 Lot of changes in forms to edit institutions, centres, degrees, courses, etc. (186903 lines)
|
||||
Version 15.56.6: Dec 05, 2015 Fixed minor bug in edition of degrees. (186843 lines)
|
||||
Version 15.56.5: Dec 05, 2015 Go to degree in table of degrees (statistic). (186843 lines)
|
||||
|
|
123
swad_course.c
123
swad_course.c
|
@ -151,8 +151,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
extern const char *Txt_Short_name;
|
||||
extern const char *Txt_Year_OF_A_DEGREE;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_Semester;
|
||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
// extern const char *Txt_Semester;
|
||||
// extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
extern const char *Txt_Institutional_code;
|
||||
extern const char *Txt_Internal_code;
|
||||
extern const char *Txt_Shortcut;
|
||||
|
@ -164,7 +164,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
extern const char *Txt_Save;
|
||||
Act_Action_t Superaction;
|
||||
unsigned Year;
|
||||
unsigned Semester;
|
||||
// unsigned Semester;
|
||||
struct Ind_IndicatorsCrs Indicators;
|
||||
bool IsForm = (!PrintView && Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER);
|
||||
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
|
||||
|
@ -282,6 +282,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
"</tr>");
|
||||
|
||||
/***** Course semester *****/
|
||||
/*
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
|
@ -306,6 +307,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
fprintf (Gbl.F.Out,"%s",Txt_SEMESTER_OF_YEAR[Gbl.CurrentCrs.Crs.Semester]);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
*/
|
||||
|
||||
if (!PrintView)
|
||||
{
|
||||
|
@ -493,7 +495,7 @@ void Crs_ChangeCourseConfig (void)
|
|||
char Query[512];
|
||||
char YearStr[2+1];
|
||||
char YN[1+1];
|
||||
char SemesterStr[1+1];
|
||||
// char SemesterStr[1+1];
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get institutional code */
|
||||
|
@ -504,14 +506,17 @@ void Crs_ChangeCourseConfig (void)
|
|||
Gbl.CurrentCrs.Crs.Year = Deg_ConvStrToYear (YearStr);
|
||||
|
||||
/* Get semester */
|
||||
/*
|
||||
Par_GetParToText ("OthCrsSem",SemesterStr,1);
|
||||
Gbl.CurrentCrs.Crs.Semester = Deg_ConvStrToSemester (SemesterStr);
|
||||
*/
|
||||
|
||||
/* Get whether this course allows direct log in or not */
|
||||
Par_GetParToText ("AllowDirectLogIn",YN,1);
|
||||
Gbl.CurrentCrs.Crs.AllowDirectLogIn = (Str_ConvertToUpperLetter (YN[0]) == 'Y');
|
||||
|
||||
/***** Update table of degree types *****/
|
||||
/*
|
||||
sprintf (Query,"UPDATE courses SET InsCrsCod='%s',Year='%u',Semester='%u',AllowDirectLogIn='%c'"
|
||||
" WHERE CrsCod='%ld'",
|
||||
Gbl.CurrentCrs.Crs.InstitutionalCrsCod,
|
||||
|
@ -520,7 +525,15 @@ void Crs_ChangeCourseConfig (void)
|
|||
Gbl.CurrentCrs.Crs.AllowDirectLogIn ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the type of log in for a course");
|
||||
*/
|
||||
sprintf (Query,"UPDATE courses SET InsCrsCod='%s',Year='%u',AllowDirectLogIn='%c'"
|
||||
" WHERE CrsCod='%ld'",
|
||||
Gbl.CurrentCrs.Crs.InstitutionalCrsCod,
|
||||
Gbl.CurrentCrs.Crs.Year,
|
||||
Gbl.CurrentCrs.Crs.AllowDirectLogIn ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the configuration of a course");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_configuration_of_the_course_X_has_been_updated,
|
||||
|
@ -1263,7 +1276,7 @@ static void Crs_ListCoursesForSeeing (void)
|
|||
extern const char *Txt_COURSE_With_users;
|
||||
extern const char *Txt_COURSE_Without_users;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
// extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
extern const char *Txt_Go_to_X;
|
||||
extern const char *Txt_COURSE_STATUS[Crs_NUM_STATUS_TXT];
|
||||
struct Course *Crs;
|
||||
|
@ -1336,11 +1349,13 @@ static void Crs_ListCoursesForSeeing (void)
|
|||
Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||
|
||||
/* Course semester */
|
||||
/*
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
TxtClassNormal,BgColor,
|
||||
Txt_SEMESTER_OF_YEAR[Crs->Semester]);
|
||||
*/
|
||||
|
||||
/* Course full name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
||||
|
@ -1390,12 +1405,12 @@ static void Crs_ListCoursesForEdition (void)
|
|||
{
|
||||
extern const char *Txt_Courses_of_DEGREE_X;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
// extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
extern const char *Txt_COURSE_STATUS[Crs_NUM_STATUS_TXT];
|
||||
struct Course *Crs;
|
||||
unsigned Year;
|
||||
unsigned YearAux;
|
||||
unsigned Semester;
|
||||
// unsigned Semester;
|
||||
unsigned NumDeg;
|
||||
unsigned NumCrs;
|
||||
struct UsrData UsrDat;
|
||||
|
@ -1515,6 +1530,7 @@ static void Crs_ListCoursesForEdition (void)
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Course semester */
|
||||
/*
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
||||
if (ICanEdit)
|
||||
{
|
||||
|
@ -1539,6 +1555,7 @@ static void Crs_ListCoursesForEdition (void)
|
|||
else
|
||||
fprintf (Gbl.F.Out,"%s",Txt_SEMESTER_OF_YEAR[Crs->Semester]);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
*/
|
||||
|
||||
/* Course short name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
|
@ -1694,12 +1711,12 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
{
|
||||
extern const char *Txt_New_course_of_DEGREE_X;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
// extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
extern const char *Txt_COURSE_STATUS[Crs_NUM_STATUS_TXT];
|
||||
extern const char *Txt_Create_course;
|
||||
struct Course *Crs;
|
||||
unsigned Year;
|
||||
unsigned Semester;
|
||||
// unsigned Semester;
|
||||
|
||||
/***** Start form *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM)
|
||||
|
@ -1763,6 +1780,7 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
"</td>");
|
||||
|
||||
/***** Semester *****/
|
||||
/*
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<select name=\"OthCrsSem\">");
|
||||
for (Semester = 0;
|
||||
|
@ -1775,6 +1793,7 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Txt_SEMESTER_OF_YEAR[Semester]);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
*/
|
||||
|
||||
/***** Course short name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -1833,7 +1852,7 @@ static void Crs_PutHeadCoursesForSeeing (void)
|
|||
{
|
||||
extern const char *Txt_Institutional_BR_code;
|
||||
extern const char *Txt_Year_OF_A_DEGREE;
|
||||
extern const char *Txt_Semester_ABBREVIATION;
|
||||
// extern const char *Txt_Semester_ABBREVIATION;
|
||||
extern const char *Txt_Course;
|
||||
extern const char *Txt_Students_ABBREVIATION;
|
||||
extern const char *Txt_Teachers_ABBREVIATION;
|
||||
|
@ -1847,9 +1866,9 @@ static void Crs_PutHeadCoursesForSeeing (void)
|
|||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
// "<th class=\"CENTER_MIDDLE\">"
|
||||
// "%s"
|
||||
// "</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -1865,7 +1884,7 @@ static void Crs_PutHeadCoursesForSeeing (void)
|
|||
"</tr>",
|
||||
Txt_Institutional_BR_code,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Semester_ABBREVIATION,
|
||||
// Txt_Semester_ABBREVIATION,
|
||||
Txt_Course,
|
||||
Txt_Students_ABBREVIATION,
|
||||
Txt_Teachers_ABBREVIATION,
|
||||
|
@ -1883,7 +1902,7 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
extern const char *Txt_optional;
|
||||
extern const char *Txt_Degree;
|
||||
extern const char *Txt_Year_OF_A_DEGREE;
|
||||
extern const char *Txt_Semester_ABBREVIATION;
|
||||
// extern const char *Txt_Semester_ABBREVIATION;
|
||||
extern const char *Txt_Short_name;
|
||||
extern const char *Txt_Full_name;
|
||||
extern const char *Txt_Students_ABBREVIATION;
|
||||
|
@ -1902,9 +1921,9 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
// "<th class=\"CENTER_MIDDLE\">"
|
||||
// "%s"
|
||||
// "</th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -1931,7 +1950,7 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
Txt_Institutional_code,Txt_optional,
|
||||
Txt_Degree,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Semester_ABBREVIATION,
|
||||
// Txt_Semester_ABBREVIATION,
|
||||
Txt_Short_name,
|
||||
Txt_Full_name,
|
||||
Txt_Students_ABBREVIATION,
|
||||
|
@ -2027,7 +2046,7 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
static void Crs_GetParamsNewCourse (struct Course *Crs)
|
||||
{
|
||||
char YearStr[2+1];
|
||||
char SemesterStr[1+1];
|
||||
// char SemesterStr[1+1];
|
||||
|
||||
/***** Get parameters of the course from form *****/
|
||||
/* Get institutional code */
|
||||
|
@ -2038,8 +2057,10 @@ static void Crs_GetParamsNewCourse (struct Course *Crs)
|
|||
Crs->Year = Deg_ConvStrToYear (YearStr);
|
||||
|
||||
/* Get semester */
|
||||
/*
|
||||
Par_GetParToText ("OthCrsSem",SemesterStr,1);
|
||||
Crs->Semester = Deg_ConvStrToSemester (SemesterStr);
|
||||
*/
|
||||
|
||||
/* Get course short name */
|
||||
Par_GetParToText ("ShortName",Crs->ShortName,Crs_MAX_LENGTH_COURSE_SHORT_NAME);
|
||||
|
@ -2074,6 +2095,7 @@ static void Crs_CreateCourse (struct Course *Crs,unsigned Status)
|
|||
char Query[2048];
|
||||
|
||||
/***** Insert new course into pending requests *****/
|
||||
/*
|
||||
sprintf (Query,"INSERT INTO courses (DegCod,Year,Semester,InsCrsCod,"
|
||||
"AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName)"
|
||||
" VALUES ('%ld','%u','%u','%s','N','%u','%ld','%s','%s')",
|
||||
|
@ -2082,6 +2104,15 @@ static void Crs_CreateCourse (struct Course *Crs,unsigned Status)
|
|||
Status,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Crs->ShortName,Crs->FullName);
|
||||
*/
|
||||
sprintf (Query,"INSERT INTO courses (DegCod,Year,InsCrsCod,"
|
||||
"AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName)"
|
||||
" VALUES ('%ld','%u','%s','N','%u','%ld','%s','%s')",
|
||||
Crs->DegCod,Crs->Year,
|
||||
Crs->InstitutionalCrsCod,
|
||||
Status,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Crs->ShortName,Crs->FullName);
|
||||
Crs->CrsCod = DB_QueryINSERTandReturnCode (Query,"can not create a new course");
|
||||
|
||||
/***** Write success message *****/
|
||||
|
@ -2151,7 +2182,7 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
|
|||
Crs->CrsCod = -1L;
|
||||
Crs->DegCod = -1L;
|
||||
Crs->Year = 0;
|
||||
Crs->Semester = 0;
|
||||
// Crs->Semester = 0;
|
||||
Crs->AllowDirectLogIn = false;
|
||||
Crs->Status = (Crs_Status_t) 0;
|
||||
Crs->RequesterUsrCod = -1L;
|
||||
|
@ -2182,7 +2213,7 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
|
|||
Crs->CrsCod = -1L;
|
||||
Crs->DegCod = -1L;
|
||||
Crs->Year = 0;
|
||||
Crs->Semester = 0;
|
||||
// Crs->Semester = 0;
|
||||
Crs->AllowDirectLogIn = false;
|
||||
Crs->Status = (Crs_Status_t) 0;
|
||||
Crs->RequesterUsrCod = -1L;
|
||||
|
@ -2218,7 +2249,7 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row)
|
|||
Crs->Year = Deg_ConvStrToYear (row[2]);
|
||||
|
||||
/***** Get semester (row[3]) *****/
|
||||
Crs->Semester = Deg_ConvStrToSemester (row[3]);
|
||||
// Crs->Semester = Deg_ConvStrToSemester (row[3]);
|
||||
|
||||
/***** Get institutional course code (row[4]) *****/
|
||||
strncpy (Crs->InstitutionalCrsCod,row[4],Crs_LENGTH_INSTITUTIONAL_CRS_COD);
|
||||
|
@ -2716,7 +2747,7 @@ void Crs_ChangeCrsYear (void)
|
|||
/*****************************************************************************/
|
||||
/********************** Change the semester of a course **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
void Crs_ChangeCrsSemester (void)
|
||||
{
|
||||
extern const char *Txt_The_semester_of_the_course_X_has_changed;
|
||||
|
@ -2728,43 +2759,43 @@ void Crs_ChangeCrsSemester (void)
|
|||
|
||||
Crs = &Gbl.Degs.EditingCrs;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get course code */
|
||||
***** Get parameters from form *****
|
||||
* Get course code *
|
||||
if ((Crs->CrsCod = Crs_GetParamOtherCrsCod ()) == -1L)
|
||||
Lay_ShowErrorAndExit ("Code of course is missing.");
|
||||
|
||||
/* Get parameter with semester */
|
||||
* Get parameter with semester *
|
||||
Par_GetParToText ("OthCrsSem",SemesterStr,1);
|
||||
NewSemester = Deg_ConvStrToSemester (SemesterStr);
|
||||
|
||||
/***** Get data of course *****/
|
||||
***** Get data of course *****
|
||||
Crs_GetDataOfCourseByCod (Crs);
|
||||
|
||||
if (Crs_CheckIfICanEdit (Crs))
|
||||
{
|
||||
/***** Update semester in table of courses *****/
|
||||
***** Update semester in table of courses *****
|
||||
sprintf (Query,"UPDATE courses SET Semester='%u' WHERE CrsCod='%ld'",
|
||||
NewSemester,Crs->CrsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the semester of a course");
|
||||
|
||||
Crs->Semester = NewSemester;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
***** Write message to show the change made *****
|
||||
sprintf (Gbl.Message,Txt_The_semester_of_the_course_X_has_changed,
|
||||
Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put link to go to course changed *****/
|
||||
***** Put link to go to course changed *****
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutLinkToGoToCrs (Crs);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
||||
/***** Show the form again *****/
|
||||
***** Show the form again *****
|
||||
Crs_ReqEditCourses ();
|
||||
}
|
||||
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/******** Change the institutional course code of the current course *********/
|
||||
/*****************************************************************************/
|
||||
|
@ -3097,7 +3128,7 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
|
|||
{
|
||||
extern const char *Txt_Degree;
|
||||
extern const char *Txt_Year_OF_A_DEGREE;
|
||||
extern const char *Txt_Semester_ABBREVIATION;
|
||||
// extern const char *Txt_Semester_ABBREVIATION;
|
||||
extern const char *Txt_Course;
|
||||
extern const char *Txt_Students_ABBREVIATION;
|
||||
extern const char *Txt_Teachers_ABBREVIATION;
|
||||
|
@ -3132,9 +3163,9 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
|
|||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
// "<th class=\"CENTER_MIDDLE\">"
|
||||
// "%s"
|
||||
// "</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -3147,7 +3178,7 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
|
|||
"</tr>",
|
||||
Txt_Degree,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Semester_ABBREVIATION,
|
||||
// Txt_Semester_ABBREVIATION,
|
||||
Txt_Course,
|
||||
Txt_Students_ABBREVIATION,
|
||||
Txt_Teachers_ABBREVIATION);
|
||||
|
@ -3181,7 +3212,7 @@ unsigned Crs_ListCrssFound (const char *Query)
|
|||
extern const char *Txt_courses;
|
||||
extern const char *Txt_Degree;
|
||||
extern const char *Txt_Year_OF_A_DEGREE;
|
||||
extern const char *Txt_Semester_ABBREVIATION;
|
||||
// extern const char *Txt_Semester_ABBREVIATION;
|
||||
extern const char *Txt_Course;
|
||||
extern const char *Txt_Students_ABBREVIATION;
|
||||
extern const char *Txt_Teachers_ABBREVIATION;
|
||||
|
@ -3218,9 +3249,9 @@ unsigned Crs_ListCrssFound (const char *Query)
|
|||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
// "<th class=\"CENTER_MIDDLE\">"
|
||||
// "%s"
|
||||
// "</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -3233,7 +3264,7 @@ unsigned Crs_ListCrssFound (const char *Query)
|
|||
"</tr>",
|
||||
Txt_Degree,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Semester_ABBREVIATION,
|
||||
// Txt_Semester_ABBREVIATION,
|
||||
Txt_Course,
|
||||
Txt_Students_ABBREVIATION,
|
||||
Txt_Teachers_ABBREVIATION);
|
||||
|
@ -3270,7 +3301,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
extern const char *Txt_Enrollment_not_confirmed;
|
||||
extern const char *Txt_Go_to_X;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
// extern const char *Txt_SEMESTER_OF_YEAR[1+2];
|
||||
struct Degree Deg;
|
||||
long CrsCod;
|
||||
unsigned NumStds;
|
||||
|
@ -3368,10 +3399,12 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
||||
|
||||
/***** Write semester (row[5]) *****/
|
||||
/*
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Style,BgColor,Txt_SEMESTER_OF_YEAR[Deg_ConvStrToSemester (row[5])]);
|
||||
*/
|
||||
|
||||
/***** Write course full name (row[6]) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
|
||||
|
|
|
@ -78,7 +78,7 @@ struct Course
|
|||
char InstitutionalCrsCod[Crs_LENGTH_INSTITUTIONAL_CRS_COD+1]; // Institutional code of the course
|
||||
long DegCod;
|
||||
unsigned Year; // Year: 0 (optatives), 1, 2, 3...
|
||||
unsigned Semester; // Semester: 0 (full year), 1 or 2
|
||||
// unsigned Semester; // Semester: 0 (full year), 1 or 2
|
||||
bool AllowDirectLogIn; // Students may enter directly, or must enter via external plugin?
|
||||
Crs_Status_t Status; // Course status
|
||||
long RequesterUsrCod; // User code of the person who requested the creation of this course
|
||||
|
@ -121,7 +121,7 @@ void Crs_RemoveCourseCompletely (long CrsCod);
|
|||
void Crs_ChangeInsCrsCod (void);
|
||||
void Crs_ChangeCrsDegree (void);
|
||||
void Crs_ChangeCrsYear (void);
|
||||
void Crs_ChangeCrsSemester (void);
|
||||
// void Crs_ChangeCrsSemester (void);
|
||||
void Crs_UpdateCurrentInstitutionalCrsCod (struct Course *Crs,const char *NewInstitutionalCrsCod);
|
||||
void Crs_RenameCourseShort (void);
|
||||
void Crs_RenameCourseFull (void);
|
||||
|
|
|
@ -558,6 +558,7 @@ mysql> DESCRIBE courses;
|
|||
+------------------+---------------+------+-----+---------+----------------+
|
||||
10 rows in set (0.01 sec)
|
||||
*/
|
||||
/*
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS courses ("
|
||||
"CrsCod INT NOT NULL AUTO_INCREMENT,"
|
||||
"DegCod INT NOT NULL DEFAULT -1,"
|
||||
|
@ -570,6 +571,18 @@ mysql> DESCRIBE courses;
|
|||
"ShortName VARCHAR(32) COLLATE latin1_spanish_ci NOT NULL,"
|
||||
"FullName VARCHAR(127) COLLATE latin1_spanish_ci NOT NULL,"
|
||||
"UNIQUE INDEX(CrsCod),INDEX(DegCod,Year,Semester),INDEX(Status))");
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS courses ("
|
||||
"CrsCod INT NOT NULL AUTO_INCREMENT,"
|
||||
"DegCod INT NOT NULL DEFAULT -1,"
|
||||
"Year TINYINT NOT NULL DEFAULT 0,"
|
||||
"InsCrsCod CHAR(7) NOT NULL,"
|
||||
"AllowDirectLogIn ENUM('N','Y') NOT NULL DEFAULT 'Y',"
|
||||
"Status TINYINT NOT NULL DEFAULT 0,"
|
||||
"RequesterUsrCod INT NOT NULL DEFAULT -1,"
|
||||
"ShortName VARCHAR(32) COLLATE latin1_spanish_ci NOT NULL,"
|
||||
"FullName VARCHAR(127) COLLATE latin1_spanish_ci NOT NULL,"
|
||||
"UNIQUE INDEX(CrsCod),INDEX(DegCod,Year),INDEX(Status))");
|
||||
|
||||
/***** Table crs_grp *****/
|
||||
/*
|
||||
|
|
|
@ -2161,7 +2161,7 @@ unsigned Deg_ConvStrToYear (const char *StrYear)
|
|||
/*****************************************************************************/
|
||||
/*********************** Convert string to semester **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
unsigned Deg_ConvStrToSemester (const char *StrSemester)
|
||||
{
|
||||
int Semester;
|
||||
|
@ -2174,7 +2174,7 @@ unsigned Deg_ConvStrToSemester (const char *StrSemester)
|
|||
return 0;
|
||||
return (unsigned) Semester;
|
||||
}
|
||||
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/************************** Create a new degree type *************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -115,7 +115,7 @@ void Deg_ReqEditDegreeTypes (void);
|
|||
void Deg_ShowDegsOfCurrentCtr (void);
|
||||
|
||||
unsigned Deg_ConvStrToYear (const char *StrYear);
|
||||
unsigned Deg_ConvStrToSemester (const char *StrSemester);
|
||||
// unsigned Deg_ConvStrToSemester (const char *StrSemester);
|
||||
|
||||
void Deg_EditDegrees (void);
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.Degs.EditingCrs.CrsCod = -1L;
|
||||
Gbl.Degs.EditingCrs.DegCod = -1L;
|
||||
Gbl.Degs.EditingCrs.Year = 0;
|
||||
Gbl.Degs.EditingCrs.Semester = 0;
|
||||
// Gbl.Degs.EditingCrs.Semester = 0;
|
||||
Gbl.Degs.EditingCrs.ShortName[0] = '\0';
|
||||
Gbl.Degs.EditingCrs.FullName[0] = '\0';
|
||||
|
||||
|
|
40
swad_text.c
40
swad_text.c
|
@ -33906,7 +33906,7 @@ const char *Txt_Select_the_groups_of_students_you_want_to_register_in_remove_fro
|
|||
#elif L==8
|
||||
"Select the groups of students you want to register in / remove from this course."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
/*
|
||||
const char *Txt_Semester =
|
||||
#if L==0
|
||||
"Quadrimestre / Semestre";
|
||||
|
@ -34011,7 +34011,7 @@ const char *Txt_SEMESTER_OF_YEAR[1 + 2] =
|
|||
"2nd" // Necessita de tradução
|
||||
#endif
|
||||
};
|
||||
|
||||
*/
|
||||
const char *Txt_Send =
|
||||
#if L==0
|
||||
"Enviar";
|
||||
|
@ -48525,45 +48525,45 @@ const char *Txt_XML_file_content =
|
|||
|
||||
const char *Txt_Year_OF_A_DEGREE = // 1, 2, 3..., not 1984, 2011...
|
||||
#if L==0
|
||||
"Curs";
|
||||
"Curs o semestre";
|
||||
#elif L==1
|
||||
"Jahr";
|
||||
"Jahr oder Semester";
|
||||
#elif L==2
|
||||
"Year";
|
||||
"Year or semester";
|
||||
#elif L==3
|
||||
"Curso";
|
||||
"Curso o semestre";
|
||||
#elif L==4
|
||||
"Année";
|
||||
"Année ou semestre";
|
||||
#elif L==5
|
||||
"Curso"; // Okoteve traducción
|
||||
"Curso o semestre"; // Okoteve traducción
|
||||
#elif L==6
|
||||
"Anno";
|
||||
"Anno o semestre";
|
||||
#elif L==7
|
||||
"Year"; // Potrzebujesz tlumaczenie
|
||||
"Rok lub semestr";
|
||||
#elif L==8
|
||||
"Ano";
|
||||
"Ano ou semestre";
|
||||
#endif
|
||||
|
||||
const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE] =
|
||||
{
|
||||
#if L==0
|
||||
"Opt./Libre conf." // Necessita traduccio
|
||||
"N.A."
|
||||
#elif L==1
|
||||
"Opt./Free choice" // Need Übersetzung
|
||||
"N.A."
|
||||
#elif L==2
|
||||
"Opt./Free choice"
|
||||
"N.A."
|
||||
#elif L==3
|
||||
"Opt./Libre conf."
|
||||
"N.A."
|
||||
#elif L==4
|
||||
"Opt./Free choice" // Besoin de traduction
|
||||
"N.A."
|
||||
#elif L==5
|
||||
"Opt./Libre conf." // Okoteve traducción
|
||||
"N.A." // Okoteve traducción
|
||||
#elif L==6
|
||||
"Opz./Scelta libera"
|
||||
"N.A."
|
||||
#elif L==7
|
||||
"Opt./Free choice" // Potrzebujesz tlumaczenie
|
||||
"N.D."
|
||||
#elif L==8
|
||||
"Opt./Free choice" // Necessita de tradução
|
||||
"N.A."
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
|
|
Loading…
Reference in New Issue