Pārlūkot izejas kodu

Fixing previous commit see #3898

Julio Montoya 12 gadi atpakaļ
vecāks
revīzija
d59c0c1f62
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      main/inc/lib/userportal.lib.php

+ 5 - 3
main/inc/lib/userportal.lib.php

@@ -1066,7 +1066,8 @@ class IndexManager {
     /** 
      * Shows a welcome message when the user doesn't have any content in the course list 
      */
-    function return_welcome_to_course_block() {
+    function return_welcome_to_course_block() {  	    
+        $count_courses = CourseManager::count_courses();        
         $tpl = $this->tpl->get_template('layout/welcome_to_course.tpl');
         
         $course_catalog_url = api_get_path(WEB_CODE_PATH).'auth/courses.php';
@@ -1076,11 +1077,12 @@ class IndexManager {
         $this->tpl->assign('course_list_url', $course_list_url);
         $this->tpl->assign('course_catalog_link', Display::url(get_lang('here'), $course_catalog_url));
         $this->tpl->assign('course_list_link', Display::url(get_lang('here'), $course_list_url));
-        
+        $this->tpl->assign('count_courses', $count_courses);
+  
         return $this->tpl->fetch($tpl);
     }
 
 	function return_hot_courses() {
 		return CourseManager::return_hot_courses();		
 	}
-}
+}