mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-28 20:43:27 +02:00
Version 15.165.5
This commit is contained in:
parent
98968229d7
commit
859c0a3375
|
@ -1720,14 +1720,18 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
.STATUS_RED_LIGHT {color:#F98A8A; font-size:12pt;}
|
.STATUS_RED_LIGHT {color:#F98A8A; font-size:12pt;}
|
||||||
|
|
||||||
/********************************** Tests ************************************/
|
/********************************** Tests ************************************/
|
||||||
.ANS {color:#404040; font-size:13pt; font-weight:bold;}
|
.TAG_SEL {width:347px;}
|
||||||
.ANS_OK {color:#008000; font-size:13pt; font-weight:bold;}
|
.TAG_TXT {width:347px;}
|
||||||
.ANS_BAD {color:red; font-size:13pt; font-weight:bold;}
|
.STEM {width:700px;}
|
||||||
.TEST {color:#404040; font-size:12pt;}
|
.ANS {color:#404040; font-size:13pt; font-weight:bold;}
|
||||||
.TEST_EXA {color:#404040; font-size:12pt;}
|
.ANS_OK {color:#008000; font-size:13pt; font-weight:bold;}
|
||||||
.TEST_EXA_LIGHT {color:#A0A0A0; font-size:12pt;}
|
.ANS_BAD {color:red; font-size:13pt; font-weight:bold;}
|
||||||
.TEST_EDI {color:#404040; font-size:12pt;}
|
.ANS_STR {width:308px;}
|
||||||
.TEST_EDI_LIGHT {color:#A0A0A0; font-size:12pt;}
|
.TEST {color:#404040; font-size:12pt;}
|
||||||
|
.TEST_EXA {color:#404040; font-size:12pt;}
|
||||||
|
.TEST_EXA_LIGHT {color:#A0A0A0; font-size:12pt;}
|
||||||
|
.TEST_EDI {color:#404040; font-size:12pt;}
|
||||||
|
.TEST_EDI_LIGHT {color:#A0A0A0; font-size:12pt;}
|
||||||
|
|
||||||
/******************************* Time table **********************************/
|
/******************************* Time table **********************************/
|
||||||
#timetable
|
#timetable
|
|
@ -29,6 +29,7 @@
|
||||||
#include <stdbool.h> // For boolean type
|
#include <stdbool.h> // For boolean type
|
||||||
#include <stdlib.h> // For calloc
|
#include <stdlib.h> // For calloc
|
||||||
#include <string.h> // For string functions
|
#include <string.h> // For string functions
|
||||||
|
#include <sys/wait.h> // For the macro WEXITSTATUS
|
||||||
#include <unistd.h> // For unlink
|
#include <unistd.h> // For unlink
|
||||||
|
|
||||||
#include "swad_centre.h"
|
#include "swad_centre.h"
|
||||||
|
|
|
@ -137,13 +137,15 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.165.3 (2016-03-29)"
|
#define Log_PLATFORM_VERSION "SWAD 15.165.5 (2016-03-29)"
|
||||||
#define CSS_FILE "swad15.165.css"
|
#define CSS_FILE "swad15.165.5.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.165.5: Mar 29, 2016 Changes in form to edit a test question. (196843 lines)
|
||||||
|
Version 15.165.4: Mar 29, 2016 Changes in form to upload XML file to import questions. (196813 lines)
|
||||||
Version 15.165.3: Mar 29, 2016 Changes in form to upload user's photo. (196811 lines)
|
Version 15.165.3: Mar 29, 2016 Changes in form to upload user's photo. (196811 lines)
|
||||||
Version 15.165.2: Mar 29, 2016 Changes in forms to upload logos. (196805 lines)
|
Version 15.165.2: Mar 29, 2016 Changes in forms to upload logos. (196805 lines)
|
||||||
Version 15.165.1: Mar 29, 2016 Changes in form to upload photo of centre. (196803 lines)
|
Version 15.165.1: Mar 29, 2016 Changes in form to upload photo of centre. (196803 lines)
|
||||||
|
|
47
swad_test.c
47
swad_test.c
|
@ -4099,6 +4099,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
extern const char *Txt_Tags;
|
extern const char *Txt_Tags;
|
||||||
extern const char *Txt_new_tag;
|
extern const char *Txt_new_tag;
|
||||||
extern const char *Txt_Stem;
|
extern const char *Txt_Stem;
|
||||||
|
extern const char *Txt_Image;
|
||||||
extern const char *Txt_Feedback;
|
extern const char *Txt_Feedback;
|
||||||
extern const char *Txt_Type;
|
extern const char *Txt_Type;
|
||||||
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
|
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
|
||||||
|
@ -4253,8 +4254,10 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
|
|
||||||
/***** Write the tags *****/
|
/***** Write the tags *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
|
"</label>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_TOP\">"
|
"<td class=\"LEFT_TOP\">"
|
||||||
"<table>",
|
"<table>",
|
||||||
|
@ -4268,7 +4271,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
/***** Write the tags already existing in a selector *****/
|
/***** Write the tags already existing in a selector *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<select id=\"SelDesc%u\" name=\"SelDesc%u\""
|
"<select id=\"SelDesc%u\" name=\"SelDesc%u\""
|
||||||
" style=\"width:288px;\" onchange=\"changeTxtTag('%u')\">",
|
" class=\"TAG_SEL\" onchange=\"changeTxtTag('%u')\">",
|
||||||
NumTag,NumTag,NumTag);
|
NumTag,NumTag,NumTag);
|
||||||
fprintf (Gbl.F.Out,"<option value=\"\"> </option>");
|
fprintf (Gbl.F.Out,"<option value=\"\"> </option>");
|
||||||
mysql_data_seek (mysql_res, 0);
|
mysql_data_seek (mysql_res, 0);
|
||||||
|
@ -4299,7 +4302,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
/***** Input of a new tag *****/
|
/***** Input of a new tag *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||||
"<input type=\"text\" id=\"TagTxt%u\" name=\"TagTxt%u\""
|
"<input type=\"text\" id=\"TagTxt%u\" name=\"TagTxt%u\""
|
||||||
" size=\"36\" maxlength=\"%u\" value=\"%s\""
|
" class=\"TAG_TXT\" maxlength=\"%u\" value=\"%s\""
|
||||||
" onchange=\"changeSelTag('%u')\" />"
|
" onchange=\"changeSelTag('%u')\" />"
|
||||||
"</td>",
|
"</td>",
|
||||||
NumTag,NumTag,Tst_MAX_TAG_LENGTH,Gbl.Test.TagText[NumTag],NumTag);
|
NumTag,NumTag,Tst_MAX_TAG_LENGTH,Gbl.Test.TagText[NumTag],NumTag);
|
||||||
|
@ -4315,11 +4318,13 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
|
|
||||||
/***** Stem *****/
|
/***** Stem *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
|
"</label>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_TOP\">"
|
"<td class=\"LEFT_TOP\">"
|
||||||
"<textarea name=\"Stem\" cols=\"70\" rows=\"8\">"
|
"<textarea name=\"Stem\" class=\"STEM\" rows=\"5\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</textarea>"
|
"</textarea>"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
@ -4328,13 +4333,29 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
Txt_Stem,
|
Txt_Stem,
|
||||||
Stem);
|
Stem);
|
||||||
|
|
||||||
|
/***** Image *****/
|
||||||
|
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
|
"%s:"
|
||||||
|
"</label>"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"LEFT_TOP\">"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
Txt_Image);
|
||||||
|
|
||||||
/***** Feedback *****/
|
/***** Feedback *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
|
"</label>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_TOP\">"
|
"<td class=\"LEFT_TOP\">"
|
||||||
"<textarea name=\"Feedback\" cols=\"70\" rows=\"8\">",
|
"<textarea name=\"Feedback\" class=\"STEM\" rows=\"3\">",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
Txt_Feedback);
|
Txt_Feedback);
|
||||||
if (Feedback)
|
if (Feedback)
|
||||||
|
@ -4346,8 +4367,10 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
|
|
||||||
/***** Type of answer *****/
|
/***** Type of answer *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
|
"</label>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"%s LEFT_TOP\">",
|
"<td class=\"%s LEFT_TOP\">",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
@ -4370,8 +4393,10 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
/***** Answers *****/
|
/***** Answers *****/
|
||||||
/* Integer answer */
|
/* Integer answer */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
|
"</label>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"%s LEFT_TOP\">"
|
"<td class=\"%s LEFT_TOP\">"
|
||||||
"%s: "
|
"%s: "
|
||||||
|
@ -4492,7 +4517,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
|
|
||||||
/* Answer text */
|
/* Answer text */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||||
"<textarea name=\"AnsStr%u\" cols=\"30\" rows=\"5\"",
|
"<textarea name=\"AnsStr%u\" class=\"ANS_STR\" rows=\"5\"",
|
||||||
NumOpt);
|
NumOpt);
|
||||||
if (OptionsDisabled)
|
if (OptionsDisabled)
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
|
@ -4504,7 +4529,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
|
|
||||||
/* Feedback */
|
/* Feedback */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||||
"<textarea name=\"FbStr%u\" cols=\"30\" rows=\"5\"",
|
"<textarea name=\"FbStr%u\" class=\"ANS_STR\" rows=\"5\"",
|
||||||
NumOpt);
|
NumOpt);
|
||||||
if (OptionsDisabled)
|
if (OptionsDisabled)
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
|
|
|
@ -130,7 +130,6 @@ void TsI_ShowFormImportQstsFromXML (void)
|
||||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||||
extern const char *Txt_Import_questions;
|
extern const char *Txt_Import_questions;
|
||||||
extern const char *Txt_You_need_an_XML_file_containing_a_list_of_questions;
|
extern const char *Txt_You_need_an_XML_file_containing_a_list_of_questions;
|
||||||
extern const char *Txt_Upload_file;
|
|
||||||
extern const char *Txt_XML_file;
|
extern const char *Txt_XML_file;
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
|
@ -142,14 +141,15 @@ void TsI_ShowFormImportQstsFromXML (void)
|
||||||
/***** Write a form to import questions *****/
|
/***** Write a form to import questions *****/
|
||||||
Act_FormStart (ActImpTstQst);
|
Act_FormStart (ActImpTstQst);
|
||||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||||
"%s:"
|
"%s: "
|
||||||
"</label>"
|
"</label>"
|
||||||
"<input type=\"file\" name=\"%s\""
|
"<input type=\"file\" name=\"%s\""
|
||||||
" size=\"40\" maxlength=\"100\" value=\"\" />",
|
" size=\"40\" maxlength=\"100\" value=\"\""
|
||||||
|
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
Txt_XML_file,
|
Txt_XML_file,
|
||||||
Fil_NAME_OF_PARAM_FILENAME_ORG);
|
Fil_NAME_OF_PARAM_FILENAME_ORG,
|
||||||
Lay_PutCreateButton (Txt_Upload_file);
|
Gbl.Form.Id);
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
/***** End frame *****/
|
/***** End frame *****/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user