mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-09 10:15:24 +02:00
Version 16.91.2
This commit is contained in:
parent
a6d2d2339b
commit
345eaf8ea0
|
@ -2788,8 +2788,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActFrmRolSes */{ 843, 1,TabPrf,ActFrmRolSes ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_WriteFormLogout ,"keyuser64x64.gif" },
|
/* ActFrmRolSes */{ 843, 1,TabPrf,ActFrmRolSes ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_WriteFormLogout ,"keyuser64x64.gif" },
|
||||||
/* ActMyCrs */{ 987, 2,TabPrf,ActMyCrs ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_ReqSelectOneOfMyCourses ,"hierarchy64x64.png" },
|
/* ActMyCrs */{ 987, 2,TabPrf,ActMyCrs ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_ReqSelectOneOfMyCourses ,"hierarchy64x64.png" },
|
||||||
/* ActSeeMyTT */{ 408, 3,TabPrf,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,TT_ShowClassTimeTable ,"clock64x64.gif" },
|
/* ActSeeMyTT */{ 408, 3,TabPrf,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,TT_ShowClassTimeTable ,"clock64x64.gif" },
|
||||||
// /* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" },
|
/* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" },
|
||||||
/* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" }, // TODO: Remove when debugged
|
|
||||||
/* ActFrmMyAcc */{ 36, 5,TabPrf,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_ShowFormMyAccount ,"arroba64x64.gif" },
|
/* ActFrmMyAcc */{ 36, 5,TabPrf,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_ShowFormMyAccount ,"arroba64x64.gif" },
|
||||||
/* ActReqEdiRecCom */{ 285, 6,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rec_ShowFormMySharedRecord ,"card64x64.gif" },
|
/* ActReqEdiRecCom */{ 285, 6,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rec_ShowFormMySharedRecord ,"card64x64.gif" },
|
||||||
/* ActEdiPrf */{ 673, 7,TabPrf,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Pre_EditPrefs ,"heart64x64.gif" },
|
/* ActEdiPrf */{ 673, 7,TabPrf,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Pre_EditPrefs ,"heart64x64.gif" },
|
||||||
|
|
|
@ -173,7 +173,7 @@ void Agd_ShowMyPublicAgenda (void)
|
||||||
|
|
||||||
void Agd_ShowUsrAgenda (void)
|
void Agd_ShowUsrAgenda (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Teachers_agenda;
|
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||||
extern const char *Txt_Public_agenda_USER;
|
extern const char *Txt_Public_agenda_USER;
|
||||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
bool ItsMe;
|
bool ItsMe;
|
||||||
|
@ -187,7 +187,7 @@ void Agd_ShowUsrAgenda (void)
|
||||||
Lay_StartRoundFrame ("100%",Gbl.Title,
|
Lay_StartRoundFrame ("100%",Gbl.Title,
|
||||||
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
|
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
|
||||||
NULL,
|
NULL,
|
||||||
Hlp_USERS_Teachers_agenda);
|
Hlp_PROFILE_Agenda_public_agenda);
|
||||||
|
|
||||||
/***** Show the current events in the user's agenda *****/
|
/***** Show the current events in the user's agenda *****/
|
||||||
Agd_ShowEventsToday (Agd_OTHER_PUBLIC_AGENDA_TODAY);
|
Agd_ShowEventsToday (Agd_OTHER_PUBLIC_AGENDA_TODAY);
|
||||||
|
@ -208,7 +208,7 @@ void Agd_ShowUsrAgenda (void)
|
||||||
|
|
||||||
void Agd_ShowOtherAgendaAfterLogIn (void)
|
void Agd_ShowOtherAgendaAfterLogIn (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Teachers_agenda;
|
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||||
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
extern const char *Txt_Public_agenda_USER;
|
extern const char *Txt_Public_agenda_USER;
|
||||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
|
@ -229,7 +229,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
|
||||||
Lay_StartRoundFrame ("100%",Gbl.Title,
|
Lay_StartRoundFrame ("100%",Gbl.Title,
|
||||||
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
|
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
|
||||||
NULL,
|
NULL,
|
||||||
Hlp_USERS_Teachers_agenda);
|
Hlp_PROFILE_Agenda_public_agenda);
|
||||||
|
|
||||||
/***** Show the current events in the user's agenda *****/
|
/***** Show the current events in the user's agenda *****/
|
||||||
Agd_ShowEventsToday (Agd_OTHER_PUBLIC_AGENDA_TODAY);
|
Agd_ShowEventsToday (Agd_OTHER_PUBLIC_AGENDA_TODAY);
|
||||||
|
@ -328,7 +328,7 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
||||||
static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType)
|
static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_PROFILE_Agenda;
|
extern const char *Hlp_PROFILE_Agenda;
|
||||||
extern const char *Hlp_USERS_Teachers_agenda;
|
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||||
extern const char *Txt_Today;
|
extern const char *Txt_Today;
|
||||||
extern const char *Txt_Public_agenda_USER;
|
extern const char *Txt_Public_agenda_USER;
|
||||||
extern const char *Txt_My_agenda;
|
extern const char *Txt_My_agenda;
|
||||||
|
@ -356,7 +356,7 @@ static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType)
|
||||||
case Agd_OTHER_PUBLIC_AGENDA_TODAY:
|
case Agd_OTHER_PUBLIC_AGENDA_TODAY:
|
||||||
Lay_StartRoundFrameTableShadow (NULL,Txt_Today,
|
Lay_StartRoundFrameTableShadow (NULL,Txt_Today,
|
||||||
NULL,
|
NULL,
|
||||||
Hlp_USERS_Teachers_agenda,
|
Hlp_PROFILE_Agenda_public_agenda,
|
||||||
2);
|
2);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -685,8 +685,8 @@ static void Agd_WriteEventAuthor (struct AgendaEvent *AgdEvent)
|
||||||
strcat (Surnames," ");
|
strcat (Surnames," ");
|
||||||
strcat (Surnames,UsrDat.Surname2);
|
strcat (Surnames,UsrDat.Surname2);
|
||||||
}
|
}
|
||||||
Str_LimitLengthHTMLStr (FirstName,9);
|
Str_LimitLengthHTMLStr (FirstName,8);
|
||||||
Str_LimitLengthHTMLStr (Surnames,9);
|
Str_LimitLengthHTMLStr (Surnames,8);
|
||||||
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
||||||
AgdEvent->Hidden ? "MSG_AUT_LIGHT" :
|
AgdEvent->Hidden ? "MSG_AUT_LIGHT" :
|
||||||
"MSG_AUT",
|
"MSG_AUT",
|
||||||
|
|
|
@ -456,8 +456,8 @@ static void Asg_WriteAsgAuthor (struct Assignment *Asg)
|
||||||
strcat (Surnames," ");
|
strcat (Surnames," ");
|
||||||
strcat (Surnames,UsrDat.Surname2);
|
strcat (Surnames,UsrDat.Surname2);
|
||||||
}
|
}
|
||||||
Str_LimitLengthHTMLStr (FirstName,9);
|
Str_LimitLengthHTMLStr (FirstName,8);
|
||||||
Str_LimitLengthHTMLStr (Surnames,9);
|
Str_LimitLengthHTMLStr (Surnames,8);
|
||||||
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
||||||
Asg->Hidden ? "MSG_AUT_LIGHT" :
|
Asg->Hidden ? "MSG_AUT_LIGHT" :
|
||||||
"MSG_AUT",
|
"MSG_AUT",
|
||||||
|
|
|
@ -494,8 +494,8 @@ static void Att_WriteAttEventAuthor (struct AttendanceEvent *Att)
|
||||||
strcat (Surnames," ");
|
strcat (Surnames," ");
|
||||||
strcat (Surnames,UsrDat.Surname2);
|
strcat (Surnames,UsrDat.Surname2);
|
||||||
}
|
}
|
||||||
Str_LimitLengthHTMLStr (FirstName,9);
|
Str_LimitLengthHTMLStr (FirstName,8);
|
||||||
Str_LimitLengthHTMLStr (Surnames,9);
|
Str_LimitLengthHTMLStr (Surnames,8);
|
||||||
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
||||||
Att->Hidden ? "MSG_AUT_LIGHT" :
|
Att->Hidden ? "MSG_AUT_LIGHT" :
|
||||||
"MSG_AUT",
|
"MSG_AUT",
|
||||||
|
|
|
@ -185,13 +185,15 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.91.1 (2016-12-07)"
|
#define Log_PLATFORM_VERSION "SWAD 16.91.2 (2016-12-07)"
|
||||||
#define CSS_FILE "swad16.86.5.css"
|
#define CSS_FILE "swad16.86.5.css"
|
||||||
#define JS_FILE "swad16.90.2.js"
|
#define JS_FILE "swad16.90.2.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.91.2: Dec 07, 2016 Changes in permissions to view public agendas.
|
||||||
|
Changes in help on public agendas. (210187 lines)
|
||||||
Version 16.91.1: Dec 07, 2016 Fixed bug in notifications. (210192 lines)
|
Version 16.91.1: Dec 07, 2016 Fixed bug in notifications. (210192 lines)
|
||||||
Version 16.91: Dec 07, 2016 Changes in QR codes. (210204 lines)
|
Version 16.91: Dec 07, 2016 Changes in QR codes. (210204 lines)
|
||||||
Version 16.90.3: Dec 06, 2016 Changes related with agenda QR. (210156 lines)
|
Version 16.90.3: Dec 06, 2016 Changes related with agenda QR. (210156 lines)
|
||||||
|
|
|
@ -134,7 +134,6 @@ const char *Hlp_USERS_Students_course_record_card = WIKI "USERS.Students#course-
|
||||||
const char *Hlp_USERS_Teachers = WIKI "USERS.Teachers";
|
const char *Hlp_USERS_Teachers = WIKI "USERS.Teachers";
|
||||||
const char *Hlp_USERS_Teachers_shared_record_card = WIKI "USERS.Teachers#shared-record-card";
|
const char *Hlp_USERS_Teachers_shared_record_card = WIKI "USERS.Teachers#shared-record-card";
|
||||||
const char *Hlp_USERS_Teachers_timetable = WIKI "USERS.Teachers#timetable";
|
const char *Hlp_USERS_Teachers_timetable = WIKI "USERS.Teachers#timetable";
|
||||||
const char *Hlp_USERS_Teachers_agenda = WIKI "USERS.Teachers#agenda";
|
|
||||||
|
|
||||||
const char *Hlp_USERS_Administrators = WIKI "USERS.Administrators";
|
const char *Hlp_USERS_Administrators = WIKI "USERS.Administrators";
|
||||||
|
|
||||||
|
@ -228,9 +227,10 @@ const char *Hlp_PROFILE_Courses = WIKI "PROFILE.Courses";
|
||||||
|
|
||||||
const char *Hlp_PROFILE_Timetable = WIKI "PROFILE.Timetable";
|
const char *Hlp_PROFILE_Timetable = WIKI "PROFILE.Timetable";
|
||||||
|
|
||||||
const char *Hlp_PROFILE_Agenda = WIKI "PROFILE.Agenda";
|
const char *Hlp_PROFILE_Agenda = WIKI "PROFILE.Agenda";
|
||||||
const char *Hlp_PROFILE_Agenda_new_event = WIKI "PROFILE.Agenda#new-event";
|
const char *Hlp_PROFILE_Agenda_new_event = WIKI "PROFILE.Agenda#new-event";
|
||||||
const char *Hlp_PROFILE_Agenda_edit_event = WIKI "PROFILE.Agenda#edit-event";
|
const char *Hlp_PROFILE_Agenda_edit_event = WIKI "PROFILE.Agenda#edit-event";
|
||||||
|
const char *Hlp_PROFILE_Agenda_public_agenda = WIKI "PROFILE.Agenda#public-agenda";
|
||||||
|
|
||||||
const char *Hlp_PROFILE_Record = WIKI "PROFILE.Record";
|
const char *Hlp_PROFILE_Record = WIKI "PROFILE.Record";
|
||||||
const char *Hlp_PROFILE_Institution = WIKI "PROFILE.Institution";
|
const char *Hlp_PROFILE_Institution = WIKI "PROFILE.Institution";
|
||||||
|
|
|
@ -2322,7 +2322,6 @@ static void Rec_PutIconsCommands (void)
|
||||||
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER);
|
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER);
|
||||||
bool HeBelongsToCurrentCrs = (Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ||
|
bool HeBelongsToCurrentCrs = (Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ||
|
||||||
Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_TEACHER);
|
Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_TEACHER);
|
||||||
bool HeIsATeacherInAnyCrs = (Gbl.Record.UsrDat->Roles & (1 << Rol_TEACHER));
|
|
||||||
bool ICanViewAgenda;
|
bool ICanViewAgenda;
|
||||||
|
|
||||||
if (!Gbl.Form.Inside && // Only if not inside another form
|
if (!Gbl.Form.Inside && // Only if not inside another form
|
||||||
|
@ -2349,32 +2348,27 @@ static void Rec_PutIconsCommands (void)
|
||||||
Txt_View_record_for_this_course,NULL,
|
Txt_View_record_for_this_course,NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/***** Button to view teacher's agenda when:
|
/***** Button to view user's agenda
|
||||||
- he/she is a teacher and I share any course with him/her *****/
|
when I share any course with him/her *****/
|
||||||
// if (HeIsATeacherInAnyCrs)
|
if (ItsMe)
|
||||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM && // TODO: Remove when debugged
|
Lay_PutContextualLink (ActSeeMyAgd,
|
||||||
HeIsATeacherInAnyCrs)
|
NULL,
|
||||||
|
"date64x64.gif",
|
||||||
|
Txt_View_agenda,NULL,
|
||||||
|
NULL);
|
||||||
|
else // Not me
|
||||||
{
|
{
|
||||||
if (ItsMe)
|
if (!(ICanViewAgenda = (IBelongToCurrentCrs &&
|
||||||
Lay_PutContextualLink (ActSeeMyAgd,
|
HeBelongsToCurrentCrs) || // Course selected and we both belong to it
|
||||||
NULL,
|
IAmLoggedAsSysAdm)) // I am system admin
|
||||||
|
// The following slow check is made only if the previous fails
|
||||||
|
ICanViewAgenda = Usr_CheckIfUsrSharesAnyOfMyCrs (Gbl.Record.UsrDat->UsrCod);
|
||||||
|
if (ICanViewAgenda)
|
||||||
|
Lay_PutContextualLink (ActSeeUsrAgd,
|
||||||
|
Rec_PutParamUsrCodEncrypted,
|
||||||
"date64x64.gif",
|
"date64x64.gif",
|
||||||
Txt_View_agenda,NULL,
|
Txt_View_agenda,NULL,
|
||||||
NULL);
|
NULL);
|
||||||
else // Not me
|
|
||||||
{
|
|
||||||
if (!(ICanViewAgenda = (IBelongToCurrentCrs &&
|
|
||||||
HeBelongsToCurrentCrs) || // Course selected and we both belong to it
|
|
||||||
IAmLoggedAsSysAdm)) // I am system admin
|
|
||||||
// The following slow check is made only if the previous fails
|
|
||||||
ICanViewAgenda = Usr_CheckIfUsrSharesAnyOfMyCrs (Gbl.Record.UsrDat->UsrCod);
|
|
||||||
if (ICanViewAgenda)
|
|
||||||
Lay_PutContextualLink (ActSeeUsrAgd,
|
|
||||||
Rec_PutParamUsrCodEncrypted,
|
|
||||||
"date64x64.gif",
|
|
||||||
Txt_View_agenda,NULL,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Button to admin user *****/
|
/***** Button to admin user *****/
|
||||||
|
|
|
@ -694,8 +694,8 @@ static void Svy_WriteAuthor (struct Survey *Svy)
|
||||||
strcat (Surnames," ");
|
strcat (Surnames," ");
|
||||||
strcat (Surnames,UsrDat.Surname2);
|
strcat (Surnames,UsrDat.Surname2);
|
||||||
}
|
}
|
||||||
Str_LimitLengthHTMLStr (FirstName,9);
|
Str_LimitLengthHTMLStr (FirstName,8);
|
||||||
Str_LimitLengthHTMLStr (Surnames,9);
|
Str_LimitLengthHTMLStr (Surnames,8);
|
||||||
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
fprintf (Gbl.F.Out,"<span class=\"%s\">%s %s</span>",
|
||||||
Svy->Status.Visible ? "MSG_AUT" :
|
Svy->Status.Visible ? "MSG_AUT" :
|
||||||
"MSG_AUT_LIGHT",
|
"MSG_AUT_LIGHT",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user