diff --git a/icon/signup16x16.gif b/icon/signup16x16.gif
new file mode 100644
index 000000000..bcfdc5a58
Binary files /dev/null and b/icon/signup16x16.gif differ
diff --git a/swad_changelog.h b/swad_changelog.h
index 201c04f9d..49b120c3b 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -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)
diff --git a/swad_course.c b/swad_course.c
index d00efbd6b..c0aba5d64 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -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,"
");
+
+ /* 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,"
");
/* Start form */
diff --git a/swad_enrollment.c b/swad_enrollment.c
index 84c565798..28dc4ec72 100644
--- a/swad_enrollment.c
+++ b/swad_enrollment.c
@@ -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,"");
+ }
+
/*****************************************************************************/
/***************** 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);
}
diff --git a/swad_enrollment.h b/swad_enrollment.h
index 29a14a9b4..2817b618d 100644
--- a/swad_enrollment.h
+++ b/swad_enrollment.h
@@ -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);