Version19.239.3

This commit is contained in:
acanas 2020-05-20 02:59:49 +02:00
parent 0e13038009
commit d91e3c8dc2
3 changed files with 29 additions and 14 deletions

View File

@ -557,10 +557,12 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.239.2 (2020-05-20)"
#define Log_PLATFORM_VERSION "SWAD 19.239.3 (2020-05-20)"
#define CSS_FILE "swad19.238.2.css"
#define JS_FILE "swad19.239.js"
/*
Version 19.239.3: May 20, 2020 Fixed bugs removing exam prints in a course.
Don't remove user's production in a course when removing the user individually. (301316 lines)
Version 19.239.2: May 20, 2020 Fixed bug removing media. (301301 lines)
Version 19.239.1: May 19, 2020 Changes in timeout message. (301300 lines)
Version 19.239: May 19, 2020 Fixed issue due to network timeout while answering exams. Reported by Nuria Torres Rosell. (301316 lines)

View File

@ -3450,7 +3450,7 @@ void Enr_RemUsrFromCrs1 (void)
{
if (Enr_CheckIfICanRemUsrFromCrs ())
Enr_EffectivelyRemUsrFromCrs (&Gbl.Usrs.Other.UsrDat,&Gbl.Hierarchy.Crs,
Enr_REMOVE_USR_PRODUCTION,
Enr_DO_NOT_REMOVE_USR_PRODUCTION,
Cns_VERBOSE);
else
Ale_CreateAlertUserNotFoundOrYouDoNotHavePermission ();

View File

@ -1469,15 +1469,22 @@ void ExaPrn_RemovePrintsMadeByUsrInCrs (long UsrCod,long CrsCod)
/***** Remove questions of exams prints made by the given user in the given course *****/
DB_QueryDELETE ("can not remove exams prints made by a user in a course",
"DELETE FROM exa_print_questions"
" USING exa_prints,exa_print_questions"
" WHERE exa_prints.CrsCod=%ld AND exa_prints.UsrCod=%ld"
" AND exa_prints.ExaCod=exa_print_questions.ExaCod",
" USING exa_exams,exa_sessions,exa_prints,exa_print_questions"
" WHERE exa_exams.CrsCod=%ld"
" AND exa_exams.ExaCod=exa_sessions.ExaCod"
" AND exa_sessions.SesCod=exa_prints.SesCod"
" AND exa_prints.UsrCod=%ld"
" AND exa_prints.PrnCod=exa_print_questions.PrnCod",
CrsCod,UsrCod);
/***** Remove exams prints made by the given user in the given course *****/
DB_QueryDELETE ("can not remove exams prints made by a user in a course",
"DELETE FROM exa_prints"
" WHERE CrsCod=%ld AND UsrCod=%ld",
" USING exa_exams,exa_sessions,exa_prints"
" WHERE exa_exams.CrsCod=%ld"
" AND exa_exams.ExaCod=exa_sessions.ExaCod"
" AND exa_sessions.SesCod=exa_prints.SesCod"
" AND exa_prints.UsrCod=%ld",
CrsCod,UsrCod);
}
@ -1487,16 +1494,22 @@ void ExaPrn_RemovePrintsMadeByUsrInCrs (long UsrCod,long CrsCod)
void ExaPrn_RemoveCrsPrints (long CrsCod)
{
/***** Remove questions of exams prints made in the course *****/
DB_QueryDELETE ("can not remove exams prints made in a course",
/***** Remove questions of exams prints made by the given user in the given course *****/
DB_QueryDELETE ("can not remove exams prints in a course",
"DELETE FROM exa_print_questions"
" USING exa_prints,exa_print_questions"
" WHERE exa_prints.CrsCod=%ld"
" AND exa_prints.ExaCod=exa_print_questions.ExaCod",
" USING exa_exams,exa_sessions,exa_prints,exa_print_questions"
" WHERE exa_exams.CrsCod=%ld"
" AND exa_exams.ExaCod=exa_sessions.ExaCod"
" AND exa_sessions.SesCod=exa_prints.SesCod"
" AND exa_prints.PrnCod=exa_print_questions.PrnCod",
CrsCod);
/***** Remove exam prints made in the course *****/
DB_QueryDELETE ("can not remove exams prints made in a course",
"DELETE FROM exa_prints WHERE CrsCod=%ld",
/***** Remove exams prints made by the given user in the given course *****/
DB_QueryDELETE ("can not remove exams prints in a course",
"DELETE FROM exa_prints"
" USING exa_exams,exa_sessions,exa_prints"
" WHERE exa_exams.CrsCod=%ld"
" AND exa_exams.ExaCod=exa_sessions.ExaCod"
" AND exa_sessions.SesCod=exa_prints.SesCod",
CrsCod);
}