function self_unsubscribe_dialog() { $dm = new DateManager(); $id_course = get::gReq('id_course', DOTY_INT); $id_user = Docebo::user()->getIdSt(); $edition_arr = $dm->getUserDateForCourse($id_user, $id_course); $info = $dm->getCourseEdition($id_course, false, false, false, false, $edition_arr); $body = $this->render('edition_list', array('id_course' => $id_course, 'info' => $info, 'smodel' => new SubscriptionAlms()), true); $res = array('success' => true, 'header' => Lang::t('_UNSUBSCRIBE_REQUESTS', 'course'), 'body' => $body); ob_start(); $json = new Services_JSON(); echo $json->encode($res); }