mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-09 02:05:24 +02:00
Version 15.175.4
This commit is contained in:
parent
344d1f3208
commit
77f1f65c62
|
@ -140,14 +140,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.175.3 (2016-04-03)"
|
#define Log_PLATFORM_VERSION "SWAD 15.175.4 (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.4: Apr 03, 2016 Check button to remove image when editing one test question. (? lines)
|
Version 15.175.4: Apr 03, 2016 Changes in form to edit one test question. (197897 lines)
|
||||||
Version 15.175.3: Apr 03, 2016 Change in edition of test question. (197804 lines)
|
Version 15.175.3: Apr 03, 2016 Change in edition of test question. (197804 lines)
|
||||||
Version 15.175.2: Apr 03, 2016 Code refactoring related to deleting image file. (197773 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)
|
||||||
|
|
|
@ -67,6 +67,14 @@ typedef enum
|
||||||
Img_NAME_STORED_IN_DB,
|
Img_NAME_STORED_IN_DB,
|
||||||
} Img_Status_t;
|
} Img_Status_t;
|
||||||
|
|
||||||
|
/***** Action to perform when editing a form with an image *****/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
Img_ACTION_NONE, // Do not use image (remove current image if exists)
|
||||||
|
Img_ACTION_KEEP, // Keep current image unchanged
|
||||||
|
Img_ACTION_CHANGE, // Upload new image (remove current image if exists)
|
||||||
|
} Img_Action_t;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
54
swad_test.c
54
swad_test.c
|
@ -155,7 +155,7 @@ static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res);
|
||||||
static void Tst_ShowTstResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore);
|
static void Tst_ShowTstResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank,double *TotalScore);
|
||||||
static void Tst_WriteQstAndAnsExam (unsigned NumQst,long QstCod,MYSQL_ROW row,
|
static void Tst_WriteQstAndAnsExam (unsigned NumQst,long QstCod,MYSQL_ROW row,
|
||||||
double *ScoreThisQst,bool *AnswerIsNotBlank);
|
double *ScoreThisQst,bool *AnswerIsNotBlank);
|
||||||
static void Tst_PutFormToUploadNewQstImage (void);
|
static void Tst_PutFormToEditQstImage (void);
|
||||||
static void Tst_UpdateScoreQst (long QstCod,float ScoreThisQst,bool AnswerIsNotBlank);
|
static void Tst_UpdateScoreQst (long QstCod,float ScoreThisQst,bool AnswerIsNotBlank);
|
||||||
static void Tst_UpdateMyNumAccessTst (unsigned NumAccessesTst);
|
static void Tst_UpdateMyNumAccessTst (unsigned NumAccessesTst);
|
||||||
static void Tst_UpdateLastAccTst (void);
|
static void Tst_UpdateLastAccTst (void);
|
||||||
|
@ -1027,21 +1027,51 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
|
||||||
/************* Put form to upload a new image for a test question ************/
|
/************* Put form to upload a new image for a test question ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Tst_PutFormToUploadNewQstImage (void)
|
static void Tst_PutFormToEditQstImage (void)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||||
|
extern const char *Txt_No_image;
|
||||||
|
extern const char *Txt_Current_image;
|
||||||
extern const char *Txt_Change_image;
|
extern const char *Txt_Change_image;
|
||||||
|
extern const char *Txt_New_image;
|
||||||
|
|
||||||
/***** If an image exists, put label *****/
|
/***** No image *****/
|
||||||
|
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"Image\" value=\"%u\"",
|
||||||
|
Img_ACTION_NONE);
|
||||||
|
if (!Gbl.Test.Image[0])
|
||||||
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
|
fprintf (Gbl.F.Out," />"
|
||||||
|
"<label class=\"%s\">"
|
||||||
|
"%s"
|
||||||
|
"</label><br />",
|
||||||
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
Txt_No_image);
|
||||||
|
|
||||||
|
/***** Current image *****/
|
||||||
if (Gbl.Test.Image[0])
|
if (Gbl.Test.Image[0])
|
||||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
{
|
||||||
"%s: "
|
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"Image\" value=\"%u\" checked=\"checked\" />"
|
||||||
"</label>",
|
"<label class=\"%s\">"
|
||||||
The_ClassForm[Gbl.Prefs.Theme],Txt_Change_image);
|
"%s"
|
||||||
|
"</label><br />",
|
||||||
|
Img_ACTION_KEEP,
|
||||||
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
Txt_Current_image);
|
||||||
|
Img_ShowImage (Gbl.Test.Image,"TEST_IMG_EDIT_ONE");
|
||||||
|
}
|
||||||
|
|
||||||
/****** Form field to upload a new image *****/
|
/***** New image *****/
|
||||||
|
fprintf (Gbl.F.Out,"<input id=\"change_image\" type=\"radio\" name=\"Image\" value=\"%u\">",
|
||||||
|
Img_ACTION_CHANGE);
|
||||||
|
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||||
|
"%s: "
|
||||||
|
"</label>",
|
||||||
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
Gbl.Test.Image[0] ? Txt_Change_image :
|
||||||
|
Txt_New_image);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\""
|
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\""
|
||||||
" size=\"40\" maxlength=\"100\" value=\"\" />",
|
" size=\"40\" maxlength=\"100\" value=\"\""
|
||||||
|
" onchange=\"document.getElementById('change_image').checked = true;\" />",
|
||||||
Fil_NAME_OF_PARAM_FILENAME_ORG);
|
Fil_NAME_OF_PARAM_FILENAME_ORG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4316,11 +4346,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
"<td class=\"LEFT_TOP\">",
|
"<td class=\"LEFT_TOP\">",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
Txt_Image);
|
Txt_Image);
|
||||||
if (Gbl.Test.Image[0])
|
Tst_PutFormToEditQstImage ();
|
||||||
Img_ShowImage (Gbl.Test.Image,"TEST_IMG_EDIT_ONE");
|
|
||||||
Tst_PutFormToUploadNewQstImage ();
|
|
||||||
if (Gbl.Test.Image[0])
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
|
|
65
swad_text.c
65
swad_text.c
|
@ -6904,6 +6904,27 @@ const char *Txt_Current_email =
|
||||||
"E-mail atual";
|
"E-mail atual";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Current_image =
|
||||||
|
#if L==1
|
||||||
|
"Imatge actual";
|
||||||
|
#elif L==2
|
||||||
|
"Aktuelles Abbild";
|
||||||
|
#elif L==3
|
||||||
|
"Current image";
|
||||||
|
#elif L==4
|
||||||
|
"Imagen actual";
|
||||||
|
#elif L==5
|
||||||
|
"Image actuelle";
|
||||||
|
#elif L==6
|
||||||
|
"Imagen actual"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Immagine corrente";
|
||||||
|
#elif L==8
|
||||||
|
"Bieżący obraz";
|
||||||
|
#elif L==9
|
||||||
|
"Imagem atual";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Current_nickname =
|
const char *Txt_Current_nickname =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Sobrenom actual";
|
"Sobrenom actual";
|
||||||
|
@ -22884,7 +22905,7 @@ const char *Txt_New_group =
|
||||||
|
|
||||||
const char *Txt_New_holiday =
|
const char *Txt_New_holiday =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nueva festividad"; // Necessita traduccio
|
"Nova festivitat";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Neue Feiertag";
|
"Neue Feiertag";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
|
@ -22903,6 +22924,27 @@ const char *Txt_New_holiday =
|
||||||
"Nova féria";
|
"Nova féria";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_New_image =
|
||||||
|
#if L==1
|
||||||
|
"Nova imatge";
|
||||||
|
#elif L==2
|
||||||
|
"Neue Abbild";
|
||||||
|
#elif L==3
|
||||||
|
"New image";
|
||||||
|
#elif L==4
|
||||||
|
"Nueva imagen";
|
||||||
|
#elif L==5
|
||||||
|
"Nouvelle image";
|
||||||
|
#elif L==6
|
||||||
|
"Pyahu ta'ãnga";
|
||||||
|
#elif L==7
|
||||||
|
"Nuova immagine";
|
||||||
|
#elif L==8
|
||||||
|
"Nowe obraz";
|
||||||
|
#elif L==9
|
||||||
|
"Nova imagem";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_New_institution_of_COUNTRY_X = // Warning: it is very important to include %s in the following sentences
|
const char *Txt_New_institution_of_COUNTRY_X = // Warning: it is very important to include %s in the following sentences
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nova institución (universitat, institut, escola, acadèmia, organització, empresa...) de %s";
|
"Nova institución (universitat, institut, escola, acadèmia, organització, empresa...) de %s";
|
||||||
|
@ -23740,6 +23782,27 @@ const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_ = // Warn
|
||||||
"Therefore, the specified users will be enrolled/removed in/from the course."; // Necessita de tradução
|
"Therefore, the specified users will be enrolled/removed in/from the course."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_No_image = // Without any image
|
||||||
|
#if L==1
|
||||||
|
"Sense imatge";
|
||||||
|
#elif L==2
|
||||||
|
"Ohne Abbild";
|
||||||
|
#elif L==3
|
||||||
|
"No image";
|
||||||
|
#elif L==4
|
||||||
|
"Sin imagen";
|
||||||
|
#elif L==5
|
||||||
|
"Pas d'image";
|
||||||
|
#elif L==6
|
||||||
|
"Sin imagen"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Nessuna immagine";
|
||||||
|
#elif L==8
|
||||||
|
"Brak obrazka";
|
||||||
|
#elif L==9
|
||||||
|
"Sem imagem";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_No_INDEX = // Short version of "Number" (as an index)...
|
const char *Txt_No_INDEX = // Short version of "Number" (as an index)...
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nº"; // Necessita traduccio
|
"Nº"; // Necessita traduccio
|
||||||
|
|
Loading…
Reference in New Issue
Block a user