mirror of https://github.com/acanas/swad-core.git
Version 16.177.2
This commit is contained in:
parent
02be3eded9
commit
00269ddd19
|
@ -212,13 +212,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.177.1 (2017-04-13)"
|
#define Log_PLATFORM_VERSION "SWAD 16.177.2 (2017-04-14)"
|
||||||
#define CSS_FILE "swad16.177.css"
|
#define CSS_FILE "swad16.177.css"
|
||||||
#define JS_FILE "swad16.144.js"
|
#define JS_FILE "swad16.144.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.177.2: Apr 14, 2017 Code refactoring in forums. (217604 lines)
|
||||||
Version 16.177.1: Apr 13, 2017 Changes in layout of forums. (217590 lines)
|
Version 16.177.1: Apr 13, 2017 Changes in layout of forums. (217590 lines)
|
||||||
Version 16.177: Apr 13, 2017 Code refactoring related to pagination.
|
Version 16.177: Apr 13, 2017 Code refactoring related to pagination.
|
||||||
Changes in layout of forums. (217609 lines)
|
Changes in layout of forums. (217609 lines)
|
||||||
|
|
80
swad_forum.c
80
swad_forum.c
|
@ -1897,7 +1897,6 @@ static void For_PutFormWhichForums (void)
|
||||||
- only the forums of current institution/degree/course *****/
|
- only the forums of current institution/degree/course *****/
|
||||||
Act_FormStart (ActSeeFor);
|
Act_FormStart (ActSeeFor);
|
||||||
For_PutParamForumOrder ();
|
For_PutParamForumOrder ();
|
||||||
For_PutParamsForumInsDegCrs ();
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"SEL_BELOW_TITLE\">"
|
fprintf (Gbl.F.Out,"<div class=\"SEL_BELOW_TITLE\">"
|
||||||
"<ul>");
|
"<ul>");
|
||||||
|
|
||||||
|
@ -3729,43 +3728,56 @@ void For_ShowThrPsts (void)
|
||||||
|
|
||||||
static void For_GetParamsForum (void)
|
static void For_GetParamsForum (void)
|
||||||
{
|
{
|
||||||
/***** Get which forums I want to see *****/
|
static bool AlreadyGot = false;
|
||||||
Gbl.Forum.WhichForums = (For_WhichForums_t)
|
|
||||||
Par_GetParToUnsignedLong ("WhichForum",
|
|
||||||
0,
|
|
||||||
For_NUM_WHICH_FORUMS - 1,
|
|
||||||
(unsigned long) For_DEFAULT_WHICH_FORUMS);
|
|
||||||
|
|
||||||
/***** Get order type *****/
|
if (!AlreadyGot)
|
||||||
Gbl.Forum.SelectedOrder = (For_Order_t)
|
{
|
||||||
Par_GetParToUnsignedLong ("Order",
|
/***** Get which forums I want to see *****/
|
||||||
0,
|
Gbl.Forum.WhichForums = (For_WhichForums_t)
|
||||||
For_NUM_ORDERS - 1,
|
Par_GetParToUnsignedLong ("WhichForum",
|
||||||
(unsigned long) For_DEFAULT_ORDER);
|
0,
|
||||||
|
For_NUM_WHICH_FORUMS - 1,
|
||||||
|
(unsigned long) For_DEFAULT_WHICH_FORUMS);
|
||||||
|
|
||||||
/***** Get parameter with code of institution *****/
|
/***** Get order type *****/
|
||||||
Gbl.Forum.Ins.InsCod = Par_GetParToLong ("ForInsCod");
|
Gbl.Forum.SelectedOrder = (For_Order_t)
|
||||||
Ins_GetDataOfInstitutionByCod (&Gbl.Forum.Ins,Ins_GET_BASIC_DATA);
|
Par_GetParToUnsignedLong ("Order",
|
||||||
if (Gbl.Forum.Ins.InsCod > 0)
|
0,
|
||||||
Gbl.Forum.Cod = Gbl.Forum.Ins.InsCod;
|
For_NUM_ORDERS - 1,
|
||||||
|
(unsigned long) For_DEFAULT_ORDER);
|
||||||
|
|
||||||
/***** Get parameter with code of institution *****/
|
/***** Get parameter with code of course *****/
|
||||||
Gbl.Forum.Ctr.CtrCod = Par_GetParToLong ("ForCtrCod");
|
Gbl.Forum.Crs.CrsCod = Par_GetParToLong ("ForCrsCod");
|
||||||
Ctr_GetDataOfCentreByCod (&Gbl.Forum.Ctr);
|
Crs_GetDataOfCourseByCod (&Gbl.Forum.Crs);
|
||||||
if (Gbl.Forum.Ctr.CtrCod > 0)
|
if (Gbl.Forum.Crs.CrsCod > 0)
|
||||||
Gbl.Forum.Cod = Gbl.Forum.Ctr.CtrCod;
|
Gbl.Forum.Cod = Gbl.Forum.Crs.CrsCod;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/***** Get parameter with code of degree *****/
|
||||||
|
Gbl.Forum.Deg.DegCod = Par_GetParToLong ("ForDegCod");
|
||||||
|
Deg_GetDataOfDegreeByCod (&Gbl.Forum.Deg);
|
||||||
|
if (Gbl.Forum.Deg.DegCod > 0)
|
||||||
|
Gbl.Forum.Cod = Gbl.Forum.Deg.DegCod;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/***** Get parameter with code of institution *****/
|
||||||
|
Gbl.Forum.Ctr.CtrCod = Par_GetParToLong ("ForCtrCod");
|
||||||
|
Ctr_GetDataOfCentreByCod (&Gbl.Forum.Ctr);
|
||||||
|
if (Gbl.Forum.Ctr.CtrCod > 0)
|
||||||
|
Gbl.Forum.Cod = Gbl.Forum.Ctr.CtrCod;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/***** Get parameter with code of institution *****/
|
||||||
|
Gbl.Forum.Ins.InsCod = Par_GetParToLong ("ForInsCod");
|
||||||
|
Ins_GetDataOfInstitutionByCod (&Gbl.Forum.Ins,Ins_GET_BASIC_DATA);
|
||||||
|
if (Gbl.Forum.Ins.InsCod > 0)
|
||||||
|
Gbl.Forum.Cod = Gbl.Forum.Ins.InsCod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***** Get parameter with code of degree *****/
|
AlreadyGot = true;
|
||||||
Gbl.Forum.Deg.DegCod = Par_GetParToLong ("ForDegCod");
|
}
|
||||||
Deg_GetDataOfDegreeByCod (&Gbl.Forum.Deg);
|
|
||||||
if (Gbl.Forum.Deg.DegCod > 0)
|
|
||||||
Gbl.Forum.Cod = Gbl.Forum.Deg.DegCod;
|
|
||||||
|
|
||||||
/***** Get parameter with code of course *****/
|
|
||||||
Gbl.Forum.Crs.CrsCod = Par_GetParToLong ("ForCrsCod");
|
|
||||||
Crs_GetDataOfCourseByCod (&Gbl.Forum.Crs);
|
|
||||||
if (Gbl.Forum.Crs.CrsCod > 0)
|
|
||||||
Gbl.Forum.Cod = Gbl.Forum.Crs.CrsCod;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -4298,13 +4298,11 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
|
||||||
|
|
||||||
void Grp_GetParamWhichGrps (void)
|
void Grp_GetParamWhichGrps (void)
|
||||||
{
|
{
|
||||||
static bool FirstTime = true;
|
static bool AlreadyGot = false;
|
||||||
Grp_WhichGroups_t WhichGroupsDefault;
|
Grp_WhichGroups_t WhichGroupsDefault;
|
||||||
|
|
||||||
if (FirstTime)
|
if (!AlreadyGot)
|
||||||
{
|
{
|
||||||
FirstTime = false;
|
|
||||||
|
|
||||||
/***** Get which grous (my groups or all groups) *****/
|
/***** Get which grous (my groups or all groups) *****/
|
||||||
/* Set default */
|
/* Set default */
|
||||||
switch (Gbl.Action.Act)
|
switch (Gbl.Action.Act)
|
||||||
|
@ -4334,5 +4332,7 @@ void Grp_GetParamWhichGrps (void)
|
||||||
0,
|
0,
|
||||||
Grp_NUM_WHICH_GROUPS - 1,
|
Grp_NUM_WHICH_GROUPS - 1,
|
||||||
(unsigned long) WhichGroupsDefault);
|
(unsigned long) WhichGroupsDefault);
|
||||||
|
|
||||||
|
AlreadyGot = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue