Version 22.33.2: Sep 29, 2022 Changes in program resources and course forums.

This commit is contained in:
acanas 2022-09-29 17:25:27 +02:00
parent ddddce93be
commit 1e6d44af67
11 changed files with 30 additions and 8 deletions

View File

@ -123,6 +123,7 @@ void AsgRsc_WriteAssignmentInCrsProgram (long AsgCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/**************** Get assignment title from assignment code ******************/ /**************** Get assignment title from assignment code ******************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void AsgRsc_GetTitleFromAsgCod (long AsgCod,char *Title,size_t TitleSize) void AsgRsc_GetTitleFromAsgCod (long AsgCod,char *Title,size_t TitleSize)
{ {

View File

@ -108,6 +108,7 @@ void AttRsc_WriteAttEventInCrsProgram (long AttCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/*************** Get attendance event title from game code *******************/ /*************** Get attendance event title from game code *******************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void AttRsc_GetTitleFromAttCod (long AttCod,char *Title,size_t TitleSize) void AttRsc_GetTitleFromAttCod (long AttCod,char *Title,size_t TitleSize)
{ {

View File

@ -232,6 +232,7 @@ void BrwRsc_WriteMrkFileNameInCrsProgram (long FilCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/******************** Get document name from file code ***********************/ /******************** Get document name from file code ***********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void BrwRsc_GetDocTitleFromFilCod (long FilCod,char *Title,size_t TitleSize) void BrwRsc_GetDocTitleFromFilCod (long FilCod,char *Title,size_t TitleSize)
{ {
@ -255,6 +256,7 @@ void BrwRsc_GetDocTitleFromFilCod (long FilCod,char *Title,size_t TitleSize)
/*****************************************************************************/ /*****************************************************************************/
/******************* Get marks file name from file code **********************/ /******************* Get marks file name from file code **********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void BrwRsc_GetMrkTitleFromFilCod (long FilCod,char *Title,size_t TitleSize) void BrwRsc_GetMrkTitleFromFilCod (long FilCod,char *Title,size_t TitleSize)
{ {

View File

@ -120,6 +120,7 @@ void CfeRsc_WriteCallForExamInCrsProgram (long ExaCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/************** Get call for exam text from call for exam code ***************/ /************** Get call for exam text from call for exam code ***************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void CfeRsc_GetTitleFromExaCod (long ExaCod,char *Title,size_t TitleSize) void CfeRsc_GetTitleFromExaCod (long ExaCod,char *Title,size_t TitleSize)
{ {

View File

@ -606,12 +606,12 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia. TODO: Attach pdf files in multimedia.
*/ */
#define Log_PLATFORM_VERSION "SWAD 22.33.1 (2022-09-29)" #define Log_PLATFORM_VERSION "SWAD 22.33.2 (2022-09-29)"
#define CSS_FILE "swad22.22.1.css" #define CSS_FILE "swad22.22.1.css"
#define JS_FILE "swad21.100.js" #define JS_FILE "swad21.100.js"
/* /*
Version 22.33.3: Sep 29, 2022 TODO: Fix layout of marks file metadata. (? lines) Version 22.33.3: Sep 29, 2022 TODO: Fix layout of marks file metadata. (? lines)
Version 22.33.2: Sep 29, 2022 TODO: Changes in program resources and course forums. (? lines) Version 22.33.2: Sep 29, 2022 Changes in program resources and course forums. (332708 lines)
Version 22.33.1: Sep 29, 2022 Changes in program resources and attendance events. (332687 lines) Version 22.33.1: Sep 29, 2022 Changes in program resources and attendance events. (332687 lines)
Version 22.33: Sep 29, 2022 Changes in program resources, documents and mark files. (332683 lines) Version 22.33: Sep 29, 2022 Changes in program resources, documents and mark files. (332683 lines)
Version 22.32.4: Sep 29, 2022 Changes in program resources and surveys. (332650 lines) Version 22.32.4: Sep 29, 2022 Changes in program resources and surveys. (332650 lines)

View File

@ -111,6 +111,7 @@ void ExaRsc_WriteExamInCrsProgram (long ExaCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/*********************** Get exam title from exam code ***********************/ /*********************** Get exam title from exam code ***********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void ExaRsc_GetTitleFromExaCod (long ExaCod,char *Title,size_t TitleSize) void ExaRsc_GetTitleFromExaCod (long ExaCod,char *Title,size_t TitleSize)
{ {

View File

@ -363,7 +363,7 @@ static unsigned For_GetNumOfUnreadPostsInThr (long ThrCod,unsigned NumPostsInThr
static void For_WriteNumberOfThrs (unsigned NumThrs); static void For_WriteNumberOfThrs (unsigned NumThrs);
static void For_PutIconNewThread (void *Forums); static void For_PutIconsThreads (void *Forums);
static void For_PutAllHiddenParamsNewThread (void *Forums); static void For_PutAllHiddenParamsNewThread (void *Forums);
static void For_ListForumThrs (struct For_Forums *Forums, static void For_ListForumThrs (struct For_Forums *Forums,
long ThrCods[Pag_ITEMS_PER_PAGE], long ThrCods[Pag_ITEMS_PER_PAGE],
@ -2043,7 +2043,7 @@ void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums,
/***** Begin box for threads of this forum *****/ /***** Begin box for threads of this forum *****/
snprintf (FrameTitle,sizeof (FrameTitle),"%s: %s",Txt_Forum,ForumName); snprintf (FrameTitle,sizeof (FrameTitle),"%s: %s",Txt_Forum,ForumName);
Box_BoxBegin (NULL,FrameTitle, Box_BoxBegin (NULL,FrameTitle,
For_PutIconNewThread,Forums, For_PutIconsThreads,Forums,
Hlp_COMMUNICATION_Forums_threads,Box_NOT_CLOSABLE); Hlp_COMMUNICATION_Forums_threads,Box_NOT_CLOSABLE);
/***** List the threads *****/ /***** List the threads *****/
@ -2119,15 +2119,25 @@ void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums,
} }
/*****************************************************************************/ /*****************************************************************************/
/********************** Put icon to write a new thread ***********************/ /***************** Put icons in list of threads of a forum *******************/
/*****************************************************************************/ /*****************************************************************************/
static void For_PutIconNewThread (void *Forums) static void For_PutIconsThreads (void *Forums)
{ {
if (Forums) if (Forums)
{
/***** Put icon to write a new thread *****/
Ico_PutContextualIconToAdd (For_ActionsSeeFor[((struct For_Forums *) Forums)->Forum.Type], Ico_PutContextualIconToAdd (For_ActionsSeeFor[((struct For_Forums *) Forums)->Forum.Type],
For_NEW_THREAD_SECTION_ID, For_NEW_THREAD_SECTION_ID,
For_PutAllHiddenParamsNewThread,Forums); For_PutAllHiddenParamsNewThread,Forums);
/***** Put icon to get resource link *****/
if (((struct For_Forums *) Forums)->Forum.Type == For_FORUM_COURSE_USRS &&
(Gbl.Usrs.Me.Role.Logged == Rol_TCH || // Only if I am a teacher
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)) // or a superuser
Ico_PutContextualIconToGetLink (ActReqLnkForCrsUsr,NULL,
For_PutAllHiddenParamsNewPost,Forums);
}
} }
static void For_PutAllHiddenParamsNewThread (void *Forums) static void For_PutAllHiddenParamsNewThread (void *Forums)

View File

@ -102,7 +102,8 @@ void ForRsc_WriteThreadInCrsProgram (long ThrCod,bool PutFormToGo,
// The page should be that corresponding to the selected thread. // The page should be that corresponding to the selected thread.
NextAction = (ThrCod > 0) ? ActSeePstForCrsUsr : // Thread specified NextAction = (ThrCod > 0) ? ActSeePstForCrsUsr : // Thread specified
ActSeeForCrsUsr; // All threads ActSeeForCrsUsr; // All threads
Frm_BeginFormAnchor (NextAction,For_FORUM_POSTS_SECTION_ID); Frm_BeginFormAnchor (NextAction,ThrCod > 0 ? For_FORUM_POSTS_SECTION_ID :
For_FORUM_THREADS_SECTION_ID);
For_PutAllHiddenParamsNewPost (&Forums); For_PutAllHiddenParamsNewPost (&Forums);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction], HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"", "class=\"LM BT_LINK PRG_LNK_%s\"",
@ -131,6 +132,7 @@ void ForRsc_WriteThreadInCrsProgram (long ThrCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/********************* Get survey title from survey code *********************/ /********************* Get survey title from survey code *********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void ForRsc_GetTitleFromThrCod (long ThrCod,char *Title,size_t TitleSize) void ForRsc_GetTitleFromThrCod (long ThrCod,char *Title,size_t TitleSize)
{ {
@ -144,5 +146,6 @@ void ForRsc_GetTitleFromThrCod (long ThrCod,char *Title,size_t TitleSize)
Str_Copy (Title,Subject,TitleSize); Str_Copy (Title,Subject,TitleSize);
} }
else else
Str_Copy (Title,Txt_Forum,TitleSize); snprintf (Title,TitleSize + 1,"%s %s",
Txt_Forum,Gbl.Hierarchy.Crs.ShrtName);
} }

View File

@ -112,6 +112,7 @@ void GamRsc_WriteGameInCrsProgram (long GamCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/*********************** Get game title from game code ***********************/ /*********************** Get game title from game code ***********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void GamRsc_GetTitleFromGamCod (long GamCod,char *Title,size_t TitleSize) void GamRsc_GetTitleFromGamCod (long GamCod,char *Title,size_t TitleSize)
{ {

View File

@ -115,6 +115,7 @@ void PrjRsc_WriteProjectInCrsProgram (long PrjCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/******************* Get project title from project code *********************/ /******************* Get project title from project code *********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void PrjRsc_GetTitleFromPrjCod (long PrjCod,char *Title,size_t TitleSize) void PrjRsc_GetTitleFromPrjCod (long PrjCod,char *Title,size_t TitleSize)
{ {

View File

@ -111,6 +111,7 @@ void SvyRsc_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
/*****************************************************************************/ /*****************************************************************************/
/********************* Get survey title from survey code *********************/ /********************* Get survey title from survey code *********************/
/*****************************************************************************/ /*****************************************************************************/
// The trailing null character is not counted in TitleSize
void SvyRsc_GetTitleFromSvyCod (long SvyCod,char *Title,size_t TitleSize) void SvyRsc_GetTitleFromSvyCod (long SvyCod,char *Title,size_t TitleSize)
{ {