mirror of https://github.com/acanas/swad-core.git
Version19.89.1
This commit is contained in:
parent
05db22eb5e
commit
031bfc97e2
|
@ -461,10 +461,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
||||||
Gbl.Agenda.CurrentPage = (unsigned) Pagination.CurrentPage;
|
Gbl.Agenda.CurrentPage = (unsigned) Pagination.CurrentPage;
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
if (Gbl.Agenda.Num)
|
if (Gbl.Agenda.Num)
|
||||||
{
|
{
|
||||||
|
@ -487,10 +486,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Button to create a new event *****/
|
/***** Button to create a new event *****/
|
||||||
if (AgendaType == Agd_MY_AGENDA)
|
if (AgendaType == Agd_MY_AGENDA)
|
||||||
|
|
|
@ -151,10 +151,9 @@ static void Asg_ShowAllAssignments (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
if (Gbl.Asgs.Num)
|
if (Gbl.Asgs.Num)
|
||||||
{
|
{
|
||||||
|
@ -176,10 +175,9 @@ static void Asg_ShowAllAssignments (void)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_assignments);
|
Ale_ShowAlert (Ale_INFO,Txt_No_assignments);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Button to create a new assignment *****/
|
/***** Button to create a new assignment *****/
|
||||||
if (Asg_CheckIfICanCreateAssignments ())
|
if (Asg_CheckIfICanCreateAssignments ())
|
||||||
|
|
|
@ -212,10 +212,9 @@ static void Att_ShowAllAttEvents (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
if (Gbl.AttEvents.Num)
|
if (Gbl.AttEvents.Num)
|
||||||
{
|
{
|
||||||
|
@ -263,10 +262,9 @@ static void Att_ShowAllAttEvents (void)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Button to create a new attendance event *****/
|
/***** Button to create a new attendance event *****/
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
|
|
|
@ -490,13 +490,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.89 (2019-12-10)"
|
#define Log_PLATFORM_VERSION "SWAD 19.89.1 (2019-12-11)"
|
||||||
#define CSS_FILE "swad19.88.5.css"
|
#define CSS_FILE "swad19.88.5.css"
|
||||||
#define JS_FILE "swad19.70.js"
|
#define JS_FILE "swad19.70.js"
|
||||||
/*
|
/*
|
||||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
|
|
||||||
|
Version 19.89.1: Dec 11, 2019 Code refactoring in pagination. (248171 lines)
|
||||||
Version 19.89: Dec 10, 2019 Game dates are in red colour if all their matches are finished or ot don't have matches. (248186 lines)
|
Version 19.89: Dec 10, 2019 Game dates are in red colour if all their matches are finished or ot don't have matches. (248186 lines)
|
||||||
4 changes necessary in database:
|
4 changes necessary in database:
|
||||||
ALTER TABLE mch_matches CHANGE COLUMN Showing Showing ENUM('nothing','stem','answers','results','start','end') NOT NULL DEFAULT 'nothing';
|
ALTER TABLE mch_matches CHANGE COLUMN Showing Showing ENUM('nothing','stem','answers','results','start','end') NOT NULL DEFAULT 'nothing';
|
||||||
|
|
30
swad_forum.c
30
swad_forum.c
|
@ -1037,10 +1037,9 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
|
||||||
Gbl.Forum.CurrentPagePsts = (unsigned) PaginationPsts.CurrentPage;
|
Gbl.Forum.CurrentPagePsts = (unsigned) PaginationPsts.CurrentPage;
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (PaginationPsts.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
&PaginationPsts,
|
||||||
Gbl.Forum.ForumSelected.ThrCod,
|
Gbl.Forum.ForumSelected.ThrCod);
|
||||||
&PaginationPsts);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -1098,10 +1097,9 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (PaginationPsts.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
&PaginationPsts,
|
||||||
Gbl.Forum.ForumSelected.ThrCod,
|
Gbl.Forum.ForumSelected.ThrCod);
|
||||||
&PaginationPsts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
@ -2476,10 +2474,9 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
||||||
if (NumThrs)
|
if (NumThrs)
|
||||||
{
|
{
|
||||||
/***** Write links to all the pages in the listing of threads *****/
|
/***** Write links to all the pages in the listing of threads *****/
|
||||||
if (PaginationThrs.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
&PaginationThrs,
|
||||||
0,
|
0);
|
||||||
&PaginationThrs);
|
|
||||||
|
|
||||||
/***** Heading row *****/
|
/***** Heading row *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
@ -2530,10 +2527,9 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** Write links to all the pages in the listing of threads *****/
|
/***** Write links to all the pages in the listing of threads *****/
|
||||||
if (PaginationThrs.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
&PaginationThrs,
|
||||||
0,
|
0);
|
||||||
&PaginationThrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Put a form to write the first post of a new thread *****/
|
/***** Put a form to write the first post of a new thread *****/
|
||||||
|
@ -3360,8 +3356,8 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
||||||
Pag_CalculatePagination (&PaginationPsts);
|
Pag_CalculatePagination (&PaginationPsts);
|
||||||
PaginationPsts.Anchor = For_FORUM_POSTS_SECTION_ID;
|
PaginationPsts.Anchor = For_FORUM_POSTS_SECTION_ID;
|
||||||
Pag_WriteLinksToPages (Pag_POSTS_FORUM,
|
Pag_WriteLinksToPages (Pag_POSTS_FORUM,
|
||||||
Thr.ThrCod,
|
|
||||||
&PaginationPsts,
|
&PaginationPsts,
|
||||||
|
Thr.ThrCod,
|
||||||
Thr.Enabled[For_FIRST_MSG],
|
Thr.Enabled[For_FIRST_MSG],
|
||||||
Thr.Subject,
|
Thr.Subject,
|
||||||
Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] :
|
Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] :
|
||||||
|
|
14
swad_game.c
14
swad_game.c
|
@ -212,10 +212,9 @@ static void Gam_ListAllGames (void)
|
||||||
Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
if (Gbl.Games.Num)
|
if (Gbl.Games.Num)
|
||||||
{
|
{
|
||||||
|
@ -272,10 +271,9 @@ static void Gam_ListAllGames (void)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_games);
|
Ale_ShowAlert (Ale_INFO,Txt_No_games);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Button to create a new game *****/
|
/***** Button to create a new game *****/
|
||||||
if (Gam_CheckIfICanEditGames ())
|
if (Gam_CheckIfICanEditGames ())
|
||||||
|
|
|
@ -1816,10 +1816,9 @@ static void Msg_ShowSentOrReceivedMessages (void)
|
||||||
Gbl.Msg.CurrentPage);
|
Gbl.Msg.CurrentPage);
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Show received / sent messages in this page *****/
|
/***** Show received / sent messages in this page *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -1840,10 +1839,9 @@ static void Msg_ShowSentOrReceivedMessages (void)
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
|
|
|
@ -128,14 +128,16 @@ void Pag_CalculatePagination (struct Pagination *Pagination)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
struct Pagination *Pagination,
|
||||||
struct Pagination *Pagination)
|
long ThrCod)
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
if (Pagination->MoreThanOnePage)
|
||||||
Pag_WriteLinksToPages (WhatPaginate,
|
{
|
||||||
ThrCod,
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Pagination,true,NULL,"PAG_TXT",false);
|
Pag_WriteLinksToPages (WhatPaginate,Pagination,ThrCod,
|
||||||
HTM_DIV_End ();
|
true,NULL,"PAG_TXT",false);
|
||||||
|
HTM_DIV_End ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -143,8 +145,8 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
|
||||||
struct Pagination *Pagination,
|
struct Pagination *Pagination,
|
||||||
|
long ThrCod,
|
||||||
bool FirstMsgEnabled,
|
bool FirstMsgEnabled,
|
||||||
const char *Subject,const char *ClassTxt,
|
const char *Subject,const char *ClassTxt,
|
||||||
bool LinkToPagCurrent)
|
bool LinkToPagCurrent)
|
||||||
|
|
|
@ -74,11 +74,11 @@ struct Pagination // Used for threads and messages pagination
|
||||||
|
|
||||||
void Pag_CalculatePagination (struct Pagination *Pagination);
|
void Pag_CalculatePagination (struct Pagination *Pagination);
|
||||||
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
struct Pagination *Pagination,
|
||||||
struct Pagination *Pagination);
|
long ThrCod);
|
||||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
|
||||||
struct Pagination *Pagination,
|
struct Pagination *Pagination,
|
||||||
|
long ThrCod,
|
||||||
bool FirstMsgEnabled,
|
bool FirstMsgEnabled,
|
||||||
const char *Subject,const char *ClassTxt,
|
const char *Subject,const char *ClassTxt,
|
||||||
bool LinkToPagCurrent);
|
bool LinkToPagCurrent);
|
||||||
|
|
|
@ -425,10 +425,9 @@ static void Prj_ShowPrjsInCurrentPage (void)
|
||||||
if (Gbl.Prjs.Num)
|
if (Gbl.Prjs.Num)
|
||||||
{
|
{
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Allocate memory for the project *****/
|
/***** Allocate memory for the project *****/
|
||||||
Prj_AllocMemProject (&Prj);
|
Prj_AllocMemProject (&Prj);
|
||||||
|
@ -471,10 +470,9 @@ static void Prj_ShowPrjsInCurrentPage (void)
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
}
|
}
|
||||||
else // No projects created
|
else // No projects created
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
||||||
|
|
|
@ -229,10 +229,9 @@ static void Svy_ListAllSurveys (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write links to pages *****/
|
/***** Write links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
if (Gbl.Svys.Num)
|
if (Gbl.Svys.Num)
|
||||||
{
|
{
|
||||||
|
@ -284,10 +283,9 @@ static void Svy_ListAllSurveys (void)
|
||||||
Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
|
Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
|
||||||
|
|
||||||
/***** Write again links to pages *****/
|
/***** Write again links to pages *****/
|
||||||
if (Pagination.MoreThanOnePage)
|
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
&Pagination,
|
||||||
0,
|
0);
|
||||||
&Pagination);
|
|
||||||
|
|
||||||
/***** Button to create a new survey *****/
|
/***** Button to create a new survey *****/
|
||||||
if (Svy_CheckIfICanCreateSvy ())
|
if (Svy_CheckIfICanCreateSvy ())
|
||||||
|
|
Loading…
Reference in New Issue