Version 15.154

This commit is contained in:
Antonio Cañas Vargas 2016-03-19 20:03:39 +01:00
parent e9a0b1d2db
commit a6d584b747
4 changed files with 126 additions and 83 deletions

View File

@ -180,7 +180,7 @@ a:hover /* Default ==> underlined */
{
display:inline-block;
box-sizing:border-box;
max-width:220px;
max-width:200px;
padding:0 4px;
color:#B0B0B0;
font-size:11pt;

View File

@ -132,13 +132,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.153.1 (2016-03-19)"
#define Log_PLATFORM_VERSION "SWAD 15.154 (2016-03-19)"
#define CSS_FILE "swad15.152.css"
#define JS_FILE "swad15.131.3.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.154: Mar 19, 2016 Icon to add new survey integrated in frame.
Changes in layout of surveys. (196018 lines)
Version 15.153.1: Mar 19, 2016 Fixed layout in edition of assignments. (195980 lines)
Version 15.153: Mar 19, 2016 Icon to add new assignment integrated in frame.
Changes in layout of assignments. (195984 lines)

View File

@ -92,15 +92,15 @@ struct SurveyQuestion
static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst);
static bool Svy_CheckIfICanCreateSvy (void);
static void Svy_PutIconToCreateNewSvy (void);
static void Svy_PutButtonToCreateNewSvy (void);
static void Svy_PutParamsToCreateNewSvy (void);
static void Svy_PutFormToSelectWhichGroupsToShow (void);
static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool ShowOnlyThisSvyComplete);
static void Svy_WriteAuthor (struct Survey *Svy);
static void Svy_WriteStatus (struct Survey *Svy);
static void Svy_GetParamSvyOrderType (void);
static void Svy_PutFormToCreateNewSvy (void);
static void Svy_PutFormToCreateNewSvyParams (void);
static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible);
static void Svy_PutParams (void);
static void Svy_GetSurveyTxtFromDB (long SvyCod,char *Txt);
@ -173,14 +173,11 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
extern const char *Txt_ASG_ATT_OR_SVY_ORDER[2];
extern const char *Txt_Survey;
extern const char *Txt_Status;
extern const char *Txt_No_surveys;
tSvysOrderType Order;
struct Pagination Pagination;
unsigned NumSvy;
/***** Put link (form) to create new survey *****/
if (Svy_CheckIfICanCreateSvy ())
Svy_PutFormToCreateNewSvy ();
/***** Get number of groups in current course *****/
if (!Gbl.CurrentCrs.Grps.NumGrps)
Gbl.CurrentCrs.Grps.WhichGrps = Grp_ALL_GROUPS;
@ -198,58 +195,66 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
if (Pagination.MoreThanOnePage)
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,0,&Pagination);
/***** Start table *****/
Lay_StartRoundFrameTable (NULL,2,Txt_Surveys);
/***** Start frame *****/
Lay_StartRoundFrame ("100%",Txt_Surveys,
Svy_CheckIfICanCreateSvy () ? Svy_PutIconToCreateNewSvy :
NULL);
/***** Select whether show only my groups or all groups *****/
if (Gbl.CurrentCrs.Grps.NumGrps)
{
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"4\">");
Svy_PutFormToSelectWhichGroupsToShow ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
/***** Table head *****/
fprintf (Gbl.F.Out,"<tr>");
for (Order = Svy_ORDER_BY_START_DATE;
Order <= Svy_ORDER_BY_END_DATE;
Order++)
if (Gbl.Asgs.Num)
{
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">");
Act_FormStart (ActSeeAllSvy);
Grp_PutParamWhichGrps ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
Act_LinkFormSubmit (Txt_ASG_ATT_OR_SVY_HELP_ORDER[Order],"TIT_TBL");
if (Order == Gbl.Svys.SelectedOrderType)
fprintf (Gbl.F.Out,"<u>");
fprintf (Gbl.F.Out,"%s",Txt_ASG_ATT_OR_SVY_ORDER[Order]);
if (Order == Gbl.Svys.SelectedOrderType)
fprintf (Gbl.F.Out,"</u>");
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
fprintf (Gbl.F.Out,"</th>");
/***** Table head *****/
fprintf (Gbl.F.Out,"<table class=\"FRAME_TABLE CELLS_PAD_2\">"
"<tr>");
for (Order = Svy_ORDER_BY_START_DATE;
Order <= Svy_ORDER_BY_END_DATE;
Order++)
{
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">");
Act_FormStart (ActSeeAllSvy);
Grp_PutParamWhichGrps ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
Act_LinkFormSubmit (Txt_ASG_ATT_OR_SVY_HELP_ORDER[Order],"TIT_TBL");
if (Order == Gbl.Svys.SelectedOrderType)
fprintf (Gbl.F.Out,"<u>");
fprintf (Gbl.F.Out,"%s",Txt_ASG_ATT_OR_SVY_ORDER[Order]);
if (Order == Gbl.Svys.SelectedOrderType)
fprintf (Gbl.F.Out,"</u>");
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
fprintf (Gbl.F.Out,"</th>");
}
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">"
"%s"
"</th>"
"<th class=\"CENTER_MIDDLE\">"
"%s"
"</th>"
"</tr>",
Txt_Survey,
Txt_Status);
/***** Write all the surveys *****/
for (NumSvy = Pagination.FirstItemVisible;
NumSvy <= Pagination.LastItemVisible;
NumSvy++)
Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy-1],SvyQst,false);
/***** Table end *****/
fprintf (Gbl.F.Out,"</table>");
}
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">"
"%s"
"</th>"
"<th class=\"CENTER_MIDDLE\">"
"%s"
"</th>"
"</tr>",
Txt_Survey,
Txt_Status);
else // No assignments created
Lay_ShowAlert (Lay_INFO,Txt_No_surveys);
/***** Write all the surveys *****/
for (NumSvy = Pagination.FirstItemVisible;
NumSvy <= Pagination.LastItemVisible;
NumSvy++)
Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy-1],SvyQst,false);
/***** Button to create a new survey *****/
Svy_PutButtonToCreateNewSvy ();
/***** Table end *****/
Lay_EndRoundFrameTable ();
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Write again links to pages *****/
if (Pagination.MoreThanOnePage)
@ -279,6 +284,43 @@ static bool Svy_CheckIfICanCreateSvy (void)
return false;
}
/*****************************************************************************/
/********************** Put icon to create a new survey **********************/
/*****************************************************************************/
static void Svy_PutIconToCreateNewSvy (void)
{
extern const char *Txt_New_survey;
Lay_PutContextualLink (ActFrmNewSvy,Svy_PutParamsToCreateNewSvy,
"plus64x64.png",Txt_New_survey,NULL);
}
/*****************************************************************************/
/********************* Put button to create a new survey *********************/
/*****************************************************************************/
static void Svy_PutButtonToCreateNewSvy (void)
{
extern const char *Txt_New_survey;
Act_FormStart (ActFrmNewSvy);
Svy_PutParamsToCreateNewSvy ();
Lay_PutConfirmButton (Txt_New_survey);
Act_FormEnd ();
}
/*****************************************************************************/
/******************* Put parameters to create a new survey *******************/
/*****************************************************************************/
static void Svy_PutParamsToCreateNewSvy (void)
{
Svy_PutHiddenParamSvyOrderType ();
Grp_PutParamWhichGrps ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
}
/*****************************************************************************/
/***************** Put form to select which groups to show *******************/
/*****************************************************************************/
@ -695,28 +737,6 @@ void Svy_PutHiddenParamSvyOrderType (void)
Par_PutHiddenParamUnsigned ("Order",(unsigned) Gbl.Svys.SelectedOrderType);
}
/*****************************************************************************/
/********************* Put a link (form) to edit surveys *********************/
/*****************************************************************************/
static void Svy_PutFormToCreateNewSvy (void)
{
extern const char *Txt_New_survey;
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActFrmNewSvy,Svy_PutFormToCreateNewSvyParams,
"plus64x64.png",
Txt_New_survey,Txt_New_survey);
fprintf (Gbl.F.Out,"</div>");
}
static void Svy_PutFormToCreateNewSvyParams (void)
{
Svy_PutHiddenParamSvyOrderType ();
Grp_PutParamWhichGrps ();
Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage);
}
/*****************************************************************************/
/******************* Put a link (form) to edit one survey ********************/
/*****************************************************************************/

View File

@ -23408,23 +23408,23 @@ const char *Txt_No_announcements_of_exams_of_X = // Warning: it is very importan
const char *Txt_No_assignments =
#if L==1
"No hi ha activitats";
"No hi ha activitats.";
#elif L==2
"Keine Aufgaben";
"Keine Aufgaben.";
#elif L==3
"No assignments";
"No assignments.";
#elif L==4
"No hay actividades";
"No hay actividades.";
#elif L==5
"Il n'y a pas d'activit&eacute;s";
"Il n'y a pas d'activit&eacute;s.";
#elif L==6
"No hay actividades"; // Okoteve traducción
"No hay actividades."; // Okoteve traducción
#elif L==7
"Non ci sono attivit&agrave;";
"Non ci sono attivit&agrave;.";
#elif L==8
"Brak zadania";
"Brak zadania.";
#elif L==9
"N&atilde;o h&aacute; atividades";
"N&atilde;o h&aacute; atividades.";
#endif
const char *Txt_no_course_of_origin = // Means: "message sent from any course"
@ -24285,6 +24285,27 @@ const char *Txt_no_subject =
"sem assunto";
#endif
const char *Txt_No_surveys =
#if L==1
"No hi ha enquestes.";
#elif L==2
"Keine Umfragen.";
#elif L==3
"No surveys.";
#elif L==4
"No hay encuestas.";
#elif L==5
"Il n'y a pas de sondages.";
#elif L==6
"No hay encuestas."; // Okoteve traducción
#elif L==7
"Non ci sono sondaggi.";
#elif L==8
"Brak badania.";
#elif L==9
"N&atilde;o h&aacute; inqu&eacute;ritos.";
#endif
const char *Txt_no_tags = // Tags used in test
#if L==1
"sin descriptores"; // Necessita traduccio