original_string: public function frontpage_combo_list() {
          global $CFG;
          // TODO MDL-10965 improve.
          $tree = core_course_category::top();
          if (!$tree->get_children_count()) {
              return '';
          }
          $chelper = new coursecat_helper();
          $chelper->set_subcat_depth($CFG->maxcategorydepth)->
              set_categories_display_options(array(
                  'limit' => $CFG->coursesperpage,
                  'viewmoreurl' => new moodle_url('/course/index.php',
                          array('browse' => 'categories', 'page' => 1))
              ))->
              set_courses_display_options(array(
                  'limit' => $CFG->coursesperpage,
                  'viewmoreurl' => new moodle_url('/course/index.php',
                          array('browse' => 'courses', 'page' => 1))
              ))->
              set_attributes(array('class' => 'frontpage-category-combo'));
          return $this->coursecat_tree($chelper, $tree);
      }
code: public function frontpage_combo_list() {
          global $CFG;
          // TODO MDL-10965 improve.
          $tree = core_course_category::top();
          if (!$tree->get_children_count()) {
              return '';
          }
          $chelper = new coursecat_helper();
          $chelper->set_subcat_depth($CFG->maxcategorydepth)->
              set_categories_display_options(array(
                  'limit' => $CFG->coursesperpage,
                  'viewmoreurl' => new moodle_url('/course/index.php',
                          array('browse' => 'categories', 'page' => 1))
              ))->
              set_courses_display_options(array(
                  'limit' => $CFG->coursesperpage,
                  'viewmoreurl' => new moodle_url('/course/index.php',
                          array('browse' => 'courses', 'page' => 1))
              ))->
              set_attributes(array('class' => 'frontpage-category-combo'));
          return $this->coursecat_tree($chelper, $tree);
      }
code_tokens: public function frontpage_combo_list ( ) { global $ CFG ; // TODO MDL-10965 improve. $ tree = core_course_category :: top ( ) ; if ( ! $ tree -> get_children_count ( ) ) { return '' ; } $ chelper = new coursecat_helper ( ) ; $ chelper -> set_subcat_depth ( $ CFG -> maxcategorydepth ) -> set_categories_display_options ( array ( 'limit' => $ CFG -> coursesperpage , 'viewmoreurl' => new moodle_url ( '/course/index.php' , array ( 'browse' => 'categories' , 'page' => 1 ) ) ) ) -> set_courses_display_options ( array ( 'limit' => $ CFG -> coursesperpage , 'viewmoreurl' => new moodle_url ( '/course/index.php' , array ( 'browse' => 'courses' , 'page' => 1 ) ) ) ) -> set_attributes ( array ( 'class' => 'frontpage-category-combo' ) ) ; return $ this -> coursecat_tree ( $ chelper , $ tree ) ; }
docstring: Returns HTML to print tree with course categories and courses for the frontpage
  
  @return string
docstring_tokens: Returns HTML to print tree with course categories and courses for the frontpage