diff --git a/css/swad_desktop.css b/css/swad_desktop.css
index 74cfe6c6e..5a51a0e28 100644
--- a/css/swad_desktop.css
+++ b/css/swad_desktop.css
@@ -285,6 +285,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.BT_SUBMIT_INLINE
{
+ min-width:180px;
color:white;
font-size:15px;
font-weight:bold;
diff --git a/css/swad_mobile.css b/css/swad_mobile.css
index b247af17f..c45745adc 100644
--- a/css/swad_mobile.css
+++ b/css/swad_mobile.css
@@ -237,6 +237,7 @@ form {margin:0; display:inline;}
}
.BT_SUBMIT_INLINE
{
+ min-width:180px;
color:white;
font-size:15px;
font-weight:bold;
diff --git a/swad_centre.c b/swad_centre.c
index 5eb456ba4..115cfe842 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -33,6 +33,7 @@
#include "swad_centre.h"
#include "swad_constant.h"
#include "swad_database.h"
+#include "swad_enrollment.h"
#include "swad_global.h"
#include "swad_institution.h"
#include "swad_logo.h"
@@ -216,6 +217,9 @@ void Ctr_SeeCtrWithPendingDegs (void)
void Ctr_ShowConfiguration (void)
{
Ctr_Configuration (false);
+
+ /***** Show help to enroll me *****/
+ Enr_HelpToEnroll ();
}
/*****************************************************************************/
@@ -513,10 +517,6 @@ void Ctr_ShowCtrsOfCurrentIns (void)
/***** Write menu to select country and institution *****/
Deg_WriteMenuAllCourses ();
- /***** Put link (form) to edit centres in current institution *****/
- if (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_)
- Lay_PutFormToEdit (ActEdiCtr);
-
/***** List centres *****/
Ctr_ListCentres ();
@@ -532,11 +532,25 @@ void Ctr_ShowCtrsOfCurrentIns (void)
static void Ctr_ListCentres (void)
{
extern const char *Txt_No_centres_have_been_created_in_this_institution;
+ extern const char *Txt_Create_centre;
+ bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
- if (Gbl.Ctrs.Num)
+ if (Gbl.Ctrs.Num) // There are centres in the current institution
+ {
+ if (ICanEdit)
+ Lay_PutFormToEdit (ActEdiCtr);
Ctr_ListCentresForSeeing ();
- else
+ }
+ else // No centres created in the current institution
+ {
Lay_ShowAlert (Lay_INFO,Txt_No_centres_have_been_created_in_this_institution);
+ if (ICanEdit)
+ {
+ fprintf (Gbl.F.Out,"
");
+ }
+ }
}
/*****************************************************************************/
@@ -673,7 +687,6 @@ static void Ctr_GetParamCtrOrderType (void)
void Ctr_EditCentres (void)
{
- extern const char *Txt_No_centres_have_been_created_in_this_institution;
extern const char *Txt_There_is_no_list_of_institutions;
extern const char *Txt_You_must_create_at_least_one_institution_before_creating_centres;
@@ -690,9 +703,6 @@ void Ctr_EditCentres (void)
if (Gbl.Ctrs.Num)
/***** Put link (form) to view centres *****/
Lay_PutFormToView (ActSeeCtr);
- else
- /***** Help message *****/
- Lay_ShowAlert (Lay_INFO,Txt_No_centres_have_been_created_in_this_institution);
/***** Put a form to create a new centre *****/
Ctr_PutFormToCreateCentre ();
diff --git a/swad_changelog.h b/swad_changelog.h
index e75350fed..d9aa85ac1 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -98,13 +98,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.8 (2015/10/04)"
+#define Log_PLATFORM_VERSION "SWAD 15.9 (2015/10/05)"
// 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 sql/swad*.sql | tail -1
/*
TODO: If photo zoom is out of the screen at left, put on right
+ Version 15.9: Oct 05, 2015 Contextual help to encourage enrollment. (185512 lines)
Version 15.8: Oct 04, 2015 Changes in file browser layout.
Folder owners are not displayed. (185022 lines)
Version 15.7.2: Oct 04, 2015 New layout in enrollment requests. (185018 lines)
diff --git a/swad_country.c b/swad_country.c
index 8a3e2db39..550218648 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -33,6 +33,7 @@
#include "swad_constant.h"
#include "swad_country.h"
#include "swad_database.h"
+#include "swad_enrollment.h"
#include "swad_global.h"
#include "swad_institution.h"
#include "swad_parameter.h"
@@ -196,6 +197,9 @@ void Cty_SeeCtyWithPendingInss (void)
void Cty_ShowConfiguration (void)
{
Cty_Configuration (false);
+
+ /***** Show help to enroll me *****/
+ Enr_HelpToEnroll ();
}
/*****************************************************************************/
diff --git a/swad_course.c b/swad_course.c
index 9c1874565..ce80a8e7f 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -119,6 +119,9 @@ void Crs_ShowIntroduction (void)
/***** Course introduction *****/
Inf_ShowInfo ();
+
+ /***** Show help to enroll me *****/
+ Enr_HelpToEnroll ();
}
/*****************************************************************************/
@@ -1006,10 +1009,6 @@ void Crs_ShowCrssOfCurrentDeg (void)
/***** Write menu to select country, institution, centre and degree *****/
Deg_WriteMenuAllCourses ();
- /***** Put link (form) to edit courses in current degree *****/
- if (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_)
- Lay_PutFormToEdit (ActEdiCrs);
-
/***** Show list of courses *****/
Crs_ListCourses ();
@@ -1216,11 +1215,25 @@ void Crs_WriteSelectorMyCourses (void)
static void Crs_ListCourses (void)
{
extern const char *Txt_No_courses_have_been_created_in_this_degree;
+ extern const char *Txt_Create_course;
+ bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
- if (Gbl.CurrentDeg.Deg.NumCourses)
+ if (Gbl.CurrentDeg.Deg.NumCourses) // There are courses in the current degree
+ {
+ if (ICanEdit)
+ Lay_PutFormToEdit (ActEdiCrs);
Crs_ListCoursesForSeeing ();
- else
+ }
+ else // No courses created in the current degree
+ {
Lay_ShowAlert (Lay_INFO,Txt_No_courses_have_been_created_in_this_degree);
+ if (ICanEdit)
+ {
+ fprintf (Gbl.F.Out,"");
+ }
+ }
}
/*****************************************************************************/
@@ -1229,14 +1242,9 @@ static void Crs_ListCourses (void)
static void Crs_EditCourses (void)
{
- extern const char *Txt_No_courses_have_been_created_in_this_degree;
-
if (Gbl.CurrentDeg.Deg.NumCourses)
/***** Put link (form) to view courses *****/
Lay_PutFormToView (ActSeeCrs);
- else
- /***** Help message *****/
- Lay_ShowAlert (Lay_INFO,Txt_No_courses_have_been_created_in_this_degree);
/***** Put a form to create or request a new course *****/
Crs_PutFormToCreateCourse ();
@@ -1856,7 +1864,8 @@ static void Crs_PutHeadCoursesForSeeing (void)
static void Crs_PutHeadCoursesForEdition (void)
{
extern const char *Txt_Code;
- extern const char *Txt_Institutional_BR_code;
+ extern const char *Txt_Institutional_code;
+ extern const char *Txt_optional;
extern const char *Txt_Degree;
extern const char *Txt_Year_OF_A_DEGREE;
extern const char *Txt_Semester_ABBREVIATION;
@@ -1873,7 +1882,7 @@ static void Crs_PutHeadCoursesForEdition (void)
"%s"
""
""
- "%s"
+ "%s (%s)"
" | "
""
"%s"
@@ -1904,7 +1913,7 @@ static void Crs_PutHeadCoursesForEdition (void)
" | "
"",
Txt_Code,
- Txt_Institutional_BR_code,
+ Txt_Institutional_code,Txt_optional,
Txt_Degree,
Txt_Year_OF_A_DEGREE,
Txt_Semester_ABBREVIATION,
@@ -2980,10 +2989,6 @@ static void Crs_PutLinkToGoToCrs (struct Course *Crs)
void Crs_ReqSelectOneOfMyCourses (void)
{
- extern const char *Txt_You_are_not_enrolled_in_any_course[Usr_NUM_SEXS];
- extern const char *Txt_You_can_search_for_courses_select_them_and_request_your_enrollment_in_them;
- extern const char *Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them;
-
/***** Search / select more courses *****/
fprintf (Gbl.F.Out,"