public function courseUpdates() { $emodel = new ElearningLms(); $cp_courses = $emodel->getUserCoursePathCourses((int) $this->id_user); $re = $this->db->query("SELECT c.course_type, cu.status, COUNT(*) as count " . " FROM %lms_course AS c " . " JOIN %lms_courseuser AS cu ON (c.idCourse = cu.idCourse) " . " WHERE cu.idUser = "******" " . (!empty($cp_courses) ? " AND (cu.idCourse NOT IN (" . implode(",", $cp_courses) . ") OR cu.status = " . _CUS_END . ") " : "") . " GROUP BY c.course_type, cu.status"); $result = array(); while ($o = $this->db->fetch_obj($re)) { $result[$o->course_type][$o->status] = $o->count; } return $result; }
<div style="margin:1em;"> <?php $w = $this->widget('lms_tab', array('active' => 'elearning', 'close' => false)); // draw search $_model = new ElearningLms(); $_auxiliary = Form::getInputDropdown('', 'course_search_filter_year', 'filter_year', $_model->getFilterYears(Docebo::user()->getIdst()), 0, ''); $this->widget('tablefilter', array('id' => 'course_search', 'filter_text' => "", 'auxiliary_filter' => Lang::t('_SEARCH', 'standard') . ": " . $_auxiliary, 'js_callback_set' => 'course_search_callback_set', 'js_callback_reset' => 'course_search_callback_reset', 'css_class' => 'tabs_filter')); $w->endWidget(); ?> </div> <?php $prop = array('id' => 'self_unsubscribe_dialog', 'dynamicContent' => true, 'ajaxUrl' => 'this.href', 'dynamicAjaxUrl' => true, 'callEvents' => array()); $this->widget('dialog', $prop); ?> <script type="text/javascript"> var tabView = new YAHOO.widget.TabView(); function unsubscribeClick() { var nodes = YAHOO.util.Selector.query('a[id^=self_unsubscribe_link_]'); YAHOO.util.Event.on(nodes, 'click', function (e) { YAHOO.util.Event.preventDefault(e); CreateDialog("self_unsubscribe_dialog", { width: "700px", modal: true, close: true, visible: false, fixedcenter: false, constraintoviewport: false, draggable: true,
/** * This implies the skill gap analysis :| well, a first implementation will be done based on * required over acquired skill and proposing courses that will give, the required competences. * If this implementation will require too much time i will wait for more information and pospone the implementation */ public function suggested() { $competence_needed = Docebo::user()->requiredCompetences(); $model = new ElearningLms(); $courselist = $model->findAll(array('cu.iduser = :id_user', 'comp.id_competence IN (:competence_list)'), array(':id_user' => Docebo::user()->getId(), ':competence_list' => $competence_needed), array('LEFT JOIN %lms_competence AS comp ON ( .... ) ')); $this->render('courselist', array('path_course' => $this->path_course, 'courselist' => $courselist)); }