mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-08 09:45:26 +02:00
Version 15.200.3
This commit is contained in:
parent
db5b54e5f3
commit
c747f10bd0
|
@ -137,13 +137,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.200.2 (2016-04-18)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.200.3 (2016-04-18)"
|
||||
#define CSS_FILE "swad15.198.css"
|
||||
#define JS_FILE "swad15.197.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.200.3: Apr 18, 2016 Fixed bug in tests, reported by Miguel Damas Hermoso. (199788 lines)
|
||||
Version 15.200.2: Apr 18, 2016 Fixed bugs in searching for documents. (199774 lines)
|
||||
Version 15.200.1: Apr 18, 2016 Fixed bug in searching for documents. (199726 lines)
|
||||
Version 15.200: Apr 18, 2016 New layout of search form. (199718 lines)
|
||||
|
|
15
swad_image.c
15
swad_image.c
|
@ -252,6 +252,8 @@ void Img_PutImageUploader (int NumImgInForm,const char *ClassImgTitURL)
|
|||
/*****************************************************************************/
|
||||
/***************************** Get image from form ***************************/
|
||||
/*****************************************************************************/
|
||||
// If NumImgInForm < 0, params have no suffix
|
||||
// If NumImgInForm >= 0, the number is a suffix of the params
|
||||
|
||||
void Img_GetImageFromForm (int NumImgInForm,struct Image *Image,
|
||||
void (*GetImageFromDB) (int NumImgInForm,struct Image *Image))
|
||||
|
@ -276,11 +278,18 @@ void Img_GetImageFromForm (int NumImgInForm,struct Image *Image,
|
|||
case Img_ACTION_NEW_IMAGE: // Upload new image
|
||||
/***** Get new image (if present ==> process and create temporary file) *****/
|
||||
Img_GetAndProcessImageFileFromForm (Image,ParamUploadImg.File);
|
||||
if (Image->Status != Img_FILE_PROCESSED) // No new image received-processed successfully
|
||||
switch (Image->Status)
|
||||
{
|
||||
/* Reset image name */
|
||||
case Img_FILE_NONE: // No new image received
|
||||
Image->Action = Img_ACTION_NO_IMAGE;
|
||||
Image->Name[0] = '\0';
|
||||
break;
|
||||
case Img_FILE_RECEIVED: // New image received, but not processed
|
||||
Image->Status = Img_FILE_NONE;
|
||||
Image->Name[0] = '\0';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Img_ACTION_KEEP_IMAGE: // Keep current image unchanged
|
||||
|
@ -334,6 +343,8 @@ void Img_GetImageFromForm (int NumImgInForm,struct Image *Image,
|
|||
/*****************************************************************************/
|
||||
/********* Set parameters names depending on number of image in form *********/
|
||||
/*****************************************************************************/
|
||||
// If NumImgInForm < 0, params have no suffix
|
||||
// If NumImgInForm >= 0, the number is a suffix of the params
|
||||
|
||||
void Img_SetParamNames (struct ParamUploadImg *ParamUploadImg,int NumImgInForm)
|
||||
{
|
||||
|
|
|
@ -5224,7 +5224,8 @@ static void Tst_GetQstFromForm (char *Stem,char *Feedback)
|
|||
Gbl.Test.Image.Width = Tst_IMAGE_SAVED_MAX_WIDTH;
|
||||
Gbl.Test.Image.Height = Tst_IMAGE_SAVED_MAX_HEIGHT;
|
||||
Gbl.Test.Image.Quality = Tst_IMAGE_SAVED_QUALITY;
|
||||
Img_GetImageFromForm (-1,&Gbl.Test.Image,Tst_GetImageFromDB);
|
||||
Img_GetImageFromForm (-1, // < 0 ==> the image associated to the stem
|
||||
&Gbl.Test.Image,Tst_GetImageFromDB);
|
||||
|
||||
/***** Get answers *****/
|
||||
Gbl.Test.Shuffle = false;
|
||||
|
@ -5280,7 +5281,8 @@ static void Tst_GetQstFromForm (char *Stem,char *Feedback)
|
|||
Gbl.Test.Answer.Options[NumOpt].Image.Width = Tst_IMAGE_SAVED_MAX_WIDTH;
|
||||
Gbl.Test.Answer.Options[NumOpt].Image.Height = Tst_IMAGE_SAVED_MAX_HEIGHT;
|
||||
Gbl.Test.Answer.Options[NumOpt].Image.Quality = Tst_IMAGE_SAVED_QUALITY;
|
||||
Img_GetImageFromForm ((int) NumOpt,&Gbl.Test.Answer.Options[NumOpt].Image,
|
||||
Img_GetImageFromForm ((int) NumOpt, // >= 0 ==> the image associated to an answer
|
||||
&Gbl.Test.Answer.Options[NumOpt].Image,
|
||||
Tst_GetImageFromDB);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user