diff --git a/swad_changelog.h b/swad_changelog.h
index 515a51f08..7d7b9ea30 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -126,19 +126,20 @@
// TODO: Do not show e-mails of administrators and teachers in lists openly
// TODO: Fix bug in marks reported by Francisco Ocaña
// TODO: In Statistics > Degrees, show only degrees with students
-// TODO: Change layout of confirm / reject registration. Use green and red buttons
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.180.2 (2016-04-05)"
+#define Log_PLATFORM_VERSION "SWAD 15.180.4 (2016-04-05)"
#define CSS_FILE "swad15.178.2.css"
#define JS_FILE "swad15.178.2.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 15.180.4: Apr 05, 2016 Fixed bug in images in test questions. (198512 lines)
+ Version 15.180.3: Apr 05, 2016 Changed layout of confirm / reject registration. (198482 lines)
Version 15.180.2: Apr 05, 2016 Contextual link to remove one survey question. (198459 lines)
Version 15.180.1: Apr 05, 2016 Fized minor layout bug in edition of a test question. (198430 lines)
Version 15.180: Apr 05, 2016 Changes in form to edit a test question.
diff --git a/swad_config.h b/swad_config.h
index 91698550d..915d781c0 100644
--- a/swad_config.h
+++ b/swad_config.h
@@ -508,9 +508,10 @@
#define Cfg_TIME_TO_DELETE_PARAMS_TO_COMMANDS ((time_t)( 15UL*60UL)) // Temporary files with params to commands are deleted after these seconds
-#define Cfg_TIME_TO_DELETE_PHOTOS_TMP_FILES ((time_t)( 1UL*60UL*60UL)) // Temporary files related to photos after these seconds
+#define Cfg_TIME_TO_DELETE_IMAGES_TMP_FILES ((time_t)( 2UL*60UL*60UL)) // Temporary files related to images after these seconds
+#define Cfg_TIME_TO_DELETE_PHOTOS_TMP_FILES ((time_t)( 2UL*60UL*60UL)) // Temporary files related to photos after these seconds
-#define Cfg_TIME_TO_DELETE_TEST_TMP_FILES ((time_t)( 1UL*60UL*60UL)) // Temporary files related to imported test questions after these seconds
+#define Cfg_TIME_TO_DELETE_TEST_TMP_FILES ((time_t)( 2UL*60UL*60UL)) // Temporary files related to imported test questions after these seconds
#define Cfg_TIME_TO_DELETE_ENROLLMENT_REQUESTS ((time_t)( 30UL*24UL*60UL*60UL)) // Past these seconds, remove expired enrollment requests
diff --git a/swad_enrollment.c b/swad_enrollment.c
index 06d3ff7f8..8a54fbcef 100644
--- a/swad_enrollment.c
+++ b/swad_enrollment.c
@@ -342,36 +342,39 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction)
void Enr_ReqAcceptRegisterInCrs (void)
{
+ extern const char *Txt_Enrollment;
extern const char *Txt_A_teacher_or_administrator_has_enrolled_you_into_the_course_;
extern const char *Txt_Confirm_my_enrollment;
extern const char *Txt_Remove_me_from_this_course;
+ /***** Start frame *****/
+ Lay_StartRoundFrame (NULL,Txt_Enrollment,NULL);
+
/***** Show message *****/
sprintf (Gbl.Message,Txt_A_teacher_or_administrator_has_enrolled_you_into_the_course_,
Gbl.CurrentCrs.Crs.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
- fprintf (Gbl.F.Out,"
");
+ /***** End frame *****/
+ Lay_EndRoundFrame ();
/***** Mark possible notification as seen *****/
Ntf_MarkNotifAsSeen (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? Ntf_EVENT_ENROLLMENT_STUDENT :
- Ntf_EVENT_ENROLLMENT_TEACHER,
- -1L,Gbl.CurrentCrs.Crs.CrsCod,
- Gbl.Usrs.Me.UsrDat.UsrCod);
+ Ntf_EVENT_ENROLLMENT_TEACHER,
+ -1L,Gbl.CurrentCrs.Crs.CrsCod,
+ Gbl.Usrs.Me.UsrDat.UsrCod);
}
/*****************************************************************************/
diff --git a/swad_image.c b/swad_image.c
index 9deae8826..27866985a 100644
--- a/swad_image.c
+++ b/swad_image.c
@@ -191,6 +191,9 @@ void Img_GetAndProcessImageFileFromForm (struct Image *Image,
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_IMG,Cfg_FOLDER_IMG_TMP);
Fil_CreateDirIfNotExists (PathImgPriv);
+ /***** Remove old temporary private files *****/
+ Fil_RemoveOldTmpFiles (PathImgPriv,Cfg_TIME_TO_DELETE_IMAGES_TMP_FILES,false);
+
/***** End the reception of original not processed image
(it can be very big) into a temporary file *****/
Image->Status = Img_FILE_NONE;
@@ -286,6 +289,7 @@ void Img_MoveImageToDefinitiveDirectory (struct Image *Image)
void Img_ShowImage (struct Image *Image,const char *ClassImg)
{
+ extern const char *Txt_Image_not_found;
char FileNameImgPriv[PATH_MAX+1];
char FullPathImgPriv[PATH_MAX+1];
char URL[PATH_MAX+1];
@@ -298,8 +302,7 @@ void Img_ShowImage (struct Image *Image,const char *ClassImg)
if (Image->Status != Img_NAME_STORED_IN_DB)
return;
- /***** Create a temporary public directory
- used to download the zip file *****/
+ /***** Create a temporary public directory used to show the image *****/
Brw_CreateDirDownloadTmp ();
/***** Build private path to image *****/
@@ -310,21 +313,27 @@ void Img_ShowImage (struct Image *Image,const char *ClassImg)
Image->Name[1],
FileNameImgPriv);
- /***** Create symbolic link from temporary public directory to private file
- in order to gain access to it for showing/downloading *****/
- Brw_CreateTmpPublicLinkToPrivateFile (FullPathImgPriv,FileNameImgPriv);
+ /***** Check if private image file exists *****/
+ if (Fil_CheckIfPathExists (FullPathImgPriv))
+ {
+ /***** Create symbolic link from temporary public directory to private file
+ in order to gain access to it for showing/downloading *****/
+ Brw_CreateTmpPublicLinkToPrivateFile (FullPathImgPriv,FileNameImgPriv);
- /***** Create URL pointing to symbolic link *****/
- sprintf (URL,"%s/%s/%s/%s",
- Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
- Gbl.FileBrowser.TmpPubDir,
- FileNameImgPriv);
+ /***** Create URL pointing to symbolic link *****/
+ sprintf (URL,"%s/%s/%s/%s",
+ Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
+ Gbl.FileBrowser.TmpPubDir,
+ FileNameImgPriv);
- /***** Show image *****/
- fprintf (Gbl.F.Out,""
- "
"
- "
",
- URL,ClassImg);
+ /***** Show image *****/
+ fprintf (Gbl.F.Out,""
+ "
"
+ "
",
+ URL,ClassImg);
+ }
+ else
+ Lay_ShowAlert (Lay_WARNING,Txt_Image_not_found);
}
/*****************************************************************************/
diff --git a/swad_text.c b/swad_text.c
index 17ec77412..4d0d55487 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -10229,6 +10229,27 @@ const char *Txt_Enroll_in_groups =
"Inscreva-me em grupos ";
#endif
+const char *Txt_Enrollment =
+#if L==1
+ "Inscripció";
+#elif L==2
+ "Einschreibung";
+#elif L==3
+ "Enrollment";
+#elif L==4
+ "Inscripción";
+#elif L==5
+ "Inscription";
+#elif L==6
+ "Inscripción"; // Okoteve traducción
+#elif L==7
+ "Registrazione";
+#elif L==8
+ "Rejestracja";
+#elif L==9
+ "Inscrição";
+#endif
+
const char *Txt_Enrollment_confirmed =
#if L==1
"Inscripción confirmada"; // Necessita traduccio
@@ -14306,6 +14327,27 @@ const char *Txt_Image =
"Imagem";
#endif
+const char *Txt_Image_not_found =
+#if L==1
+ "Imatge no trobat";
+#elif L==2
+ "Abbild nicht gefunden";
+#elif L==3
+ "Image not found";
+#elif L==4
+ "Imagen no encontrada";
+#elif L==5
+ "Image non trouvée";
+#elif L==6
+ "Ta'ãnga nahániri juhupapyre";
+#elif L==7
+ "Immagine non trovata";
+#elif L==8
+ "Obraz nie znaleziono";
+#elif L==9
+ "Imagem não encontrada";
+#endif
+
const char *Txt_Import_questions =
#if L==1
"Importar preguntas"; // Necessita traduccio