diff --git a/sql/swad.sql b/sql/swad.sql
index 75f2f2af4..0d15d304b 100644
--- a/sql/swad.sql
+++ b/sql/swad.sql
@@ -236,7 +236,6 @@ CREATE TABLE IF NOT EXISTS courses (
CrsCod INT NOT NULL AUTO_INCREMENT,
DegCod INT NOT NULL DEFAULT -1,
Year TINYINT NOT NULL DEFAULT 0,
- Semester TINYINT NOT NULL DEFAULT 0,
InsCrsCod CHAR(7) NOT NULL,
AllowDirectLogIn ENUM('N','Y') NOT NULL DEFAULT 'Y',
Status TINYINT NOT NULL DEFAULT 0,
@@ -244,7 +243,7 @@ CREATE TABLE IF NOT EXISTS 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(DegCod,Year),
INDEX(Status));
--
-- Table crs_grp: stores the groups in courses
diff --git a/swad_action.c b/swad_action.c
index be5f059e3..2b240973f 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -75,7 +75,7 @@ extern struct Globals Gbl;
/************************ Internal global variables **************************/
/*****************************************************************************/
/*
-1124 actions in one CGI:
+1123 actions in one CGI:
0. ActAll Any action (used for statistics)
1. ActUnk Unknown action
2. ActHom Show home menu
@@ -372,7 +372,6 @@ 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
-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 +1778,6 @@ 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},*/
/* 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 +3361,6 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
-1, // #559 (obsolete action)
ActRemCrs, // #560
ActChgCrsYea, // #561
- // ActChgCrsSem, // #562
-1, // #562
ActRenCrsSho, // #563
ActRenCrsFul, // #564
diff --git a/swad_action.h b/swad_action.h
index 8f83bcb75..a6a6771c1 100644
--- a/swad_action.h
+++ b/swad_action.h
@@ -384,7 +384,6 @@ 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+ 18)
#define ActRenCrsFul (ActDowComCtr+ 19)
#define ActChgCrsSta (ActDowComCtr+ 20)
diff --git a/swad_changelog.h b/swad_changelog.h
index fedbde85b..9373830f9 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -106,22 +106,23 @@
// TODO: Do not show e-mails of administrators and teachers in lists openly
// TODO: Show nicknames of users in lists?
// TODO: Form to register and remove system admins
-// TODO: Edition of courses: Remove semester
-// TODO: Edition of courses: Rename "Optativas/libre conf." to "Optativas varios cursos"
-// TODO: Edition of courses: Rename "Curso" to "Año / semestre / cuatrimestre"
-// TODO: Listing of courses: Put "Optativas" year at the end
+// TODO: Listing of courses: Put "N.A." year at the end?
// TODO: Fix this bug: when an admin clicks on "Use this email" in the email of another user the email was confirmed, the email becomes unconfirmed
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.58 (2015/12/06)"
+#define Log_PLATFORM_VERSION "SWAD 15.58.1 (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.1: Dec 06, 2015 Removed unused code related to semester. (186960 lines)
+ 1 change necessary in database:
+ALTER TABLE courses DROP COLUMN Semester;
+
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';
diff --git a/swad_course.c b/swad_course.c
index a474014f8..7fe0514fb 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -151,8 +151,6 @@ 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_Institutional_code;
extern const char *Txt_Internal_code;
extern const char *Txt_Shortcut;
@@ -164,7 +162,6 @@ static void Crs_Configuration (bool PrintView)
extern const char *Txt_Save;
Act_Action_t Superaction;
unsigned Year;
- // unsigned Semester;
struct Ind_IndicatorsCrs Indicators;
bool IsForm = (!PrintView && Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER);
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
@@ -281,34 +278,6 @@ static void Crs_Configuration (bool PrintView)
fprintf (Gbl.F.Out,""
"");
- /***** Course semester *****/
- /*
- fprintf (Gbl.F.Out,"
"
- ""
- "%s:"
- " | "
- "",
- The_ClassForm[Gbl.Prefs.Theme],
- Txt_Semester);
- if (IsForm)
- {
- fprintf (Gbl.F.Out,"");
- }
- else
- fprintf (Gbl.F.Out,"%s",Txt_SEMESTER_OF_YEAR[Gbl.CurrentCrs.Crs.Semester]);
- fprintf (Gbl.F.Out," | "
- "
");
- */
-
if (!PrintView)
{
/***** Institutional code of the course *****/
@@ -495,7 +464,6 @@ void Crs_ChangeCourseConfig (void)
char Query[512];
char YearStr[2+1];
char YN[1+1];
- // char SemesterStr[1+1];
/***** Get parameters from form *****/
/* Get institutional code */
@@ -505,27 +473,11 @@ void Crs_ChangeCourseConfig (void)
Par_GetParToText ("OthCrsYear",YearStr,2);
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,
- Gbl.CurrentCrs.Crs.Year,
- Gbl.CurrentCrs.Crs.Semester,
- Gbl.CurrentCrs.Crs.AllowDirectLogIn ? 'Y' :
- 'N',
- Gbl.CurrentCrs.Crs.CrsCod);
- */
sprintf (Query,"UPDATE courses SET InsCrsCod='%s',Year='%u',AllowDirectLogIn='%c'"
" WHERE CrsCod='%ld'",
Gbl.CurrentCrs.Crs.InstitutionalCrsCod,
@@ -1076,13 +1028,13 @@ static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses)
switch (WhatCourses)
{
case Crs_ACTIVE_COURSES:
- sprintf (Query,"SELECT CrsCod,DegCod,Year,Semester,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
+ sprintf (Query,"SELECT CrsCod,DegCod,Year,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
" FROM courses WHERE DegCod='%ld' AND Status=0"
" ORDER BY Year,ShortName",
Gbl.CurrentDeg.Deg.DegCod);
break;
case Crs_ALL_COURSES_EXCEPT_REMOVED:
- sprintf (Query,"SELECT CrsCod,DegCod,Year,Semester,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
+ sprintf (Query,"SELECT CrsCod,DegCod,Year,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
" FROM courses WHERE DegCod='%ld' AND (Status & %u)=0"
" ORDER BY Year,ShortName",
Gbl.CurrentDeg.Deg.DegCod,
@@ -1276,7 +1228,6 @@ 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_Go_to_X;
extern const char *Txt_COURSE_STATUS[Crs_NUM_STATUS_TXT];
struct Course *Crs;
@@ -1348,15 +1299,6 @@ static void Crs_ListCoursesForSeeing (void)
TxtClassNormal,BgColor,
Txt_YEAR_OF_DEGREE[Crs->Year]);
- /* Course semester */
- /*
- fprintf (Gbl.F.Out,""
- "%s"
- " | ",
- TxtClassNormal,BgColor,
- Txt_SEMESTER_OF_YEAR[Crs->Semester]);
- */
-
/* Course full name */
fprintf (Gbl.F.Out,"",
TxtClassStrong,BgColor);
@@ -1405,12 +1347,10 @@ 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_COURSE_STATUS[Crs_NUM_STATUS_TXT];
struct Course *Crs;
unsigned Year;
unsigned YearAux;
- // unsigned Semester;
unsigned NumDeg;
unsigned NumCrs;
struct UsrData UsrDat;
@@ -1529,34 +1469,6 @@ static void Crs_ListCoursesForEdition (void)
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]);
fprintf (Gbl.F.Out," | ");
- /* Course semester */
- /*
- fprintf (Gbl.F.Out,"");
- if (ICanEdit)
- {
- Act_FormStart (ActChgCrsSem);
- Crs_PutParamOtherCrsCod (Crs->CrsCod);
- fprintf (Gbl.F.Out,"");
- Act_FormEnd ();
- }
- else
- fprintf (Gbl.F.Out,"%s",Txt_SEMESTER_OF_YEAR[Crs->Semester]);
- fprintf (Gbl.F.Out," | ");
- */
-
/* Course short name */
fprintf (Gbl.F.Out,"");
if (ICanEdit)
@@ -1711,12 +1623,10 @@ 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_COURSE_STATUS[Crs_NUM_STATUS_TXT];
extern const char *Txt_Create_course;
struct Course *Crs;
unsigned Year;
- // unsigned Semester;
/***** Start form *****/
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM)
@@ -1779,22 +1689,6 @@ static void Crs_PutFormToCreateCourse (void)
fprintf (Gbl.F.Out,""
" | ");
- /***** Semester *****/
- /*
- fprintf (Gbl.F.Out,""
- ""
- " | ");
- */
-
/***** Course short name *****/
fprintf (Gbl.F.Out,""
""
"%s"
""
- // " | "
- // "%s"
- // " | "
""
"%s"
" | "
@@ -1884,7 +1774,6 @@ static void Crs_PutHeadCoursesForSeeing (void)
"",
Txt_Institutional_BR_code,
Txt_Year_OF_A_DEGREE,
- // Txt_Semester_ABBREVIATION,
Txt_Course,
Txt_Students_ABBREVIATION,
Txt_Teachers_ABBREVIATION,
@@ -1902,7 +1791,6 @@ 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_Short_name;
extern const char *Txt_Full_name;
extern const char *Txt_Students_ABBREVIATION;
@@ -1921,9 +1809,6 @@ static void Crs_PutHeadCoursesForEdition (void)
""
"%s"
" | "
- // ""
- // "%s"
- // " | "
""
"%s"
" | "
@@ -1950,7 +1835,6 @@ static void Crs_PutHeadCoursesForEdition (void)
Txt_Institutional_code,Txt_optional,
Txt_Degree,
Txt_Year_OF_A_DEGREE,
- // Txt_Semester_ABBREVIATION,
Txt_Short_name,
Txt_Full_name,
Txt_Students_ABBREVIATION,
@@ -2046,7 +1930,6 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
static void Crs_GetParamsNewCourse (struct Course *Crs)
{
char YearStr[2+1];
- // char SemesterStr[1+1];
/***** Get parameters of the course from form *****/
/* Get institutional code */
@@ -2056,12 +1939,6 @@ static void Crs_GetParamsNewCourse (struct Course *Crs)
Par_GetParToText ("OthCrsYear",YearStr,2);
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);
@@ -2095,16 +1972,6 @@ 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')",
- Crs->DegCod,Crs->Year,Crs->Semester,
- Crs->InstitutionalCrsCod,
- 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')",
@@ -2182,7 +2049,6 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
Crs->CrsCod = -1L;
Crs->DegCod = -1L;
Crs->Year = 0;
- // Crs->Semester = 0;
Crs->AllowDirectLogIn = false;
Crs->Status = (Crs_Status_t) 0;
Crs->RequesterUsrCod = -1L;
@@ -2195,7 +2061,7 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
}
/***** Get data of a course from database *****/
- sprintf (Query,"SELECT CrsCod,DegCod,Year,Semester,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
+ sprintf (Query,"SELECT CrsCod,DegCod,Year,InsCrsCod,AllowDirectLogIn,Status,RequesterUsrCod,ShortName,FullName"
" FROM courses WHERE CrsCod='%ld'",
Crs->CrsCod);
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get data of a course");
@@ -2213,7 +2079,6 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
Crs->CrsCod = -1L;
Crs->DegCod = -1L;
Crs->Year = 0;
- // Crs->Semester = 0;
Crs->AllowDirectLogIn = false;
Crs->Status = (Crs_Status_t) 0;
Crs->RequesterUsrCod = -1L;
@@ -2248,29 +2113,26 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row)
/***** Get year (row[2]) *****/
Crs->Year = Deg_ConvStrToYear (row[2]);
- /***** Get semester (row[3]) *****/
- // Crs->Semester = Deg_ConvStrToSemester (row[3]);
-
- /***** Get institutional course code (row[4]) *****/
- strncpy (Crs->InstitutionalCrsCod,row[4],Crs_LENGTH_INSTITUTIONAL_CRS_COD);
+ /***** Get institutional course code (row[3]) *****/
+ strncpy (Crs->InstitutionalCrsCod,row[3],Crs_LENGTH_INSTITUTIONAL_CRS_COD);
Crs->InstitutionalCrsCod[Crs_LENGTH_INSTITUTIONAL_CRS_COD] = '\0';
- /***** Get whether this course allows direct log in or not (row[5]) *****/
- Crs->AllowDirectLogIn = (Str_ConvertToUpperLetter (row[5][0]) == 'Y');
+ /***** Get whether this course allows direct log in or not (row[4]) *****/
+ Crs->AllowDirectLogIn = (Str_ConvertToUpperLetter (row[4][0]) == 'Y');
- /***** Get course status (row[6]) *****/
- if (sscanf (row[6],"%u",&(Crs->Status)) != 1)
+ /***** Get course status (row[5]) *****/
+ if (sscanf (row[5],"%u",&(Crs->Status)) != 1)
Lay_ShowErrorAndExit ("Wrong course status.");
- /***** Get requester user'code (row[7]) *****/
- Crs->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[7]);
+ /***** Get requester user'code (row[6]) *****/
+ Crs->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[6]);
- /***** Get the short name of the course (row[8]) *****/
- strncpy (Crs->ShortName,row[8],Crs_MAX_LENGTH_COURSE_SHORT_NAME);
+ /***** Get the short name of the course (row[7]) *****/
+ strncpy (Crs->ShortName,row[7],Crs_MAX_LENGTH_COURSE_SHORT_NAME);
Crs->ShortName[Crs_MAX_LENGTH_COURSE_SHORT_NAME] = '\0';
- /***** Get the full name of the course (row[9]) *****/
- strncpy (Crs->FullName,row[9],Crs_MAX_LENGTH_COURSE_FULL_NAME);
+ /***** Get the full name of the course (row[8]) *****/
+ strncpy (Crs->FullName,row[8],Crs_MAX_LENGTH_COURSE_FULL_NAME);
Crs->FullName[Crs_MAX_LENGTH_COURSE_FULL_NAME] = '\0';
/***** Get number of students *****/
@@ -2744,58 +2606,6 @@ void Crs_ChangeCrsYear (void)
Crs_ReqEditCourses ();
}
-/*****************************************************************************/
-/********************** Change the semester of a course **********************/
-/*****************************************************************************/
-/*
-void Crs_ChangeCrsSemester (void)
- {
- extern const char *Txt_The_semester_of_the_course_X_has_changed;
- extern const char *Txt_You_dont_have_permission_to_edit_this_course;
- struct Course *Crs;
- char Query[512];
- char SemesterStr[1+1];
- unsigned NewSemester;
-
- Crs = &Gbl.Degs.EditingCrs;
-
- ***** Get parameters from form *****
- * Get course code *
- if ((Crs->CrsCod = Crs_GetParamOtherCrsCod ()) == -1L)
- Lay_ShowErrorAndExit ("Code of course is missing.");
-
- * Get parameter with semester *
- Par_GetParToText ("OthCrsSem",SemesterStr,1);
- NewSemester = Deg_ConvStrToSemester (SemesterStr);
-
- ***** Get data of course *****
- Crs_GetDataOfCourseByCod (Crs);
-
- if (Crs_CheckIfICanEdit (Crs))
- {
- ***** 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 *****
- 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 *****
- 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 *****
- Crs_ReqEditCourses ();
- }
-*/
/*****************************************************************************/
/******** Change the institutional course code of the current course *********/
/*****************************************************************************/
@@ -3128,7 +2938,6 @@ 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_Course;
extern const char *Txt_Students_ABBREVIATION;
extern const char *Txt_Teachers_ABBREVIATION;
@@ -3140,14 +2949,14 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
/***** Get courses of a user from database *****/
sprintf (Query,"SELECT degrees.DegCod,courses.CrsCod,degrees.ShortName,degrees.FullName,"
- "courses.Year,courses.Semester,courses.FullName,centres.ShortName,crs_usr.Accepted"
+ "courses.Year,courses.FullName,centres.ShortName,crs_usr.Accepted"
" FROM crs_usr,courses,degrees,centres"
" WHERE crs_usr.UsrCod='%ld'"
" AND crs_usr.Role='%u'"
" AND crs_usr.CrsCod=courses.CrsCod"
" AND courses.DegCod=degrees.DegCod"
" AND degrees.CtrCod=centres.CtrCod"
- " ORDER BY degrees.FullName,courses.Year,courses.Semester,courses.FullName",
+ " ORDER BY degrees.FullName,courses.Year,courses.FullName",
UsrCod,(unsigned) Role);
/***** List the courses (one row per course) *****/
@@ -3163,9 +2972,6 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
""
"%s"
" | "
- // ""
- // "%s"
- // " | "
""
"%s"
" | "
@@ -3178,7 +2984,6 @@ void Crs_GetAndWriteCrssOfAUsr (long UsrCod,Rol_Role_t Role)
"",
Txt_Degree,
Txt_Year_OF_A_DEGREE,
- // Txt_Semester_ABBREVIATION,
Txt_Course,
Txt_Students_ABBREVIATION,
Txt_Teachers_ABBREVIATION);
@@ -3212,7 +3017,6 @@ 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_Course;
extern const char *Txt_Students_ABBREVIATION;
extern const char *Txt_Teachers_ABBREVIATION;
@@ -3249,9 +3053,6 @@ unsigned Crs_ListCrssFound (const char *Query)
""
"%s"
" | "
- // ""
- // "%s"
- // " | "
""
"%s"
" | "
@@ -3264,7 +3065,6 @@ unsigned Crs_ListCrssFound (const char *Query)
"",
Txt_Degree,
Txt_Year_OF_A_DEGREE,
- // Txt_Semester_ABBREVIATION,
Txt_Course,
Txt_Students_ABBREVIATION,
Txt_Teachers_ABBREVIATION);
@@ -3301,7 +3101,6 @@ 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];
struct Degree Deg;
long CrsCod;
unsigned NumStds;
@@ -3317,9 +3116,8 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
degrees.ShortName, 2
degrees.FullName, 3
courses.Year, 4
- courses.Semester, 5
- courses.FullName, 6
- centres.ShortName 7
+ courses.FullName, 5
+ centres.ShortName 6
*/
/***** Get degree code (row[0]) *****/
@@ -3377,7 +3175,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
StyleNoBR,BgColor,NumCrs);
/***** Write degree logo, degree short name (row[2])
- and centre short name (row[7]) *****/
+ and centre short name (row[6]) *****/
fprintf (Gbl.F.Out,"",
StyleNoBR,BgColor);
Act_FormGoToStart (ActSeeDegInf);
@@ -3388,7 +3186,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
16,"CENTER_TOP",true);
fprintf (Gbl.F.Out," %s (%s)"
"",
- row[2],row[7]);
+ row[2],row[6]);
Act_FormEnd ();
fprintf (Gbl.F.Out," | ");
@@ -3398,22 +3196,14 @@ 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,""
- "%s"
- " | ",
- Style,BgColor,Txt_SEMESTER_OF_YEAR[Deg_ConvStrToSemester (row[5])]);
- */
-
- /***** Write course full name (row[6]) *****/
+ /***** Write course full name (row[5]) *****/
fprintf (Gbl.F.Out,"",
Style,BgColor);
Act_FormGoToStart (ActSeeCrsInf);
Crs_PutParamCrsCod (CrsCod);
sprintf (Gbl.Title,Txt_Go_to_X,row[6]);
Act_LinkFormSubmit (Gbl.Title,Style);
- fprintf (Gbl.F.Out,"%s",row[6]);
+ fprintf (Gbl.F.Out,"%s",row[5]);
Act_FormEnd ();
fprintf (Gbl.F.Out," | ");
diff --git a/swad_course.h b/swad_course.h
index 7e89fa701..c0318a434 100644
--- a/swad_course.h
+++ b/swad_course.h
@@ -78,7 +78,6 @@ 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
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 +120,6 @@ void Crs_RemoveCourseCompletely (long CrsCod);
void Crs_ChangeInsCrsCod (void);
void Crs_ChangeCrsDegree (void);
void Crs_ChangeCrsYear (void);
-// void Crs_ChangeCrsSemester (void);
void Crs_UpdateCurrentInstitutionalCrsCod (struct Course *Crs,const char *NewInstitutionalCrsCod);
void Crs_RenameCourseShort (void);
void Crs_RenameCourseFull (void);
diff --git a/swad_database.c b/swad_database.c
index a9f8e392f..746629e26 100644
--- a/swad_database.c
+++ b/swad_database.c
@@ -548,7 +548,6 @@ mysql> DESCRIBE courses;
| CrsCod | int(11) | NO | PRI | NULL | auto_increment |
| DegCod | int(11) | NO | MUL | -1 | |
| Year | tinyint(4) | NO | | 0 | |
-| Semester | tinyint(4) | NO | | 0 | |
| InsCrsCod | char(7) | NO | | NULL | |
| AllowDirectLogIn | enum('N','Y') | NO | | Y | |
| Status | tinyint(4) | NO | MUL | 0 | |
@@ -556,22 +555,8 @@ mysql> DESCRIBE courses;
| ShortName | varchar(32) | NO | | NULL | |
| FullName | varchar(127) | NO | | NULL | |
+------------------+---------------+------+-----+---------+----------------+
-10 rows in set (0.01 sec)
+9 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,"
- "Year TINYINT NOT NULL DEFAULT 0,"
- "Semester 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,Semester),INDEX(Status))");
- */
DB_CreateTable ("CREATE TABLE IF NOT EXISTS courses ("
"CrsCod INT NOT NULL AUTO_INCREMENT,"
"DegCod INT NOT NULL DEFAULT -1,"
diff --git a/swad_degree.c b/swad_degree.c
index 64fd8dcd4..fc70614bd 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -2158,23 +2158,6 @@ unsigned Deg_ConvStrToYear (const char *StrYear)
return (unsigned) Year;
}
-/*****************************************************************************/
-/*********************** Convert string to semester **************************/
-/*****************************************************************************/
-/*
-unsigned Deg_ConvStrToSemester (const char *StrSemester)
- {
- int Semester;
-
- if (sscanf (StrSemester,"%d",&Semester) != 1)
- return 0;
- if (Semester < 0)
- return 0;
- if (Semester > 2)
- return 0;
- return (unsigned) Semester;
- }
-*/
/*****************************************************************************/
/************************** Create a new degree type *************************/
/*****************************************************************************/
diff --git a/swad_degree.h b/swad_degree.h
index 817a04a64..2c939c6f7 100644
--- a/swad_degree.h
+++ b/swad_degree.h
@@ -115,7 +115,6 @@ void Deg_ReqEditDegreeTypes (void);
void Deg_ShowDegsOfCurrentCtr (void);
unsigned Deg_ConvStrToYear (const char *StrYear);
-// unsigned Deg_ConvStrToSemester (const char *StrSemester);
void Deg_EditDegrees (void);
diff --git a/swad_global.c b/swad_global.c
index fc41c0bd2..ba1edea68 100644
--- a/swad_global.c
+++ b/swad_global.c
@@ -298,25 +298,25 @@ void Gbl_InitializeGlobals (void)
Gbl.Degs.AllDegs.Num = 0;
Gbl.Degs.AllDegs.Lst = NULL;
- Gbl.Degs.EditingDegTyp.DegTypCod = -1L;
- Gbl.Degs.EditingDegTyp.DegTypName[0] = '\0';
+ Gbl.Degs.EditingDegTyp.DegTypCod = -1L;
+ Gbl.Degs.EditingDegTyp.DegTypName[0] = '\0';
Gbl.Degs.EditingDegTyp.AllowDirectLogIn = true;
- Gbl.Degs.EditingDeg.DegCod = -1L;
+ Gbl.Degs.EditingDeg.DegCod = -1L;
Gbl.Degs.EditingDeg.ShortName[0] = '\0';
- Gbl.Degs.EditingDeg.FullName[0] = '\0';
- Gbl.Degs.EditingDeg.FirstYear = Gbl.Degs.EditingDeg.LastYear = 0;
- Gbl.Degs.EditingDeg.OptYear = false;
- Gbl.Degs.EditingDeg.WWW[0] = '\0';
- Gbl.Degs.EditingDeg.NumCourses = 0;
- Gbl.Degs.EditingDeg.LstCrss = NULL;
+ Gbl.Degs.EditingDeg.FullName[0] = '\0';
+ Gbl.Degs.EditingDeg.FirstYear =
+ Gbl.Degs.EditingDeg.LastYear = 0;
+ Gbl.Degs.EditingDeg.OptYear = false;
+ Gbl.Degs.EditingDeg.WWW[0] = '\0';
+ Gbl.Degs.EditingDeg.NumCourses = 0;
+ Gbl.Degs.EditingDeg.LstCrss = NULL;
- Gbl.Degs.EditingCrs.CrsCod = -1L;
- Gbl.Degs.EditingCrs.DegCod = -1L;
- Gbl.Degs.EditingCrs.Year = 0;
- // Gbl.Degs.EditingCrs.Semester = 0;
+ Gbl.Degs.EditingCrs.CrsCod = -1L;
+ Gbl.Degs.EditingCrs.DegCod = -1L;
+ Gbl.Degs.EditingCrs.Year = 0;
Gbl.Degs.EditingCrs.ShortName[0] = '\0';
- Gbl.Degs.EditingCrs.FullName[0] = '\0';
+ Gbl.Degs.EditingCrs.FullName[0] = '\0';
Gbl.CurrentCrs.Grps.NumGrps = 0;
Gbl.CurrentCrs.Grps.WhichGrps = Grp_ALL_GROUPS;
diff --git a/swad_search.c b/swad_search.c
index 1e3396fac..f4369bcbb 100644
--- a/swad_search.c
+++ b/swad_search.c
@@ -698,7 +698,7 @@ static unsigned Sch_SearchCoursesInDB (const char *RangeQuery)
{
/***** Query database and list courses found *****/
sprintf (Query,"SELECT degrees.DegCod,courses.CrsCod,degrees.ShortName,degrees.FullName,"
- "courses.Year,courses.Semester,courses.FullName,centres.ShortName"
+ "courses.Year,courses.FullName,centres.ShortName"
" FROM courses,degrees,centres,institutions,countries"
" WHERE %s"
" AND courses.DegCod=degrees.DegCod"
@@ -706,7 +706,7 @@ static unsigned Sch_SearchCoursesInDB (const char *RangeQuery)
" AND centres.InsCod=institutions.InsCod"
" AND institutions.CtyCod=countries.CtyCod"
"%s"
- " ORDER BY courses.FullName,institutions.FullName,degrees.FullName,courses.Year,courses.Semester",
+ " ORDER BY courses.FullName,institutions.FullName,degrees.FullName,courses.Year",
SearchQuery,RangeQuery);
return Crs_ListCrssFound (Query);
}
diff --git a/swad_text.c b/swad_text.c
index 4c3741d54..d3348a976 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -33906,112 +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";
-#elif L==1
- "Semester";
-#elif L==2
- "Semester";
-#elif L==3
- "Cuatrimestre / Semestre";
-#elif L==4
- "Semestre";
-#elif L==5
- "Cuatrimestre / Semestre"; // Okoteve traducción
-#elif L==6
- "Semestre";
-#elif L==7
- "Semestr";
-#elif L==8
- "Semestre";
-#endif
-const char *Txt_Semester_ABBREVIATION =
-#if L==0
- "Quadr./
Semes.";
-#elif L==1
- "Semester";
-#elif L==2
- "Semester";
-#elif L==3
- "Cuatr./
Semes.";
-#elif L==4
- "Semestre";
-#elif L==5
- "Cuatr./
Semes."; // Okoteve traducción
-#elif L==6
- "Semestre";
-#elif L==7
- "Semestr";
-#elif L==8
- "Semestre";
-#endif
-
-const char *Txt_SEMESTER_OF_YEAR[1 + 2] =
- {
-#if L==0
- "Anual" // Necessita traduccio
-#elif L==1
- "Yearlong" // Need Übersetzung
-#elif L==2
- "Yearlong"
-#elif L==3
- "Anual"
-#elif L==4
- "Yearlong" // Besoin de traduction
-#elif L==5
- "Anual" // Okoteve traducción
-#elif L==6
- "Annuale"
-#elif L==7
- "Yearlong" // Potrzebujesz tlumaczenie
-#elif L==8
- "Yearlong" // Necessita de tradução
-#endif
- ,
-#if L==0
- "1º" // Necessita traduccio
-#elif L==1
- "1st" // Need Übersetzung
-#elif L==2
- "1st"
-#elif L==3
- "1º"
-#elif L==4
- "1st" // Besoin de traduction
-#elif L==5
- "1º" // Okoteve traducción
-#elif L==6
- "Primo"
-#elif L==7
- "1st" // Potrzebujesz tlumaczenie
-#elif L==8
- "1st" // Necessita de tradução
-#endif
- ,
-#if L==0
- "2º" // Necessita traduccio
-#elif L==1
- "2nd" // Need Übersetzung
-#elif L==2
- "2nd"
-#elif L==3
- "2º"
-#elif L==4
- "2nd" // Besoin de traduction
-#elif L==5
- "2º" // Okoteve traducción
-#elif L==6
- "Secondo"
-#elif L==7
- "2nd" // Potrzebujesz tlumaczenie
-#elif L==8
- "2nd" // Necessita de tradução
-#endif
- };
-*/
const char *Txt_Send =
#if L==0
"Enviar";
@@ -42039,27 +41934,6 @@ const char *Txt_The_search_term_must_be_longer =
"The search term must be longer."; // Necessita de tradução
#endif
-const char *Txt_The_semester_of_the_course_X_has_changed = // Warning: it is very important to include %s in the following sentences
-#if L==0
- "El cuatrimestre/semestre de la asignatura %s ha cambiado."; // Necessita traduccio
-#elif L==1
- "The semester of the couse %s has changed."; // Need Übersetzung
-#elif L==2
- "The semester of the couse %s has changed.";
-#elif L==3
- "El cuatrimestre/semestre de la asignatura %s ha cambiado.";
-#elif L==4
- "The semester of the couse %s has changed."; // Besoin de traduction
-#elif L==5
- "El cuatrimestre/semestre de la asignatura %s ha cambiado."; // Okoteve traducción
-#elif L==6
- "Il semestre del corso %s è cambiato.";
-#elif L==7
- "The semester of the couse %s has changed."; // Potrzebujesz tlumaczenie
-#elif L==8
- "The semester of the couse %s has changed."; // Necessita de tradução
-#endif
-
const char *Txt_The_session_has_been_closed = // Closed by user
#if L==0
"La sessió ha finalitzat.";