diff --git a/swad_action.c b/swad_action.c
index cb9a3de69..3056967cf 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -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" },
/* 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" },
-// /* 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
+ /* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.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" },
/* ActEdiPrf */{ 673, 7,TabPrf,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Pre_EditPrefs ,"heart64x64.gif" },
diff --git a/swad_agenda.c b/swad_agenda.c
index 558f5e104..8e0d7ced8 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -173,7 +173,7 @@ void Agd_ShowMyPublicAgenda (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_User_not_found_or_you_do_not_have_permission_;
bool ItsMe;
@@ -187,7 +187,7 @@ void Agd_ShowUsrAgenda (void)
Lay_StartRoundFrame ("100%",Gbl.Title,
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
NULL,
- Hlp_USERS_Teachers_agenda);
+ Hlp_PROFILE_Agenda_public_agenda);
/***** Show the current events in the user's agenda *****/
Agd_ShowEventsToday (Agd_OTHER_PUBLIC_AGENDA_TODAY);
@@ -208,7 +208,7 @@ void Agd_ShowUsrAgenda (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 char *Txt_Public_agenda_USER;
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,
ItsMe ? Agd_PutIconToViewEditMyFullAgenda :
NULL,
- Hlp_USERS_Teachers_agenda);
+ Hlp_PROFILE_Agenda_public_agenda);
/***** Show the current events in the user's agenda *****/
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)
{
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_Public_agenda_USER;
extern const char *Txt_My_agenda;
@@ -356,7 +356,7 @@ static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType)
case Agd_OTHER_PUBLIC_AGENDA_TODAY:
Lay_StartRoundFrameTableShadow (NULL,Txt_Today,
NULL,
- Hlp_USERS_Teachers_agenda,
+ Hlp_PROFILE_Agenda_public_agenda,
2);
break;
default:
@@ -685,8 +685,8 @@ static void Agd_WriteEventAuthor (struct AgendaEvent *AgdEvent)
strcat (Surnames," ");
strcat (Surnames,UsrDat.Surname2);
}
- Str_LimitLengthHTMLStr (FirstName,9);
- Str_LimitLengthHTMLStr (Surnames,9);
+ Str_LimitLengthHTMLStr (FirstName,8);
+ Str_LimitLengthHTMLStr (Surnames,8);
fprintf (Gbl.F.Out,"%s %s",
AgdEvent->Hidden ? "MSG_AUT_LIGHT" :
"MSG_AUT",
diff --git a/swad_assignment.c b/swad_assignment.c
index 3acc8bc92..58fbbac4b 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -456,8 +456,8 @@ static void Asg_WriteAsgAuthor (struct Assignment *Asg)
strcat (Surnames," ");
strcat (Surnames,UsrDat.Surname2);
}
- Str_LimitLengthHTMLStr (FirstName,9);
- Str_LimitLengthHTMLStr (Surnames,9);
+ Str_LimitLengthHTMLStr (FirstName,8);
+ Str_LimitLengthHTMLStr (Surnames,8);
fprintf (Gbl.F.Out,"%s %s",
Asg->Hidden ? "MSG_AUT_LIGHT" :
"MSG_AUT",
diff --git a/swad_attendance.c b/swad_attendance.c
index e961ff3a7..4436f88f2 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -494,8 +494,8 @@ static void Att_WriteAttEventAuthor (struct AttendanceEvent *Att)
strcat (Surnames," ");
strcat (Surnames,UsrDat.Surname2);
}
- Str_LimitLengthHTMLStr (FirstName,9);
- Str_LimitLengthHTMLStr (Surnames,9);
+ Str_LimitLengthHTMLStr (FirstName,8);
+ Str_LimitLengthHTMLStr (Surnames,8);
fprintf (Gbl.F.Out,"%s %s",
Att->Hidden ? "MSG_AUT_LIGHT" :
"MSG_AUT",
diff --git a/swad_changelog.h b/swad_changelog.h
index bb699f19f..a7841ddf2 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -185,13 +185,15 @@
/****************************** 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 JS_FILE "swad16.90.2.js"
// 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
/*
+ 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: Dec 07, 2016 Changes in QR codes. (210204 lines)
Version 16.90.3: Dec 06, 2016 Changes related with agenda QR. (210156 lines)
diff --git a/swad_help.c b/swad_help.c
index ade3fdafd..00acc9e78 100644
--- a/swad_help.c
+++ b/swad_help.c
@@ -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_shared_record_card = WIKI "USERS.Teachers#shared-record-card";
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";
@@ -228,9 +227,10 @@ const char *Hlp_PROFILE_Courses = WIKI "PROFILE.Courses";
const char *Hlp_PROFILE_Timetable = WIKI "PROFILE.Timetable";
-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_edit_event = WIKI "PROFILE.Agenda#edit-event";
+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_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_Institution = WIKI "PROFILE.Institution";
diff --git a/swad_record.c b/swad_record.c
index 660f08c10..def9504e6 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -2322,7 +2322,6 @@ static void Rec_PutIconsCommands (void)
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER);
bool HeBelongsToCurrentCrs = (Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ||
Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_TEACHER);
- bool HeIsATeacherInAnyCrs = (Gbl.Record.UsrDat->Roles & (1 << Rol_TEACHER));
bool ICanViewAgenda;
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,
NULL);
- /***** Button to view teacher's agenda when:
- - he/she is a teacher and I share any course with him/her *****/
-// if (HeIsATeacherInAnyCrs)
- if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM && // TODO: Remove when debugged
- HeIsATeacherInAnyCrs)
+ /***** Button to view user's agenda
+ when I share any course with him/her *****/
+ if (ItsMe)
+ Lay_PutContextualLink (ActSeeMyAgd,
+ NULL,
+ "date64x64.gif",
+ Txt_View_agenda,NULL,
+ NULL);
+ else // Not me
{
- if (ItsMe)
- Lay_PutContextualLink (ActSeeMyAgd,
- NULL,
+ 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);
- 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 *****/
diff --git a/swad_survey.c b/swad_survey.c
index 6b080e9e5..d8f04f83f 100644
--- a/swad_survey.c
+++ b/swad_survey.c
@@ -694,8 +694,8 @@ static void Svy_WriteAuthor (struct Survey *Svy)
strcat (Surnames," ");
strcat (Surnames,UsrDat.Surname2);
}
- Str_LimitLengthHTMLStr (FirstName,9);
- Str_LimitLengthHTMLStr (Surnames,9);
+ Str_LimitLengthHTMLStr (FirstName,8);
+ Str_LimitLengthHTMLStr (Surnames,8);
fprintf (Gbl.F.Out,"%s %s",
Svy->Status.Visible ? "MSG_AUT" :
"MSG_AUT_LIGHT",