diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php
index 85db989e5b..7ac0f5e489 100644
--- a/main/inc/lib/course.lib.php
+++ b/main/inc/lib/course.lib.php
@@ -3781,7 +3781,7 @@ class CourseManager {
* @param int Access URL ID (optional)
* @return int Number of courses
*/
- public static function count_courses($access_url_id=null) {
+ public static function count_courses($access_url_id = null) {
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$table_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$sql = "SELECT count(id) FROM $table_course c";
diff --git a/main/template/default/layout/welcome_to_course.tpl b/main/template/default/layout/welcome_to_course.tpl
index 253e634b86..4fe478ac5e 100644
--- a/main/template/default/layout/welcome_to_course.tpl
+++ b/main/template/default/layout/welcome_to_course.tpl
@@ -1,12 +1,18 @@
{{ "HelloXAsYouCanSeeYourCourseListIsEmpty"|get_lang | format(_u.complete_name) }}
-{% if "allow_students_to_browse_courses"|get_setting == 'true' %}
-
- {{ "GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX"|get_lang|format(course_catalog_link, course_list_link) }}
-
-
- {{ "CourseCatalog"|get_lang }}
-
-{% else %}
+{% if count_courses == 0 %}
{{ "PleaseAllowUsALittleTimeToSubscribeYouToOneOfOurCourses"|get_lang }}
+{% else %}
+
+ {% if "allow_students_to_browse_courses"|get_setting == 'true' %}
+
+ {{ "GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX"|get_lang|format(course_catalog_link, course_list_link) }}
+
+
+ {{ "CourseCatalog"|get_lang }}
+
+ {% else %}
+ {{ "PleaseAllowUsALittleTimeToSubscribeYouToOneOfOurCourses"|get_lang }}
+ {% endif %}
+
{% endif %}
\ No newline at end of file