public function path()
 {
     //Get all info for the course this resource is in
     $course = DataManager::getCourse($this->row->course);
     $path = $this->getCategoryPath($course->category);
     if (function_exists('\\course_get_icon')) {
         $courseIcon = \course_get_icon($course->id);
     } else {
         $courseIcon = false;
     }
     $path[] = array('title' => 'Course', 'name' => $course->fullname, 'url' => new moodle_url('/course/view.php', array('id' => $course->id)), 'icon' => !empty($courseIcon) ? 'fa fa-' . $courseIcon : 'fa fa-archive');
     //Get all info for the course section this resource is in
     $section = DataManager::getResourceSection($this->tableName, $this->row->id);
     if ($section->name) {
         $path[] = array('title' => 'Section', 'name' => $section->name, 'url' => new moodle_url('/course/view.php', array('id' => $course->id, 'sectionid' => $section->id)), 'icon' => 'fa fa-th');
     }
     return $path;
 }
 public function path()
 {
     //Get all info for the course this resource is in
     $course = DataManager::getCourse($this->row->courseid);
     $path = $this->getCategoryPath($course->category);
     if (function_exists('\\course_get_icon')) {
         $courseIcon = \course_get_icon($course->id);
     } else {
         $courseIcon = false;
     }
     $path[] = array('title' => 'Course', 'name' => $course->fullname, 'url' => new moodle_url('/course/view.php', array('id' => $course->id)), 'icon' => !empty($courseIcon) ? 'fa fa-' . $courseIcon : 'fa fa-archive');
     //Get all info for the course section this resource is in
     $section = DataManager::getResoureSectionFromCourseModuleID($this->row->moduleid);
     if ($section->name) {
         $path[] = array('title' => 'Section', 'name' => $section->name, 'url' => new moodle_url('/course/view.php', array('id' => $course->id, 'sectionid' => $section->id)), 'icon' => 'fa fa-th');
     }
     $path[] = array('title' => 'Folder', 'name' => $this->row->foldername, 'url' => new moodle_url('/mod/folder/view.php', array('id' => $this->row->folderid)), 'icon' => 'fa fa-folder');
     foreach (explode('/', $this->row->filepath) as $folder) {
         if ($folder) {
             $path[] = array('title' => 'Folder', 'name' => $folder, 'url' => $this->url(), 'icon' => 'fa fa-folder');
         }
     }
     return $path;
 }