mirror of https://github.com/acanas/swad-core.git
Version 16.201.5
This commit is contained in:
parent
e180ec0900
commit
3e8d484789
|
@ -63,7 +63,7 @@ extern struct Globals Gbl;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Asg_ShowAllAssignments (void);
|
static void Asg_ShowAllAssignments (void);
|
||||||
static void Asg_PutHeadForSeeing (void);
|
static void Asg_PutHeadForSeeing (bool PrintView);
|
||||||
static bool Asg_CheckIfICanCreateAssignments (void);
|
static bool Asg_CheckIfICanCreateAssignments (void);
|
||||||
static void Asg_PutIconsListAssignments (void);
|
static void Asg_PutIconsListAssignments (void);
|
||||||
static void Asg_PutIconToCreateNewAsg (void);
|
static void Asg_PutIconToCreateNewAsg (void);
|
||||||
|
@ -146,7 +146,7 @@ static void Asg_ShowAllAssignments (void)
|
||||||
{
|
{
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
Lay_StartTableWideMargin (2);
|
Lay_StartTableWideMargin (2);
|
||||||
Asg_PutHeadForSeeing ();
|
Asg_PutHeadForSeeing (false); // Not print view
|
||||||
|
|
||||||
/***** Write all the assignments *****/
|
/***** Write all the assignments *****/
|
||||||
for (NumAsg = Pagination.FirstItemVisible;
|
for (NumAsg = Pagination.FirstItemVisible;
|
||||||
|
@ -182,7 +182,7 @@ static void Asg_ShowAllAssignments (void)
|
||||||
/***************** Write header with fields of an assignment *****************/
|
/***************** Write header with fields of an assignment *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Asg_PutHeadForSeeing (void)
|
static void Asg_PutHeadForSeeing (bool PrintView)
|
||||||
{
|
{
|
||||||
extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME];
|
extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME];
|
||||||
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
|
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
|
||||||
|
@ -198,18 +198,26 @@ static void Asg_PutHeadForSeeing (void)
|
||||||
Order++)
|
Order++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">");
|
||||||
Act_FormStart (ActSeeAsg);
|
|
||||||
Grp_PutParamWhichGrps ();
|
if (!PrintView)
|
||||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage);
|
{
|
||||||
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
Act_FormStart (ActSeeAsg);
|
||||||
Act_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL);
|
Grp_PutParamWhichGrps ();
|
||||||
if (Order == Gbl.Asgs.SelectedOrder)
|
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage);
|
||||||
fprintf (Gbl.F.Out,"<u>");
|
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
||||||
|
Act_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL);
|
||||||
|
if (Order == Gbl.Asgs.SelectedOrder)
|
||||||
|
fprintf (Gbl.F.Out,"<u>");
|
||||||
|
}
|
||||||
fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]);
|
fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]);
|
||||||
if (Order == Gbl.Asgs.SelectedOrder)
|
if (!PrintView)
|
||||||
fprintf (Gbl.F.Out,"</u>");
|
{
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
if (Order == Gbl.Asgs.SelectedOrder)
|
||||||
Act_FormEnd ();
|
fprintf (Gbl.F.Out,"</u>");
|
||||||
|
fprintf (Gbl.F.Out,"</a>");
|
||||||
|
Act_FormEnd ();
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</th>");
|
fprintf (Gbl.F.Out,"</th>");
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||||
|
@ -319,7 +327,7 @@ void Asg_PrintOneAssignment (void)
|
||||||
|
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
Lay_StartTableWideMargin (2);
|
Lay_StartTableWideMargin (2);
|
||||||
Asg_PutHeadForSeeing ();
|
Asg_PutHeadForSeeing (true); // Print view
|
||||||
|
|
||||||
/***** Write assignment *****/
|
/***** Write assignment *****/
|
||||||
Asg_ShowOneAssignment (AsgCod,
|
Asg_ShowOneAssignment (AsgCod,
|
||||||
|
@ -350,62 +358,76 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
/***** Write first row of data of this assignment *****/
|
/***** Write first row of data of this assignment *****/
|
||||||
/* Forms to remove/edit this assignment */
|
/* Forms to remove/edit this assignment */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\">",
|
"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||||
Gbl.RowEvenOdd);
|
if (PrintView)
|
||||||
if (!PrintView)
|
fprintf (Gbl.F.Out,"\">");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u\">",Gbl.RowEvenOdd);
|
||||||
Asg_PutFormsToRemEditOneAsg (Asg.AsgCod,Asg.Hidden);
|
Asg_PutFormsToRemEditOneAsg (Asg.AsgCod,Asg.Hidden);
|
||||||
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Start date/time */
|
/* Start date/time */
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_start_%u\" class=\"%s LEFT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td id=\"asg_date_start_%u\" class=\"%s LEFT_TOP",
|
||||||
|
UniqueId,
|
||||||
|
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
||||||
|
"DATE_RED_LIGHT") :
|
||||||
|
(Asg.Open ? "DATE_GREEN" :
|
||||||
|
"DATE_RED"));
|
||||||
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_date_start_%u',"
|
"writeLocalDateHMSFromUTC('asg_date_start_%u',"
|
||||||
"%ld,'<br />','%s',true,true,true);"
|
"%ld,'<br />','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
|
UniqueId,
|
||||||
|
Asg.TimeUTC[Dat_START_TIME],Txt_Today);
|
||||||
|
|
||||||
|
/* End date/time */
|
||||||
|
UniqueId++;
|
||||||
|
fprintf (Gbl.F.Out,"<td id=\"asg_date_end_%u\" class=\"%s LEFT_TOP",
|
||||||
UniqueId,
|
UniqueId,
|
||||||
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
||||||
"DATE_RED_LIGHT") :
|
"DATE_RED_LIGHT") :
|
||||||
(Asg.Open ? "DATE_GREEN" :
|
(Asg.Open ? "DATE_GREEN" :
|
||||||
"DATE_RED"),
|
"DATE_RED"));
|
||||||
Gbl.RowEvenOdd,
|
if (!PrintView)
|
||||||
UniqueId,Asg.TimeUTC[Dat_START_TIME],Txt_Today);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">"
|
||||||
/* End date/time */
|
|
||||||
UniqueId++;
|
|
||||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_end_%u\" class=\"%s LEFT_TOP COLOR%u\">"
|
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_date_end_%u',"
|
"writeLocalDateHMSFromUTC('asg_date_end_%u',"
|
||||||
"%ld,'<br />','%s',false,true,true);"
|
"%ld,'<br />','%s',false,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,
|
UniqueId,
|
||||||
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
Asg.TimeUTC[Dat_END_TIME],Txt_Today);
|
||||||
"DATE_RED_LIGHT") :
|
|
||||||
(Asg.Open ? "DATE_GREEN" :
|
|
||||||
"DATE_RED"),
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
UniqueId,Asg.TimeUTC[Dat_END_TIME],Txt_Today);
|
|
||||||
|
|
||||||
/* Assignment title */
|
/* Assignment title */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<div class=\"%s\">%s</div>",
|
"<div class=\"%s\">%s</div>",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
||||||
"ASG_TITLE",
|
"ASG_TITLE",
|
||||||
Asg.Title);
|
Asg.Title);
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Send work? */
|
/* Send work? */
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"%s CENTER_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"%s CENTER_TOP",
|
||||||
|
(Asg.SendWork == Asg_SEND_WORK) ? "DAT_N" :
|
||||||
|
"DAT");
|
||||||
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<img src=\"%s/%s16x16.gif\""
|
"<img src=\"%s/%s16x16.gif\""
|
||||||
" alt=\"%s\" title=\"%s\" class=\"ICO20x20\" />"
|
" alt=\"%s\" title=\"%s\" class=\"ICO20x20\" />"
|
||||||
"<br />%s"
|
"<br />%s"
|
||||||
"</td>",
|
"</td>",
|
||||||
(Asg.SendWork == Asg_SEND_WORK) ? "DAT_N" :
|
|
||||||
"DAT",
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
(Asg.SendWork == Asg_SEND_WORK) ? "file_on" :
|
(Asg.SendWork == Asg_SEND_WORK) ? "file_on" :
|
||||||
"file_off",
|
"file_off",
|
||||||
|
@ -415,8 +437,10 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
Txt_No);
|
Txt_No);
|
||||||
|
|
||||||
/* Assignment folder */
|
/* Assignment folder */
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"DAT LEFT_TOP COLOR%u\">",
|
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"DAT LEFT_TOP");
|
||||||
Gbl.RowEvenOdd);
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">");
|
||||||
if (Asg.SendWork == Asg_SEND_WORK)
|
if (Asg.SendWork == Asg_SEND_WORK)
|
||||||
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
@ -424,8 +448,10 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
|
|
||||||
/***** Write second row of data of this assignment *****/
|
/***** Write second row of data of this assignment *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||||
Gbl.RowEvenOdd);
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">");
|
||||||
|
|
||||||
/* Author of the assignment */
|
/* Author of the assignment */
|
||||||
Asg_WriteAsgAuthor (&Asg);
|
Asg_WriteAsgAuthor (&Asg);
|
||||||
|
@ -437,8 +463,10 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
Gbl.RowEvenOdd);
|
if (!PrintView)
|
||||||
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"\">");
|
||||||
|
|
||||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||||
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
||||||
|
|
|
@ -220,13 +220,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.201.4 (2017-05-02)"
|
#define Log_PLATFORM_VERSION "SWAD 16.201.5 (2017-05-02)"
|
||||||
#define CSS_FILE "swad16.201.css"
|
#define CSS_FILE "swad16.201.css"
|
||||||
#define JS_FILE "swad16.181.js"
|
#define JS_FILE "swad16.181.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 16.201.5: May 02, 2017 Changes in layout of assignment print view. (218270 lines)
|
||||||
Version 16.201.4: May 02, 2017 Icon to view course info when editing source of information. (218243 lines)
|
Version 16.201.4: May 02, 2017 Icon to view course info when editing source of information. (218243 lines)
|
||||||
Version 16.201.3: May 02, 2017 Code refactoring in forums. (218237 lines)
|
Version 16.201.3: May 02, 2017 Code refactoring in forums. (218237 lines)
|
||||||
Version 16.201.2: May 02, 2017 Code refactoring in messages. (218242 lines)
|
Version 16.201.2: May 02, 2017 Code refactoring in messages. (218242 lines)
|
||||||
|
|
Loading…
Reference in New Issue