mirror of https://github.com/acanas/swad-core.git
Version 17.3.11
This commit is contained in:
parent
5163bb992a
commit
cfc4a53504
|
@ -252,13 +252,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 17.3.10 (2017-09-19)"
|
#define Log_PLATFORM_VERSION "SWAD 17.3.11 (2017-09-20)"
|
||||||
#define CSS_FILE "swad17.0.css"
|
#define CSS_FILE "swad17.0.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.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 17.3.11: Sep 20, 2017 Code refactoring in listing of projects. (229981 lines)
|
||||||
Version 17.3.10: Sep 19, 2017 New row in listing of projects for students. (230009 lines)
|
Version 17.3.10: Sep 19, 2017 New row in listing of projects for students. (230009 lines)
|
||||||
Version 17.3.9: Sep 19, 2017 Tutor code moved from table projects to table prj_grp. (229987 lines)
|
Version 17.3.9: Sep 19, 2017 Tutor code moved from table projects to table prj_grp. (229987 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
|
|
117
swad_project.c
117
swad_project.c
|
@ -79,6 +79,8 @@ static void Prj_PutIconsListProjects (void);
|
||||||
static void Prj_PutIconToCreateNewPrj (void);
|
static void Prj_PutIconToCreateNewPrj (void);
|
||||||
static void Prj_PutButtonToCreateNewPrj (void);
|
static void Prj_PutButtonToCreateNewPrj (void);
|
||||||
static void Prj_ShowOneProject (struct Project *Prj,bool PrintView);
|
static void Prj_ShowOneProject (struct Project *Prj,bool PrintView);
|
||||||
|
static void Prj_ShowOneProjectTxtRow (struct Project *Prj,bool PrintView,
|
||||||
|
const char *Label,char *TxtField);
|
||||||
static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject);
|
static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject);
|
||||||
static void Prj_GetParamPrjOrder (void);
|
static void Prj_GetParamPrjOrder (void);
|
||||||
|
|
||||||
|
@ -433,84 +435,18 @@ static void Prj_ShowOneProject (struct Project *Prj,bool PrintView)
|
||||||
(Prj->Preassigned == Prj_PREASSIGNED) ? Txt_Yes :
|
(Prj->Preassigned == Prj_PREASSIGNED) ? Txt_Yes :
|
||||||
Txt_No);
|
Txt_No);
|
||||||
|
|
||||||
/***** Write second row of data of this project *****/
|
/***** Write rows of data of this project *****/
|
||||||
/* Description of the project */
|
/* Description of the project */
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Prj_ShowOneProjectTxtRow (Prj,PrintView,
|
||||||
Prj->Description,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt_Description,Prj->Description);
|
||||||
Str_InsertLinks (Prj->Description,Cns_MAX_BYTES_TEXT,60); // Insert links
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s:"
|
|
||||||
"</td>"
|
|
||||||
"<td colspan=\"2\" class=\"LEFT_TOP",
|
|
||||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
|
||||||
"ASG_LABEL",
|
|
||||||
Txt_Description);
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s"
|
|
||||||
"</td>"
|
|
||||||
"</tr>",
|
|
||||||
Prj->Hidden ? "DAT_LIGHT" :
|
|
||||||
"DAT",
|
|
||||||
Prj->Description);
|
|
||||||
|
|
||||||
/* Required knowledge to carry out the project */
|
/* Required knowledge to carry out the project */
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Prj_ShowOneProjectTxtRow (Prj,PrintView,
|
||||||
Prj->Knowledge,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt_Required_knowledge,Prj->Knowledge);
|
||||||
Str_InsertLinks (Prj->Knowledge,Cns_MAX_BYTES_TEXT,60); // Insert links
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s:"
|
|
||||||
"</td>"
|
|
||||||
"<td colspan=\"2\" class=\"LEFT_TOP",
|
|
||||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
|
||||||
"ASG_LABEL",
|
|
||||||
Txt_Required_knowledge);
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s"
|
|
||||||
"</td>"
|
|
||||||
"</tr>",
|
|
||||||
Prj->Hidden ? "DAT_LIGHT" :
|
|
||||||
"DAT",
|
|
||||||
Prj->Knowledge);
|
|
||||||
|
|
||||||
/* Required materials to carry out the project */
|
/* Required materials to carry out the project */
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Prj_ShowOneProjectTxtRow (Prj,PrintView,
|
||||||
Prj->Materials,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt_Required_materials,Prj->Materials);
|
||||||
Str_InsertLinks (Prj->Materials,Cns_MAX_BYTES_TEXT,60); // Insert links
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
|
||||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s:"
|
|
||||||
"</td>"
|
|
||||||
"<td colspan=\"2\" class=\"LEFT_TOP",
|
|
||||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
|
||||||
"ASG_LABEL",
|
|
||||||
Txt_Required_materials);
|
|
||||||
if (!PrintView)
|
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
|
||||||
fprintf (Gbl.F.Out," %s\">"
|
|
||||||
"%s"
|
|
||||||
"</td>"
|
|
||||||
"</tr>",
|
|
||||||
Prj->Hidden ? "DAT_LIGHT" :
|
|
||||||
"DAT",
|
|
||||||
Prj->Materials);
|
|
||||||
|
|
||||||
/* Project tutors */
|
/* Project tutors */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
@ -557,6 +493,41 @@ static void Prj_ShowOneProject (struct Project *Prj,bool PrintView)
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** Show test info about a project **********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Prj_ShowOneProjectTxtRow (struct Project *Prj,bool PrintView,
|
||||||
|
const char *Label,char *TxtField)
|
||||||
|
{
|
||||||
|
/***** Change format *****/
|
||||||
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
TxtField,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||||
|
Str_InsertLinks (TxtField,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||||
|
|
||||||
|
/***** Row with label and text *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
||||||
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out," %s\">"
|
||||||
|
"%s:"
|
||||||
|
"</td>"
|
||||||
|
"<td colspan=\"2\" class=\"LEFT_TOP",
|
||||||
|
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
||||||
|
"ASG_LABEL",
|
||||||
|
Label);
|
||||||
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out," %s\">"
|
||||||
|
"%s"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
Prj->Hidden ? "DAT_LIGHT" :
|
||||||
|
"DAT",
|
||||||
|
TxtField);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Write list of users with a role in a project ****************/
|
/*************** Write list of users with a role in a project ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue