diff --git a/swad_changelog.h b/swad_changelog.h index 11f6dddb2..91ed7a194 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,10 +606,15 @@ 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.3 (2022-09-29)" +#define Log_PLATFORM_VERSION "SWAD 22.32.4 (2022-09-29)" #define CSS_FILE "swad22.22.1.css" #define JS_FILE "swad21.100.js" /* + Version 22.32.8: Sep 29, 2022 TODO: Changes in program resources and course forums. (? lines) + Version 22.32.7: Sep 29, 2022 TODO: Changes in program resources and attendance events. (? lines) + Version 22.32.6: Sep 29, 2022 TODO: Changes in program resources and mark files. (? lines) + Version 22.32.5: Sep 29, 2022 TODO: Changes in program resources and documents. (? lines) + Version 22.32.4: Sep 29, 2022 Changes in program resources and surveys. (? lines) Version 22.32.3: Sep 29, 2022 Changes in program resources and games. (332642 lines) 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) diff --git a/swad_survey.c b/swad_survey.c index 5cf752460..f45c2b412 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -327,6 +327,12 @@ static void Svy_PutIconsListSurveys (void *Surveys) if (Svy_CheckIfICanCreateSvy ()) Svy_PutIconToCreateNewSvy ((struct Svy_Surveys *) Surveys); + /***** Put icon 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 (ActReqLnkSvy,NULL, + Svy_PutParams,Surveys); + /***** Put icon to show a figure *****/ Fig_PutIconToShowFigure (Fig_SURVEYS); } diff --git a/swad_survey_resource.c b/swad_survey_resource.c index f7b4a4646..a76f0264b 100644 --- a/swad_survey_resource.c +++ b/swad_survey_resource.c @@ -41,21 +41,19 @@ void SvyRsc_GetLinkToSurvey (void) { extern const char *Txt_Link_to_resource_X_copied_into_clipboard; struct Svy_Surveys Surveys; - long SvyCod; char Title[Svy_MAX_BYTES_SURVEY_TITLE + 1]; /***** Reset surveys context *****/ Svy_ResetSurveys (&Surveys); /***** Get survey code *****/ - if ((SvyCod = Svy_GetParamSvyCod ()) <= 0) - Err_WrongSurveyExit (); + Surveys.SvyCod = Svy_GetParamSvyCod (); /***** Get survey title *****/ - SvyRsc_GetTitleFromSvyCod (SvyCod,Title,sizeof (Title) - 1); + SvyRsc_GetTitleFromSvyCod (Surveys.SvyCod,Title,sizeof (Title) - 1); /***** Copy link to survey into resource clipboard *****/ - Prg_DB_CopyToClipboard (PrgRsc_SURVEY,SvyCod); + Prg_DB_CopyToClipboard (PrgRsc_SURVEY,Surveys.SvyCod); /***** Write sucess message *****/ Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,