Version 14.76.1

This commit is contained in:
Antonio Cañas Vargas 2015-03-02 19:53:19 +01:00
parent e5f8003c92
commit 32e5b7f41e
2 changed files with 39 additions and 8 deletions

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.76 (2015/03/02)"
#define Log_PLATFORM_VERSION "SWAD 14.76.1 (2015/03/02)"
// 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 | tail -1
/*
Version 14.76.1: Mar 02, 2015 Button in student record to view student's test exams. (178225 lines)
Version 14.76: Mar 02, 2015 Button in student record to view student's works. (178197 lines)
Version 14.75.2: Mar 02, 2015 New icon for new notifications. (178176 lines)
Version 14.75.1: Mar 02, 2015 Fixed bug in file browser, reported by Germán Luzón González and Javier Fernández Baldomero. (178175 lines)

View File

@ -1991,6 +1991,7 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
extern const char *Txt_Nickname;
extern const char *Txt_Write_a_message_to_X;
extern const char *Txt_View_works;
extern const char *Txt_See_exams;
extern const char *Txt_Email;
extern const char *Txt_Sex;
extern const char *Txt_Role;
@ -2163,6 +2164,8 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
" text-align:center; vertical-align:top;\">",
Rec_INSTITUTION_LOGO_SIZE + 8);
fprintf (Gbl.F.Out,"<div style=\"margin:9px 0;\"");
/***** Button to admin user *****/
if ((TypeOfView == Rec_RECORD_LIST ||
TypeOfView == Rec_OTHER_USR_SHARE_RECORD_CHECK) &&
@ -2173,7 +2176,7 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
Act_LinkFormSubmit (Txt_Admin_user,NULL);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\" style=\"display:inline;\" >"
"<img src=\"%s/config16x16.gif\""
" style=\"width:16px;height:16px;margin:6px 3px;\" alt=\"%s\" />"
" style=\"width:16px;height:16px;margin:0 3px;\" alt=\"%s\" />"
"</div>"
"</a>"
"</form>",
@ -2191,7 +2194,7 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
Act_LinkFormSubmit (Gbl.Title,ClassData);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\" style=\"display:inline;\" >"
"<img src=\"%s/msg16x16.gif\""
" style=\"width:16px;height:16px;margin:6px 3px;\" alt=\"%s\" />"
" style=\"width:16px;height:16px;margin:0 3px;\" alt=\"%s\" />"
"</div>"
"</a>"
"</form>",
@ -2199,25 +2202,52 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
Gbl.Title);
}
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
UsrDat->RoleInCurrentCrsDB == Rol_ROLE_STUDENT) // He/she is a student in the current course
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
UsrDat->RoleInCurrentCrsDB == Rol_ROLE_STUDENT && // He/she is a student in the current course
(ItsMe || IAmTeacher || IAmSuperuser)) // I can view
{
/***** Button to view user's assignments and works *****/
Act_FormStart (ActAdmAsgWrkCrs);
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
Par_PutHiddenParamString ("UsrCodStd",UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_works,ClassData);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\" style=\"display:inline;\" >"
"<img src=\"%s/folder16x16.gif\""
" style=\"width:16px;height:16px;margin:6px 3px;\" alt=\"%s\" />"
" style=\"width:16px;height:16px;margin:0 3px;\" alt=\"%s\" />"
"</div>"
"</a>"
"</form>",
Gbl.Prefs.IconsURL,
Txt_View_works);
/***** 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,ClassData);
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\" style=\"display:inline;\" >"
"<img src=\"%s/file16x16.gif\""
" style=\"width:16px;height:16px;margin:0 3px;\" alt=\"%s\" />"
"</div>"
"</a>"
"</form>",
Gbl.Prefs.IconsURL,
Txt_See_exams);
}
fprintf (Gbl.F.Out,"</div>");
/***** Full name *****/
fprintf (Gbl.F.Out,"</td>"
"<td class=\"HEAD_REC_BIG\" style=\"text-align:left;"