Version 15.201.2

This commit is contained in:
Antonio Cañas Vargas 2016-04-22 12:39:36 +02:00
parent 0a7877f41f
commit dd0e89f8a6
2 changed files with 278 additions and 240 deletions

View File

@ -137,13 +137,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.201.1 (2016-04-22)"
#define Log_PLATFORM_VERSION "SWAD 15.201.2 (2016-04-22)"
#define CSS_FILE "swad15.198.css"
#define JS_FILE "swad15.197.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 15.201.2: Apr 22, 2016 Code refactoring in record card. (200806 lines)
Version 15.201.1: Apr 22, 2016 Code refactoring in record card. (200778 lines)
Version 15.201: Apr 21, 2016 New private file zone for the teachers who belong to a course. (200768 lines)
50 changes necessary in database:

View File

@ -85,6 +85,10 @@ static void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *U
static void Rec_ShowMyCrsRecordUpdated (void);
static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks);
static void Rec_ShowPhoto (struct UsrData *UsrDat);
static void Rec_ShowCommands (struct UsrData *UsrDat,
Rec_RecordViewType_t TypeOfView,
bool PutFormLinks);
static void Rec_WriteLinkToDataProtectionClause (void);
@ -1948,18 +1952,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
{
extern const char *Usr_StringsSexDB[Usr_NUM_SEXS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Edit_my_personal_data;
extern const char *Txt_Edit;
extern const char *Txt_View_record_for_this_course;
extern const char *Txt_Admin_user;
extern const char *Txt_ID;
extern const char *Txt_Write_a_message;
extern const char *Txt_View_works;
extern const char *Txt_See_exams;
extern const char *Txt_Attendance;
extern const char *Txt_Following_unfollow;
extern const char *Txt_Unfollow;
extern const char *Txt_Follow;
extern const char *Txt_View_public_profile;
extern const char *Txt_Email;
extern const char *Txt_Sex;
@ -1987,14 +1980,10 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
char StrRecordWidth[10+1];
const char *ClassForm = "REC_DAT";
char Name[Usr_MAX_BYTES_NAME+1]; // To shorten length of FirstName, Surname1, Surname2
char PhotoURL[PATH_MAX+1];
bool ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == UsrDat->UsrCod);
bool IAmLoggedAsStudent = (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT); // My current role is student
bool IAmLoggedAsTeacher = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER); // My current role is teacher
bool IAmLoggedAsSysAdm = (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); // My current role is superuser
bool HeIsTeacherInAnyCourse = (UsrDat->Roles & (1 << Rol_TEACHER)); // He/she already is a teacher in any course
bool HeBelongsToCurrentCrs = (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ||
UsrDat->RoleInCurrentCrsDB == Rol_TEACHER);
bool CountryForm = (TypeOfView == Rec_FORM_MY_COMMON_RECORD);
bool RoleForm = (TypeOfView == Rec_FORM_SIGN_UP ||
TypeOfView == Rec_FORM_NEW_RECORD_OTHER_NEW_USR ||
@ -2053,7 +2042,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
Usr_Sex_t Sex;
Rol_Role_t Role;
Rol_Role_t DefaultRoleInCurrentCrs;
bool ShowPhoto;
unsigned NumCty;
struct Institution Ins;
struct Centre Ctr;
@ -2085,237 +2073,27 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH);
Lay_StartRoundFrameTable (StrRecordWidth,2,NULL);
/***** Institution *****/
/***** Institution and user's photo *****/
fprintf (Gbl.F.Out,"<tr>");
/* Institution */
Ins.InsCod = UsrDat->InsCod;
if (Ins.InsCod > 0)
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
Rec_ShowInstitution (&Ins,PutFormLinks);
/***** Photo *****/
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
fprintf (Gbl.F.Out,"<td rowspan=\"3\" class=\"CENTER_TOP\""
" style=\"width:%upx;\">",
Rec_C3_TOP);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO186x248",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/* User's photo */
Rec_ShowPhoto (UsrDat);
/***** Commands *****/
fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"3\" class=\"LEFT_TOP\""
" style=\"width:%upx;\">",
Rec_C1_TOP);
fprintf (Gbl.F.Out,"</tr>");
if (PutFormLinks && Gbl.Usrs.Me.Logged)
{
fprintf (Gbl.F.Out,"<div class=\"REC_SHORTCUTS\">");
/***** Commands and full name *****/
fprintf (Gbl.F.Out,"<tr>");
/***** Button to edit my record card *****/
if (ItsMe)
{
Act_FormStart (ActReqEdiRecCom);
Act_LinkFormSubmit (Txt_Edit_my_personal_data,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/edit64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Edit,Txt_Edit);
Act_FormEnd ();
}
/* Commands */
Rec_ShowCommands (UsrDat,TypeOfView,PutFormLinks);
/***** Button to view user's record card in course when:
- a course is selected && the user belongs to it &&
- I can view user's record card in course *****/
if (HeBelongsToCurrentCrs &&
(IAmLoggedAsStudent ||
IAmLoggedAsTeacher ||
IAmLoggedAsSysAdm))
{
Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActSeeRecOneStd :
ActSeeRecOneTch);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_record_for_this_course,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/card64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_View_record_for_this_course,
Txt_View_record_for_this_course);
Act_FormEnd ();
}
/***** Button to admin user *****/
if (ItsMe ||
(Gbl.CurrentCrs.Crs.CrsCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_TEACHER) ||
(Gbl.CurrentDeg.Deg.DegCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_DEG_ADM) ||
(Gbl.CurrentCtr.Ctr.CtrCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_CTR_ADM) ||
(Gbl.CurrentIns.Ins.InsCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_INS_ADM) ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
{
Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActReqMdfStd :
(UsrDat->RoleInCurrentCrsDB == Rol_TEACHER ? ActReqMdfTch :
ActReqMdfOth));
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Admin_user,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/config64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Admin_user,Txt_Admin_user);
Act_FormEnd ();
}
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // A course is selected
UsrDat->RoleInCurrentCrsDB == Rol_STUDENT && // He/she is a student in the current course
(ItsMe || IAmLoggedAsTeacher || IAmLoggedAsSysAdm)) // I can view
{
/***** Button to view user's assignments and works *****/
if (ItsMe) // I am a student
Act_FormStart (ActAdmAsgWrkUsr);
else // I am a teacher or superuser
{
Act_FormStart (ActAdmAsgWrkCrs);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
}
Grp_PutParamAllGroups ();
Par_PutHiddenParamChar ("FullTree",'Y'); // By default, show all files
Act_LinkFormSubmit (Txt_View_works,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/folder64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_View_works,Txt_View_works);
Act_FormEnd ();
/***** Button to view user's test exams *****/
if (ItsMe)
Act_FormStart (ActSeeMyTstExa);
else
{
Act_FormStart (ActSeeUsrTstExa);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
}
Grp_PutParamAllGroups ();
Act_LinkFormSubmit (Txt_See_exams,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/file64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_See_exams,Txt_See_exams);
Act_FormEnd ();
/***** Button to view user's attendance *****/
if (IAmLoggedAsStudent ||
IAmLoggedAsTeacher ||
IAmLoggedAsSysAdm)
{
if (IAmLoggedAsStudent)
// As student, I can see my attendance
Act_FormStart (ActSeeLstMyAtt);
else // IAmLoggedAsTeacher || IAmLoggedAsSysAdm
{
// As teacher, I can see attendance of the student
Act_FormStart (ActSeeLstStdAtt);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
Grp_PutParamAllGroups ();
}
Act_LinkFormSubmit (Txt_Attendance,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/rollcall64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Attendance,Txt_Attendance);
Act_FormEnd ();
}
}
/***** Button to send a message *****/
Act_FormStart (ActReqMsgUsr);
Grp_PutParamAllGroups ();
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
Act_LinkFormSubmit (Txt_Write_a_message,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/msg64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Write_a_message,Txt_Write_a_message);
Act_FormEnd ();
/***** Button to follow / unfollow *****/
if (TypeOfView == Rec_RECORD_PUBLIC &&
!ItsMe)
{
if (Fol_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,UsrDat->UsrCod)) // I follow user
{
Act_FormStart (ActUnfUsr);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Following_unfollow,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/following64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Unfollow,Txt_Following_unfollow);
Act_FormEnd ();
}
else // I do not follow user
{
Act_FormStart (ActFolUsr);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Follow,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/follow64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Follow,Txt_Follow);
Act_FormEnd ();
}
}
fprintf (Gbl.F.Out,"</div>");
}
fprintf (Gbl.F.Out,"</td>");
/***** Full name *****/
/* Full name */
fprintf (Gbl.F.Out,"<td class=\"REC_NAME LEFT_TOP\""
" style=\"width:%upx;\">",
Rec_C2_TOP);
@ -3116,6 +2894,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks)
{
/***** Institution logo *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"width:%upx; height:%upx;\">",
Rec_C1_TOP,Rec_C1_TOP);
@ -3136,8 +2915,10 @@ static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks)
Act_FormEnd ();
}
}
fprintf (Gbl.F.Out,"</td>"
"<td class=\"REC_HEAD LEFT_MIDDLE\""
fprintf (Gbl.F.Out,"</td>");
/***** Institution name *****/
fprintf (Gbl.F.Out,"<td class=\"REC_HEAD LEFT_MIDDLE\""
" style=\"width:%upx; height:%upx;\">",
Rec_C2_TOP,Rec_C1_TOP);
if (Ins->InsCod > 0)
@ -3159,6 +2940,262 @@ static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks)
fprintf (Gbl.F.Out,"</td>");
}
/*****************************************************************************/
/********************** Show user's photo in record card *********************/
/*****************************************************************************/
static void Rec_ShowPhoto (struct UsrData *UsrDat)
{
char PhotoURL[PATH_MAX+1];
bool ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
/***** User's photo *****/
fprintf (Gbl.F.Out,"<td rowspan=\"3\" class=\"CENTER_TOP\""
" style=\"width:%upx;\">",
Rec_C3_TOP);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO186x248",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>");
}
/*****************************************************************************/
/*********** Show commands (icon to make actions) in record card *************/
/*****************************************************************************/
static void Rec_ShowCommands (struct UsrData *UsrDat,
Rec_RecordViewType_t TypeOfView,
bool PutFormLinks)
{
extern const char *Txt_Edit_my_personal_data;
extern const char *Txt_Edit;
extern const char *Txt_View_record_for_this_course;
extern const char *Txt_Admin_user;
extern const char *Txt_Write_a_message;
extern const char *Txt_View_works;
extern const char *Txt_See_exams;
extern const char *Txt_Attendance;
extern const char *Txt_Following_unfollow;
extern const char *Txt_Unfollow;
extern const char *Txt_Follow;
bool ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == UsrDat->UsrCod);
bool IAmLoggedAsStudent = (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT); // My current role is student
bool IAmLoggedAsTeacher = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER); // My current role is teacher
bool IAmLoggedAsSysAdm = (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); // My current role is superuser
bool HeBelongsToCurrentCrs = (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ||
UsrDat->RoleInCurrentCrsDB == Rol_TEACHER);
fprintf (Gbl.F.Out,"<td rowspan=\"3\" class=\"LEFT_TOP\""
" style=\"width:%upx;\">",
Rec_C1_TOP);
if (PutFormLinks && Gbl.Usrs.Me.Logged)
{
fprintf (Gbl.F.Out,"<div class=\"REC_SHORTCUTS\">");
/***** Button to edit my record card *****/
if (ItsMe)
{
Act_FormStart (ActReqEdiRecCom);
Act_LinkFormSubmit (Txt_Edit_my_personal_data,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/edit64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Edit,Txt_Edit);
Act_FormEnd ();
}
/***** Button to view user's record card in course when:
- a course is selected && the user belongs to it &&
- I can view user's record card in course *****/
if (HeBelongsToCurrentCrs &&
(IAmLoggedAsStudent ||
IAmLoggedAsTeacher ||
IAmLoggedAsSysAdm))
{
Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActSeeRecOneStd :
ActSeeRecOneTch);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_record_for_this_course,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/card64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_View_record_for_this_course,
Txt_View_record_for_this_course);
Act_FormEnd ();
}
/***** Button to admin user *****/
if (ItsMe ||
(Gbl.CurrentCrs.Crs.CrsCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_TEACHER) ||
(Gbl.CurrentDeg.Deg.DegCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_DEG_ADM) ||
(Gbl.CurrentCtr.Ctr.CtrCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_CTR_ADM) ||
(Gbl.CurrentIns.Ins.InsCod > 0 && Gbl.Usrs.Me.LoggedRole == Rol_INS_ADM) ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
{
Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActReqMdfStd :
(UsrDat->RoleInCurrentCrsDB == Rol_TEACHER ? ActReqMdfTch :
ActReqMdfOth));
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Admin_user,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/config64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Admin_user,Txt_Admin_user);
Act_FormEnd ();
}
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // A course is selected
UsrDat->RoleInCurrentCrsDB == Rol_STUDENT && // He/she is a student in the current course
(ItsMe || IAmLoggedAsTeacher || IAmLoggedAsSysAdm)) // I can view
{
/***** Button to view user's assignments and works *****/
if (ItsMe) // I am a student
Act_FormStart (ActAdmAsgWrkUsr);
else // I am a teacher or superuser
{
Act_FormStart (ActAdmAsgWrkCrs);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
}
Grp_PutParamAllGroups ();
Par_PutHiddenParamChar ("FullTree",'Y'); // By default, show all files
Act_LinkFormSubmit (Txt_View_works,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/folder64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_View_works,Txt_View_works);
Act_FormEnd ();
/***** Button to view user's test exams *****/
if (ItsMe)
Act_FormStart (ActSeeMyTstExa);
else
{
Act_FormStart (ActSeeUsrTstExa);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
}
Grp_PutParamAllGroups ();
Act_LinkFormSubmit (Txt_See_exams,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/file64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_See_exams,Txt_See_exams);
Act_FormEnd ();
/***** Button to view user's attendance *****/
if (IAmLoggedAsStudent ||
IAmLoggedAsTeacher ||
IAmLoggedAsSysAdm)
{
if (IAmLoggedAsStudent)
// As student, I can see my attendance
Act_FormStart (ActSeeLstMyAtt);
else // IAmLoggedAsTeacher || IAmLoggedAsSysAdm
{
// As teacher, I can see attendance of the student
Act_FormStart (ActSeeLstStdAtt);
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
Grp_PutParamAllGroups ();
}
Act_LinkFormSubmit (Txt_Attendance,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/rollcall64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Attendance,Txt_Attendance);
Act_FormEnd ();
}
}
/***** Button to send a message *****/
Act_FormStart (ActReqMsgUsr);
Grp_PutParamAllGroups ();
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
Act_LinkFormSubmit (Txt_Write_a_message,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/msg64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Write_a_message,Txt_Write_a_message);
Act_FormEnd ();
/***** Button to follow / unfollow *****/
if (TypeOfView == Rec_RECORD_PUBLIC &&
!ItsMe)
{
if (Fol_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,UsrDat->UsrCod)) // I follow user
{
Act_FormStart (ActUnfUsr);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Following_unfollow,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/following64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Unfollow,Txt_Following_unfollow);
Act_FormEnd ();
}
else // I do not follow user
{
Act_FormStart (ActFolUsr);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_Follow,"REC_DAT_BOLD");
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\""
" style=\"display:inline;\" >"
"<img src=\"%s/follow64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />"
"</div>"
"</a>",
Gbl.Prefs.IconsURL,
Txt_Follow,Txt_Follow);
Act_FormEnd ();
}
}
fprintf (Gbl.F.Out,"</div>");
}
fprintf (Gbl.F.Out,"</td>");
}
/*****************************************************************************/
/*********************** Write a link to netiquette rules ********************/
/*****************************************************************************/