");
-
- /***** Button to edit my record card *****/
- if (ItsMe)
- {
- Act_FormStart (ActReqEdiRecCom);
- Act_LinkFormSubmit (Txt_Edit_my_personal_data,NULL);
- fprintf (Gbl.F.Out,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- 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,"
"
- "
"
- "
"
- "",
- Gbl.Prefs.IconsURL,
- Txt_Follow,Txt_Follow);
- Act_FormEnd ();
- }
- }
-
- fprintf (Gbl.F.Out,"
");
- }
- fprintf (Gbl.F.Out,"