diff --git a/swad_changelog.h b/swad_changelog.h index aa428d86e..d27eb7d82 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate TODO: Attach pdf files in multimedia. */ -#define Log_PLATFORM_VERSION "SWAD 22.32.1 (2022-09-29)" +#define Log_PLATFORM_VERSION "SWAD 22.32.2 (2022-09-29)" #define CSS_FILE "swad22.22.1.css" #define JS_FILE "swad21.100.js" /* + Version 22.32.2: Sep 29, 2022 Changes in program resources and exams. (332637 lines) Version 22.32.1: Sep 29, 2022 Changes in program resources and calls for exams. (332635 lines) Version 22.32: Sep 29, 2022 Changes in program resources, assignments and projects. (332628 lines) Version 22.31: Sep 28, 2022 New action to view one project. diff --git a/swad_exam.c b/swad_exam.c index 99a6bdf25..a3771ffcc 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -354,6 +354,12 @@ static void Exa_PutIconsListExams (void *Exams) Ico_PutContextualIconToShowResults (NextAction[Gbl.Usrs.Me.Role.Logged],NULL, NULL,NULL); + /***** Link to get resource link *****/ + if (Gbl.Usrs.Me.Role.Logged == Rol_TCH || // Only if I am a teacher + Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // or a superuser + Ico_PutContextualIconToGetLink (ActReqLnkExa,NULL, + Exa_PutParams,Exams); + /***** Put icon to show a figure *****/ Fig_PutIconToShowFigure (Fig_EXAMS); } @@ -657,7 +663,6 @@ static void Exa_PutIconToShowResultsOfExam (void *Exams) Ico_PutContextualIconToShowResults (NextAction[Gbl.Usrs.Me.Role.Logged],ExaRes_RESULTS_BOX_ID, Exa_PutParams,Exams); - /***** Link to get resource link *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_TCH || // Only if I am a teacher Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // or a superuser diff --git a/swad_exam_resource.c b/swad_exam_resource.c index f6b556914..6203c1e64 100644 --- a/swad_exam_resource.c +++ b/swad_exam_resource.c @@ -41,7 +41,6 @@ void ExaRsc_GetLinkToExam (void) { extern const char *Txt_Link_to_resource_X_copied_into_clipboard; struct Exa_Exams Exams; - long ExaCod; char Title[Exa_MAX_BYTES_TITLE + 1]; /***** Reset exams context *****/ @@ -49,15 +48,12 @@ void ExaRsc_GetLinkToExam (void) /***** Get parameters *****/ Exa_GetParams (&Exams); - if (Exams.ExaCod <= 0) - Err_WrongExamExit (); - ExaCod = Exams.ExaCod; /***** Get exam title *****/ - ExaRsc_GetTitleFromExaCod (ExaCod,Title,sizeof (Title) - 1); + ExaRsc_GetTitleFromExaCod (Exams.ExaCod,Title,sizeof (Title) - 1); /***** Copy link to exam into resource clipboard *****/ - Prg_DB_CopyToClipboard (PrgRsc_EXAM,ExaCod); + Prg_DB_CopyToClipboard (PrgRsc_EXAM,Exams.ExaCod); /***** Write sucess message *****/ Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,