mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-13 04:04:35 +02:00
Version 15.155.2
This commit is contained in:
parent
0e33007fae
commit
008890a568
|
@ -124,6 +124,7 @@
|
||||||
// TODO: Important!!!! E-mail should not be visible for not logged users
|
// TODO: Important!!!! E-mail should not be visible for not logged users
|
||||||
// TODO: Fix bug in marks reported by Francisco Ocaña
|
// TODO: Fix bug in marks reported by Francisco Ocaña
|
||||||
// TODO: When a new user (a guest not registered in any course) creates a new course ==> register him/her automatically as a teacher in the course just created
|
// TODO: When a new user (a guest not registered in any course) creates a new course ==> register him/her automatically as a teacher in the course just created
|
||||||
|
// TODO: Change icon to reset survey (distinct from recycle, color red)
|
||||||
|
|
||||||
// TODO: Icon to the left in list of forums is not correct when scope is system
|
// TODO: Icon to the left in list of forums is not correct when scope is system
|
||||||
// TODO: Move info about number of files to bottom of file browsers
|
// TODO: Move info about number of files to bottom of file browsers
|
||||||
|
@ -132,14 +133,16 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.155.1 (2016-03-20)"
|
#define Log_PLATFORM_VERSION "SWAD 15.155.2 (2016-03-20)"
|
||||||
#define CSS_FILE "swad15.152.css"
|
#define CSS_FILE "swad15.152.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.155.1: Mar 20, 2016 Icon to print list of attendance integrated in frame. (? lines)
|
Version 15.155.2: Mar 20, 2016 Fixed bug in surveys.
|
||||||
|
Changes in edition of questions of surveys. (196060 lines)
|
||||||
|
Version 15.155.1: Mar 20, 2016 Icon to print list of attendance integrated in frame. (196042 lines)
|
||||||
Version 15.155: Mar 20, 2016 Icon to add new attendance event integrated in frame.
|
Version 15.155: Mar 20, 2016 Icon to add new attendance event integrated in frame.
|
||||||
Changes in layout of attendance events. (196038 lines)
|
Changes in layout of attendance events. (196038 lines)
|
||||||
Version 15.154: Mar 19, 2016 Icon to add new survey integrated in frame.
|
Version 15.154: Mar 19, 2016 Icon to add new survey integrated in frame.
|
||||||
|
|
120
swad_survey.c
120
swad_survey.c
|
@ -106,6 +106,9 @@ static void Svy_PutParams (void);
|
||||||
static void Svy_GetSurveyTxtFromDB (long SvyCod,char *Txt);
|
static void Svy_GetSurveyTxtFromDB (long SvyCod,char *Txt);
|
||||||
static void Svy_PutParamSvyCod (long SvyCod);
|
static void Svy_PutParamSvyCod (long SvyCod);
|
||||||
static long Svy_GetParamSvyCod (void);
|
static long Svy_GetParamSvyCod (void);
|
||||||
|
|
||||||
|
static void Svy_PutButtonToResetSurvey (void);
|
||||||
|
|
||||||
static bool Svy_CheckIfSimilarSurveyExists (struct Survey *Svy);
|
static bool Svy_CheckIfSimilarSurveyExists (struct Survey *Svy);
|
||||||
static bool Svy_SetDefaultAndAllowedForEdition (void);
|
static bool Svy_SetDefaultAndAllowedForEdition (void);
|
||||||
static void Svy_ShowLstGrpsToEditSurvey (long SvyCod);
|
static void Svy_ShowLstGrpsToEditSurvey (long SvyCod);
|
||||||
|
@ -135,6 +138,8 @@ static void Svy_FreeTextChoiceAnswer (struct SurveyQuestion *SvyQst,unsigned Num
|
||||||
static unsigned Svy_GetQstIndFromQstCod (long QstCod);
|
static unsigned Svy_GetQstIndFromQstCod (long QstCod);
|
||||||
static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod);
|
static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod);
|
||||||
static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQst);
|
static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQst);
|
||||||
|
static void Svy_PutIconToAddNewQuestion (void);
|
||||||
|
static void Svy_PutButtonToCreateNewQuestion (void);
|
||||||
static void Svy_WriteParamEditQst (struct SurveyQuestion *SvyQst);
|
static void Svy_WriteParamEditQst (struct SurveyQuestion *SvyQst);
|
||||||
static void Svy_WriteQstStem (const char *Stem);
|
static void Svy_WriteQstStem (const char *Stem);
|
||||||
static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *SvyQst,bool PutFormAnswerSurvey);
|
static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *SvyQst,bool PutFormAnswerSurvey);
|
||||||
|
@ -205,7 +210,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||||
Svy_PutFormToSelectWhichGroupsToShow ();
|
Svy_PutFormToSelectWhichGroupsToShow ();
|
||||||
|
|
||||||
if (Gbl.Asgs.Num)
|
if (Gbl.Svys.Num)
|
||||||
{
|
{
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">"
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">"
|
||||||
|
@ -1186,7 +1191,7 @@ static void Svy_PutParamSvyCod (long SvyCod)
|
||||||
/******************** Get parameter with code of survey **********************/
|
/******************** Get parameter with code of survey **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
long Svy_GetParamSvyCod (void)
|
static long Svy_GetParamSvyCod (void)
|
||||||
{
|
{
|
||||||
char LongStr[1+10+1];
|
char LongStr[1+10+1];
|
||||||
|
|
||||||
|
@ -1300,7 +1305,6 @@ void Svy_RemoveSurvey (void)
|
||||||
void Svy_AskResetSurvey (void)
|
void Svy_AskResetSurvey (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Do_you_really_want_to_reset_the_survey_X;
|
extern const char *Txt_Do_you_really_want_to_reset_the_survey_X;
|
||||||
extern const char *Txt_Reset_survey;
|
|
||||||
struct Survey Svy;
|
struct Survey Svy;
|
||||||
struct SurveyQuestion SvyQst;
|
struct SurveyQuestion SvyQst;
|
||||||
|
|
||||||
|
@ -1325,13 +1329,24 @@ void Svy_AskResetSurvey (void)
|
||||||
|
|
||||||
/***** Button of confirmation of reset *****/
|
/***** Button of confirmation of reset *****/
|
||||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||||
|
Svy_PutButtonToResetSurvey ();
|
||||||
|
|
||||||
|
/***** Show surveys again *****/
|
||||||
|
Svy_ListAllSurveys (&SvyQst);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Put button to reset survey ************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Svy_PutButtonToResetSurvey (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Reset_survey;
|
||||||
|
|
||||||
Act_FormStart (ActRstSvy);
|
Act_FormStart (ActRstSvy);
|
||||||
Svy_PutParams ();
|
Svy_PutParams ();
|
||||||
Lay_PutConfirmButton (Txt_Reset_survey);
|
Lay_PutConfirmButton (Txt_Reset_survey);
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
|
||||||
Svy_ListAllSurveys (&SvyQst);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2797,7 +2812,6 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
||||||
extern const char *Txt_This_survey_has_no_questions;
|
extern const char *Txt_This_survey_has_no_questions;
|
||||||
extern const char *Txt_Send_survey;
|
extern const char *Txt_Send_survey;
|
||||||
extern const char *Txt_Edit_question;
|
extern const char *Txt_Edit_question;
|
||||||
extern const char *Txt_New_question;
|
|
||||||
char Query[512];
|
char Query[512];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -2814,20 +2828,22 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
||||||
Svy->SvyCod);
|
Svy->SvyCod);
|
||||||
NumQsts = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get data of a question");
|
NumQsts = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get data of a question");
|
||||||
|
|
||||||
if (PutFormAnswerSurvey)
|
|
||||||
{
|
|
||||||
/***** Start form to send answers to survey *****/
|
|
||||||
Act_FormStart (ActAnsSvy);
|
|
||||||
Svy_PutParamSvyCod (Svy->SvyCod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
Lay_StartRoundFrameTable (NULL,2,Txt_Questions);
|
Gbl.Svys.SvyCodToEdit = Svy->SvyCod;
|
||||||
|
Lay_StartRoundFrame (NULL,Txt_Questions,Svy_PutIconToAddNewQuestion);
|
||||||
|
|
||||||
if (NumQsts)
|
if (NumQsts)
|
||||||
{
|
{
|
||||||
|
if (PutFormAnswerSurvey)
|
||||||
|
{
|
||||||
|
/***** Start form to send answers to survey *****/
|
||||||
|
Act_FormStart (ActAnsSvy);
|
||||||
|
Svy_PutParamSvyCod (Svy->SvyCod);
|
||||||
|
}
|
||||||
|
|
||||||
/***** Write the heading *****/
|
/***** Write the heading *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">"
|
||||||
|
"<tr>");
|
||||||
if (Svy->Status.ICanEdit)
|
if (Svy->Status.ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<th colspan=\"2\"></th>");
|
fprintf (Gbl.F.Out,"<th colspan=\"2\"></th>");
|
||||||
fprintf (Gbl.F.Out,"<th class=\"CENTER_TOP\">"
|
fprintf (Gbl.F.Out,"<th class=\"CENTER_TOP\">"
|
||||||
|
@ -2911,45 +2927,57 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
|
||||||
|
if (PutFormAnswerSurvey)
|
||||||
|
{
|
||||||
|
/***** Button to create/modify survey *****/
|
||||||
|
Lay_PutConfirmButton (Txt_Send_survey);
|
||||||
|
|
||||||
|
/***** End form *****/
|
||||||
|
Act_FormEnd ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // This survey has no questions
|
else // This survey has no questions
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
Lay_ShowAlert (Lay_INFO,Txt_This_survey_has_no_questions);
|
||||||
"<td class=\"ASG_GRP CENTER_TOP\">"
|
|
||||||
"(%s)"
|
|
||||||
"</td>"
|
|
||||||
"</tr>",
|
|
||||||
Txt_This_survey_has_no_questions);
|
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
if (PutFormAnswerSurvey)
|
if (Svy->Status.ICanEdit && Editing)
|
||||||
{
|
/***** Put button to add a new question in this survey *****/
|
||||||
/***** Button to create/modify survey *****/
|
Svy_PutButtonToCreateNewQuestion ();
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<td colspan=\"5\">");
|
|
||||||
Lay_PutConfirmButton (Txt_Send_survey);
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
|
||||||
"</tr>");
|
|
||||||
}
|
|
||||||
else if (Svy->Status.ICanEdit && Editing)
|
|
||||||
{
|
|
||||||
/***** Put form to add a new question in this survey *****/
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<td colspan=\"5\">");
|
|
||||||
Gbl.Svys.SvyCodToEdit = Svy->SvyCod;
|
|
||||||
Lay_PutContextualLink (ActEdiOneSvyQst,Svy_PutParams,"plus64x64.png",
|
|
||||||
Txt_New_question,Txt_New_question);
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
|
||||||
"</tr>");
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Table end *****/
|
/***** Table end *****/
|
||||||
Lay_EndRoundFrameTable ();
|
Lay_EndRoundFrame ();
|
||||||
|
}
|
||||||
|
|
||||||
if (PutFormAnswerSurvey)
|
/*****************************************************************************/
|
||||||
/***** End form *****/
|
/***************** Put icon to add a new question to survey ******************/
|
||||||
Act_FormEnd ();
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Svy_PutIconToAddNewQuestion (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_New_question;
|
||||||
|
|
||||||
|
/***** Put form to create a new question *****/
|
||||||
|
Lay_PutContextualLink (ActEdiOneSvyQst,Svy_PutParams,
|
||||||
|
"plus64x64.png",Txt_New_question,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/**************** Put button to add a new question to survey *****************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Svy_PutButtonToCreateNewQuestion (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_New_question;
|
||||||
|
|
||||||
|
Act_FormStart (ActEdiOneSvyQst);
|
||||||
|
Svy_PutParams ();
|
||||||
|
Lay_PutConfirmButton (Txt_New_question);
|
||||||
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
24
swad_text.c
24
swad_text.c
|
@ -23030,17 +23030,17 @@ const char *Txt_New_plugin =
|
||||||
|
|
||||||
const char *Txt_New_question =
|
const char *Txt_New_question =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Pregunta nova";
|
"Nova pregunta";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Neuer Frage";
|
"Neuer Frage";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"New question";
|
"New question";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Pregunta nueva";
|
"Nueva pregunta";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Nouvelle question";
|
"Nouvelle question";
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Pregunta nueva"; // Okoteve traducción
|
"Nueva pregunta"; // Okoteve traducción
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Nuova domanda";
|
"Nuova domanda";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
|
@ -45728,23 +45728,23 @@ const char *Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_
|
||||||
|
|
||||||
const char *Txt_This_survey_has_no_questions =
|
const char *Txt_This_survey_has_no_questions =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Aquesta enquesta no té preguntes";
|
"Aquesta enquesta no té preguntes.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Diese Umfrage hat keine Fragen";
|
"Diese Umfrage hat keine Fragen.";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"This survey has no questions";
|
"This survey has no questions.";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"Esta encuesta no tiene preguntas";
|
"Esta encuesta no tiene preguntas.";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"Ce sondage n'a pas de questions";
|
"Ce sondage n'a pas de questions.";
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Esta encuesta no tiene preguntas"; // Okoteve traducción
|
"Esta encuesta no tiene preguntas."; // Okoteve traducción
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Questo sondaggio non ha domande";
|
"Questo sondaggio non ha domande.";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Badanie to nie ma pytania";
|
"Badanie to nie ma pytania.";
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Este inquérito não tem perguntas";
|
"Este inquérito não tem perguntas.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Thread =
|
const char *Txt_Thread =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user