Version 14.55.3

This commit is contained in:
Antonio Cañas Vargas 2015-01-16 12:11:27 +01:00
parent 8ec7f5334f
commit ca1b12e684
5 changed files with 34 additions and 3 deletions

BIN
icon/signup16x16.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

View File

@ -39,11 +39,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.55.2 (2015/01/15)"
#define Log_PLATFORM_VERSION "SWAD 14.55.3 (2015/01/16)"
// 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.55.3: Jan 16, 2015 Link in course information to request registration in course.
Fixed bugs in enrollment. (173570 lines)
Version 14.55.2: Jan 15, 2015 Logo of centre, degree, institution or country in title. (173546 lines)
Version 14.55.1: Jan 14, 2015 Fixed bug in user's photo. (173510 lines)
Version 14.55 : Jan 14, 2015 New option to upload logo of a centre. (173509 lines)

View File

@ -180,10 +180,17 @@ static void Crs_Configuration (bool PrintView)
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
}
/* Link to print view */
/***** Links to print view and request enrollment *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/* Link to print view */
Lay_PutLinkToPrintView1 (ActPrnCrsInf);
Lay_PutLinkToPrintView2 ();
/* Link to request enrollment in the current course */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_GUEST)
Enr_PutLinkToRequestSignUp ();
fprintf (Gbl.F.Out,"</div>");
/* Start form */

View File

@ -121,6 +121,22 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *
static void Enr_AskIfRemAdmFromDeg (bool ItsMe);
static void Enr_EffectivelyRemAdmFromDeg (struct UsrData *UsrDat);
/*****************************************************************************/
/************ Show form to request sign up in the current course *************/
/*****************************************************************************/
void Enr_PutLinkToRequestSignUp (void)
{
extern const char *The_ClassFormul[The_NUM_THEMES];
extern const char *Txt_Sign_up;
/***** Show the form *****/
Act_FormStart (ActReqSignUp);
Act_LinkFormSubmit (Txt_Sign_up,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("signup",Txt_Sign_up,Txt_Sign_up);
fprintf (Gbl.F.Out,"</form>");
}
/*****************************************************************************/
/***************** Modify the role of a user in a course *********************/
/*****************************************************************************/
@ -2682,7 +2698,11 @@ static void Enr_ShowFormToEditOtherUsr (void)
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
{
if (ItsMe)
Grp_ShowLstGrpsToChgMyGrps ((Gbl.Usrs.Me.LoggedRole == Rol_ROLE_STUDENT));
{
// Don't show groups if I don't belong to course
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
Grp_ShowLstGrpsToChgMyGrps ((Gbl.Usrs.Me.LoggedRole == Rol_ROLE_STUDENT));
}
else
Grp_ShowLstGrpsToChgOtherUsrsGrps (Gbl.Usrs.Other.UsrDat.UsrCod);
}

View File

@ -63,6 +63,8 @@ typedef enum
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void Enr_PutLinkToRequestSignUp (void);
void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,
Rol_Role_t NewRole,
Cns_QuietOrVerbose_t QuietOrVerbose);