mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-19 23:17:07 +02:00
Version 15.175.2
This commit is contained in:
parent
f87a296b67
commit
3b6bcef14c
|
@ -140,14 +140,15 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.175.1 (2016-04-03)"
|
#define Log_PLATFORM_VERSION "SWAD 15.175.2 (2016-04-03)"
|
||||||
#define CSS_FILE "swad15.173.1.css"
|
#define CSS_FILE "swad15.173.1.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
Version 15.175.2: Apr 03, 2016 Check button to remove image when editing one test question. (? lines)
|
Version 15.175.3: Apr 03, 2016 Check button to remove image when editing one test question. (? lines)
|
||||||
|
Version 15.175.2: Apr 03, 2016 Code refactoring related to deleting image file. (197773 lines)
|
||||||
Version 15.175.1: Apr 03, 2016 Code refactoring related to deleting tests of a course. (197763 lines)
|
Version 15.175.1: Apr 03, 2016 Code refactoring related to deleting tests of a course. (197763 lines)
|
||||||
Version 15.175: Apr 03, 2016 Fixed bug when editing a test question.
|
Version 15.175: Apr 03, 2016 Fixed bug when editing a test question.
|
||||||
Lot of code refactoring related to edition of questions.
|
Lot of code refactoring related to edition of questions.
|
||||||
|
|
20
swad_image.c
20
swad_image.c
|
@ -265,3 +265,23 @@ void Img_ShowImage (const char *Image,const char *ClassImg)
|
||||||
URL,ClassImg);
|
URL,ClassImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/** Remove private file with an image, given the image name (without .jpg) ***/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Img_RemoveImageFile (const char *ImageName)
|
||||||
|
{
|
||||||
|
char FullPathImgPriv[PATH_MAX+1];
|
||||||
|
|
||||||
|
/***** Build path to private file *****/
|
||||||
|
sprintf (FullPathImgPriv,"%s/%s/%c%c/%s.jpg",
|
||||||
|
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_IMG,
|
||||||
|
ImageName[0],
|
||||||
|
ImageName[1],
|
||||||
|
ImageName);
|
||||||
|
|
||||||
|
/***** Remove private file *****/
|
||||||
|
unlink (FullPathImgPriv);
|
||||||
|
|
||||||
|
// Public links are removed automatically after a period
|
||||||
|
}
|
||||||
|
|
|
@ -74,5 +74,6 @@ typedef enum
|
||||||
void Img_GetImageFromForm (unsigned Width,unsigned Height,unsigned Quality);
|
void Img_GetImageFromForm (unsigned Width,unsigned Height,unsigned Quality);
|
||||||
void Img_MoveImageToDefinitiveDirectory (void);
|
void Img_MoveImageToDefinitiveDirectory (void);
|
||||||
void Img_ShowImage (const char *Image,const char *ClassImg);
|
void Img_ShowImage (const char *Image,const char *ClassImg);
|
||||||
|
void Img_RemoveImageFile (const char *ImageName);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
14
swad_test.c
14
swad_test.c
|
@ -5476,7 +5476,6 @@ void Tst_RemoveImageFilesFromQstsInCrs (long CrsCod,
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumImages;
|
unsigned NumImages;
|
||||||
unsigned NumImg;
|
unsigned NumImg;
|
||||||
char FullPathImgPriv[PATH_MAX+1];
|
|
||||||
|
|
||||||
/***** Get names of images associated to test questions from database *****/
|
/***** Get names of images associated to test questions from database *****/
|
||||||
if (QstCod > 0) // Only one question
|
if (QstCod > 0) // Only one question
|
||||||
|
@ -5497,17 +5496,8 @@ void Tst_RemoveImageFilesFromQstsInCrs (long CrsCod,
|
||||||
/***** Get image name (row[0]) *****/
|
/***** Get image name (row[0]) *****/
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
|
||||||
/***** Build path to private file *****/
|
/***** Remove image file *****/
|
||||||
sprintf (FullPathImgPriv,"%s/%s/%c%c/%s.jpg",
|
Img_RemoveImageFile (row[0]);
|
||||||
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_IMG,
|
|
||||||
row[0][0],
|
|
||||||
row[0][1],
|
|
||||||
row[0]);
|
|
||||||
|
|
||||||
/***** Remove private file *****/
|
|
||||||
unlink (FullPathImgPriv);
|
|
||||||
|
|
||||||
// Public links are removed automatically after a period
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user