mirror of https://github.com/acanas/swad-core.git
Version 17.10.1
This commit is contained in:
parent
7c6774bc6c
commit
3b7c0a4c7b
|
@ -998,6 +998,9 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
/***** Remove the fields of course record in all courses *****/
|
||||
Rec_RemoveFieldsCrsRecordAll (UsrDat->UsrCod);
|
||||
|
||||
/***** Remove user from all his/her projects *****/
|
||||
Prj_RemoveUsrFromProjects (UsrDat->UsrCod);
|
||||
|
||||
/***** Remove user from all the attendance events *****/
|
||||
Att_RemoveUsrFromAllAttEvents (UsrDat->UsrCod);
|
||||
|
||||
|
|
|
@ -252,13 +252,18 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.10 (2017-09-24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.10.1 (2017-09-24)"
|
||||
#define CSS_FILE "swad17.0.css"
|
||||
#define JS_FILE "swad16.206.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 17.10.3: Sep 24, 2017 TODO: Add users to projects even if they don't belong to course. (? lines)
|
||||
Version 17.10.2: Sep 24, 2017 TODO: Check permission when editing projects.
|
||||
TODO: Check permission when removing a user from a project. (? lines)
|
||||
Version 17.10.1: Sep 24, 2017 Remove user in project when removing the user.
|
||||
Remove projects (and users in them) in a course when removing the course. (231345 lines)
|
||||
Version 17.10: Sep 24, 2017 Changes in permissions to view/edit projects.
|
||||
Show project URL in listings of projects. (231319 lines)
|
||||
Version 17.9.4: Sep 24, 2017 Changes in listing of projects. (231216 lines)
|
||||
|
|
|
@ -2194,6 +2194,9 @@ static void Crs_EmptyCourseCompletely (long CrsCod)
|
|||
/***** Remove assignments of the course *****/
|
||||
Asg_RemoveCrsAssignments (CrsCod);
|
||||
|
||||
/***** Remove projects of the course *****/
|
||||
Prj_RemoveCrsProjects (CrsCod);
|
||||
|
||||
/***** Remove attendance events of the course *****/
|
||||
Att_RemoveCrsAttEvents (CrsCod);
|
||||
|
||||
|
|
|
@ -956,7 +956,7 @@ static void Prj_ShowOneProjectWriteUsrs (long PrjCod,Prj_ProjectView_t ProjectVi
|
|||
NumUsrs = Prj_GetUsrsInPrj (PrjCod,RoleInProject,&mysql_res);
|
||||
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table>");
|
||||
Tbl_StartTable (2);
|
||||
|
||||
/***** Write users *****/
|
||||
for (NumUsr = 0;
|
||||
|
@ -1025,7 +1025,7 @@ static void Prj_ShowOneProjectWriteUsrs (long PrjCod,Prj_ProjectView_t ProjectVi
|
|||
}
|
||||
|
||||
/***** End table *****/
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
Tbl_EndTable ();
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -2415,18 +2415,38 @@ static void Prj_UpdateProject (struct Project *Prj)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Remove all the projects of a course ********************/
|
||||
/******************** Remove all the projects in a course ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_RemoveCrsProjects (long CrsCod)
|
||||
{
|
||||
char Query[512];
|
||||
char Query[256];
|
||||
|
||||
/***** Remove users in projects of the course *****/
|
||||
sprintf (Query,"DELETE FROM prj_usr USING projects,prj_usr"
|
||||
" WHERE projects.CrsCod=%ld"
|
||||
" AND projects.PrjCod=prj_usr.PrjCod",
|
||||
CrsCod);
|
||||
DB_QueryDELETE (Query,"can not remove all the projects of a course");
|
||||
|
||||
/***** Remove projects *****/
|
||||
sprintf (Query,"DELETE FROM projects WHERE CrsCod=%ld",CrsCod);
|
||||
DB_QueryDELETE (Query,"can not remove all the projects of a course");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Remove user from all his/her projects *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_RemoveUsrFromProjects (long UsrCod)
|
||||
{
|
||||
char Query[128];
|
||||
|
||||
/***** Remove user from projects *****/
|
||||
sprintf (Query,"DELETE FROM prj_usr WHERE UsrCod=%ld",UsrCod);
|
||||
DB_QueryDELETE (Query,"can not remove user from projects");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Get number of projects in a course *********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -121,9 +121,11 @@ void Prj_RemoveProject (void);
|
|||
void Prj_HideProject (void);
|
||||
void Prj_ShowProject (void);
|
||||
void Prj_RecFormProject (void);
|
||||
void Prj_RemoveCrsProjects (long CrsCod);
|
||||
unsigned Prj_GetNumProjectsInCrs(long CrsCod);
|
||||
|
||||
void Prj_RemoveCrsProjects (long CrsCod);
|
||||
void Prj_RemoveUsrFromProjects (long UsrCod);
|
||||
|
||||
unsigned Prj_GetNumProjectsInCrs(long CrsCod);
|
||||
unsigned Prj_GetNumCoursesWithProjects (Sco_Scope_t Scope);
|
||||
unsigned Prj_GetNumProjects (Sco_Scope_t Scope);
|
||||
|
||||
|
|
Loading…
Reference in New Issue