From e5f8003c924b373eb6c68ced21aa74787830b5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 2 Mar 2015 19:06:43 +0100 Subject: [PATCH] Version 14.76 --- swad_changelog.h | 3 ++- swad_record.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/swad_changelog.h b/swad_changelog.h index abe0a485c..83ac5d8be 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.75.2 (2015/03/02)" +#define Log_PLATFORM_VERSION "SWAD 14.76 (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: 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) Version 14.75: Feb 27, 2015 Fixed bug when getting user's IDs from marks tables. (178172 lines) diff --git a/swad_record.c b/swad_record.c index 311cce81c..cad7b4e19 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1990,6 +1990,7 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView, extern const char *Txt_ID; extern const char *Txt_Nickname; extern const char *Txt_Write_a_message_to_X; + extern const char *Txt_View_works; extern const char *Txt_Email; extern const char *Txt_Sex; extern const char *Txt_Role; @@ -2198,6 +2199,25 @@ 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 + { + /***** Button to view user's assignments and works *****/ + Act_FormStart (ActAdmAsgWrkCrs); + 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,"
" + "\"%s\"" + "
" + "" + "", + Gbl.Prefs.IconsURL, + Txt_View_works); + } + /***** Full name *****/ fprintf (Gbl.F.Out,"" "