Version 22.22: Sep 23, 2022 Course program open to teachers and students.

This commit is contained in:
acanas 2022-09-23 01:33:33 +02:00
parent 2cbcea8099
commit 429136495f
11 changed files with 22 additions and 21 deletions

View File

@ -412,7 +412,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
// TabCrs ******************************************************************
// Actions in menu:
[ActSeeCrsInf ] = { 847, 0,TabCrs,ActSeeCrsInf ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Crs_ShowIntroduction ,"info" },
[ActSeePrg ] = {1821, 1,TabCrs,ActSeePrg ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ShowCourseProgram ,"clipboard-list" },
[ActSeePrg ] = {1821, 1,TabCrs,ActSeePrg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ShowCourseProgram ,"clipboard-list" },
[ActSeeTchGui ] = { 784, 2,TabCrs,ActSeeTchGui ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_ShowInfo ,"book-open" },
[ActSeeSyl ] = {1242, 3,TabCrs,ActSeeSyl ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_ShowInfo ,"list-ol" },
[ActSeeBib ] = { 32, 4,TabCrs,ActSeeBib ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_ShowInfo ,"book" },
@ -443,9 +443,9 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActDwnPrgItm ] = {1832,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveDownItem ,NULL},
[ActLftPrgItm ] = {1834,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveLeftItem ,NULL},
[ActRgtPrgItm ] = {1833,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveRightItem ,NULL},
[ActExpSeePrgItm ] = {1944,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ExpandItem ,NULL},
[ActExpSeePrgItm ] = {1944,-1,TabUnk,ActSeePrg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ExpandItem ,NULL},
[ActExpEdiPrgItm ] = {1946,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ExpandItem ,NULL},
[ActConSeePrgItm ] = {1945,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ContractItem ,NULL},
[ActConSeePrgItm ] = {1945,-1,TabUnk,ActSeePrg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ContractItem ,NULL},
[ActConEdiPrgItm ] = {1947,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ContractItem ,NULL},
[ActFrmSeePrgRsc ] = {1925,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_ViewResourcesAfterEdit ,NULL},

View File

@ -439,7 +439,8 @@ void Asg_ShowOneAssignmentInBox (struct Asg_Assignments *Assignments)
static void Asg_PutIconsOneAsg (void *Assignments)
{
/***** Put icon to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkAsg,NULL,
Asg_PutParams,Assignments);
}

View File

@ -1517,7 +1517,8 @@ static void Att_ShowEvent (struct Att_Events *Events)
static void Att_PutIconsOneAtt (void *Events)
{
/***** Put icon to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkAtt,NULL,
Att_PutParams,Events);
}

View File

@ -8145,21 +8145,14 @@ void Brw_ShowFileMetadata (void)
FileNameToShow);
/***** Begin box *****/
/*
PutIconToGetLink = (Gbl.FileBrowser.Type == Brw_SHOW_DOC_CRS || // Only document zone
Gbl.FileBrowser.Type == Brw_ADMI_DOC_CRS) &&
(FileMetadata.FilFolLnk.Type == Brw_IS_FILE || // Only files or links
FileMetadata.FilFolLnk.Type == Brw_IS_LINK) &&
(Gbl.Usrs.Me.Role.Logged == Rol_TCH || // Only if I am teacher or superuser
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
*/
PutIconToGetLink = (Gbl.FileBrowser.Type == Brw_SHOW_DOC_CRS || // Only document zone
Gbl.FileBrowser.Type == Brw_ADMI_DOC_CRS ||
Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ||
Gbl.FileBrowser.Type == Brw_ADMI_MRK_CRS) &&
(FileMetadata.FilFolLnk.Type == Brw_IS_FILE || // Only files or links
FileMetadata.FilFolLnk.Type == Brw_IS_LINK) &&
(Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM); // Only if I am superuser // TODO: Include teachers
(Gbl.Usrs.Me.Role.Logged == Rol_TCH || // Only if I am a teacher
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM); // or a superuser
if (PutIconToGetLink)
Box_BoxShadowBegin (NULL,NULL,
Brw_PutIconToGetLinkToFile,&FileMetadata,

View File

@ -1538,7 +1538,8 @@ static void Cfe_PutIconsCallForExam (void *CallsForExams)
&((struct Cfe_CallsForExams *) CallsForExams)->ExaCod);
/***** Link to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkCfe,NULL,
Cfe_PutParamExaCodToEdit,
&((struct Cfe_CallsForExams *) CallsForExams)->ExaCod);

View File

@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 22.21 (2022-09-22)"
#define Log_PLATFORM_VERSION "SWAD 22.22 (2022-09-23)"
#define CSS_FILE "swad22.21.css"
#define JS_FILE "swad21.100.js"
/*
Version 22.22: Sep 23, 2022 Course program open to teachers and students. (331856 lines)
Version 22.21: Sep 22, 2022 Changes in layout of course program. (331855 lines)
Version 22.20: Sep 22, 2022 Hidden items are not shown in program. (331838 lines)
Copy the following icon to icon public directory:

View File

@ -768,7 +768,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
Enr_GetMyCourses ();
/***** Begin form *****/
Frm_BeginFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf :
Frm_BeginFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeePrg :
ActReqSch);
/***** Begin selector of courses *****/

View File

@ -660,7 +660,8 @@ static void Exa_PutIconToShowResultsOfExam (void *Exams)
/***** Link to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkExa,NULL,
Exa_PutParams,Exams);
}

View File

@ -843,7 +843,8 @@ static void For_PutIconsOneThread (void *Forums)
/***** Put icon to get resource link *****/
if (((struct For_Forums *) Forums)->Forum.Type == For_FORUM_COURSE_USRS &&
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
(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);
}

View File

@ -710,7 +710,8 @@ static void Gam_PutIconsOneGame (void *Games)
Gam_PutParams,Games);
/***** Link to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkGam,NULL,
Gam_PutParams,Games);
}

View File

@ -731,7 +731,8 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
static void Svy_PutIconsOneSvy (void *Surveys)
{
/***** Put icon to get resource link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) // Only if I am superuser // TODO: Include teachers
if (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 (ActReqLnkSvy,NULL,
Svy_PutParams,Surveys);
}