function assignVar()
 {
     $this->id = importVar("id");
     $this->calEventClass = importVar("calEventClass");
     $this->start_year = importVar("start_year");
     $this->start_month = importVar("start_month");
     $this->start_day = importVar("start_day");
     $this->_year = $this->start_year;
     $this->_month = $this->start_month;
     $this->_day = $this->start_day;
     $this->start_hour = importVar("start_hour");
     $this->start_min = importVar("start_min");
     $this->start_sec = importVar("start_sec");
     $this->end_year = importVar("end_year");
     $this->end_month = importVar("end_month");
     $this->end_day = importVar("end_day");
     $this->end_hour = importVar("end_hour");
     $this->end_min = importVar("end_min");
     $this->end_sec = importVar("end_sec");
     $this->title = importVar("title");
     $this->description = importVar("description");
     $this->_owner = importVar("_owner");
     if (!$this->_owner) {
         $this->_owner == Docebo::user()->getIdSt();
     }
     $this->category = importVar("category");
     $this->private = importVar("private");
     $this->idCourse = $_SESSION["idCourse"];
 }
Example #2
0
function edithtml()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.form.php';
    $query = "\r\n\tSELECT textof\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
    $re_htmlfront = sql_query($query);
    $error = false;
    if (isset($_POST['save'])) {
        if (mysql_num_rows($re_htmlfront) > 0) {
            $upd_query = "\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\t\t\tSET textof = '" . $_POST['description'] . "'\r\n\t\t\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
            $re = sql_query($upd_query);
        } else {
            $ins_query = "\r\n\t\t\tINSERT INTO " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\t\t\t( id_course, textof) VALUES \r\n\t\t\t( \t'" . $_SESSION['idCourse'] . "',\r\n\t\t\t\t'" . $_POST['description'] . "' )";
            $re = sql_query($ins_query);
        }
        if ($re) {
            Util::jump_to('index.php?modname=htmlfront&op=showhtml&saveok=1');
        } else {
            $error = true;
        }
    }
    $lang =& DoceboLanguage::createInstance('htmlfront', 'lms');
    list($textof) = sql_fetch_row($re_htmlfront);
    $title_page = array('index.php?modname=htmlfront&op=showhtml' => $lang->def('_HTMLFRONT'), $lang->def('_MOD'));
    $GLOBALS['page']->add(getTitleArea($title_page, 'htmlfront') . '<div class="std_block">' . getBackUi('index.php?modname=htmlfront&amp;op=showhtml', $lang->def('_BACK')) . ($error ? getErrorUi($lang->def('_ERROR_IN_SAVE')) : '') . Form::openForm('formnotes', 'index.php?modname=htmlfront&amp;op=edithtml') . Form::openElementSpace() . Form::getTextarea($lang->def('_TEXTOF'), 'description', 'description', importVar('description', false, $textof)) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save', 'save', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
}
Example #3
0
 function getOp()
 {
     $res = "main";
     $op = importVar("sel_op");
     $manual = $this->onManualSelector();
     if ($manual) {
         $res = isset($_GET["stayon"]) ? "manual" : "manual_init";
     }
     if (isset($_POST["orgchartselector"])) {
         $res = 'orgchartselector';
     }
     if (isset($_POST['okselector_org'])) {
         return 'save_org';
     }
     if (isset($_POST["okselector"]) && !$manual) {
         $res = "save";
     } else {
         if (isset($_POST["okselector"]) && $manual) {
             $res = "save_manual";
         } else {
             if (isset($_POST["cancelselector"]) && !$manual) {
                 Util::jump_to($this->getLink("back", "", true));
             } else {
                 if (isset($_POST["cancelselector"]) && $manual) {
                     Util::jump_to($this->getLink("main", "", true));
                 }
             }
         }
     }
     return $res;
 }
Example #4
0
function setRoom(&$out, &$lang)
{
    $ri = importVar("ri");
    if ($ri > 0) {
        $_SESSION["chat_room_id"] = $ri;
    }
}
Example #5
0
function drawCalendar()
{
    checkPerm('view');
    $size = importVar('size', false, 'max');
    $width = "90%";
    if ($size == "min") {
        $width = "200px";
    }
    addCss('calendar_' . $size);
    YuiLib::load('base,dragdrop');
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
    //permissions = permissions granted to the logged user according to his/her level and role
    //	2 => can create/delete/modify all events
    //	1 => can create/delete/modify only own events
    //	0 => can view only
    $permissions = 0;
    if (checkPerm('mod', true)) {
        $permissions = 2;
    } elseif (checkPerm('personal', true)) {
        $permissions = 1;
    }
    //mode="edit" => events can be added and edited according to given permissions
    //mode="view" => events can only be viewed regardless the permissions
    $GLOBALS['page']->add('<script type="text/javascript">' . '	setup_cal(	null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
    $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
Example #6
0
function select_permission()
{
    checkPerm('view');
    require_once $GLOBALS['where_lms'] . '/lib/lib.middlearea.php';
    require_once _base_ . '/lib/lib.userselector.php';
    require_once _base_ . '/lib/lib.form.php';
    $lang =& DoceboLanguage::createInstance('middlearea', 'lms');
    $obj_index = importVar('obj_index', false, '');
    // first step load selector
    $man_ma = new Man_MiddleArea();
    $acl_manager = new DoceboACLManager();
    $user_select = new UserSelector();
    $user_select->show_user_selector = TRUE;
    $user_select->show_group_selector = TRUE;
    $user_select->show_orgchart_selector = TRUE;
    $user_select->show_orgchart_simple_selector = false;
    //$user_select->multi_choice = TRUE;
    // try to load previous saved
    if (isset($_GET['load'])) {
        $selected = $man_ma->getObjIdstList($obj_index);
        if (is_array($selected)) {
            $user_select->resetSelection($selected);
        }
    }
    if (isset($_POST['okselector'])) {
        $selected = $user_select->getSelection($_POST);
        $re = $man_ma->setObjIdstList($obj_index, $selected);
        Util::jump_to('index.php?modname=middlearea&amp;op=view_area&amp;result=' . ($re ? 'ok' : 'err'));
    }
    cout(getTitleArea(array('index.php?modname=middlearea&amp;op=view_area' => $lang->def('_MIDDLE_AREA'), Lang::t('_VIEW_PERMISSION', 'standard')), 'middlearea') . '<div class="std_block">');
    $user_select->addFormInfo(Form::getHidden('obj_index', 'obj_index', $obj_index));
    $user_select->loadSelector('index.php?modname=middlearea&amp;op=select_permission', false, false, true);
    cout('</div>');
}
Example #7
0
    function notes()
    {
        checkPerm('view');
        require_once _base_ . '/lib/lib.table.php';
        $lang =& DoceboLanguage::createInstance('notes', 'lms');
        $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
        $ini = $nav_bar->getSelectedElement();
        $ord = importVar('ord');
        $inv = importVar('inv');
        switch ($ord) {
            case "tit":
                $ord = $order = 'title';
                if ($inv != 'y') {
                    $a_down = '&amp;inv=y';
                } else {
                    $order .= ' DESC';
                    $a_down = '';
                }
                break;
            default:
                $ord = $order = 'data';
                if ($inv == 'y') {
                    $a_down = '';
                } else {
                    $order .= ' DESC';
                    $a_down = '&amp;inv=y';
                }
        }
        $reNotes = sql_query("\r\n\tSELECT idNotes, data, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' \r\n\tORDER BY {$order} \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
        list($num_notes) = sql_fetch_row(sql_query("SELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' "));
        $nav_bar->setElementTotal($num_notes);
        $img_up = '<img class="valing-middle" src="' . getPathImage() . 'standard/up_arrow.png" alt="' . $lang->def('_UP') . '"/>';
        $img_down = '<img class="valing-middle" src="' . getPathImage() . 'standard/down_arrow.png" alt="' . $lang->def('_DOWN') . '"/>';
        $tb = new Table(Get::sett('visuItem'), $lang->def('_NOTES'), $lang->def('_NOTES'));
        $contentH = array(($ord == 'data' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes' . $a_down . '"> ' . $lang->def('_DATE') . '</a>', ($ord == 'title' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes&amp;ord=tit' . $a_down . '">' . $lang->def('_TITLE') . '</a>', '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
        $typeH = array('min-cell', '', 'image', 'image');
        $tb->setColsStyle($typeH);
        $tb->addHead($contentH);
        while (list($idNotes, $data, $title) = sql_fetch_row($reNotes)) {
            $content = array(Format::date($data), '<a href="index.php?modname=notes&amp;op=displaynotes&amp;idNotes=' . $idNotes . '" title="' . $lang->def('_MORET') . '">' . $title . '</a>', '<a href="index.php?modname=notes&amp;op=modnotes&amp;idNotes=' . $idNotes . '">
				<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" /></a>', '<a id="delnotes_' . $idNotes . '"' . ' href="index.php?modname=notes&amp;op=delnotes&amp;idNotes=' . $idNotes . '"' . ' title="' . $lang->def('_TITLE') . ' : ' . strip_tags(str_replace(array('"', "'"), '', $title)) . '">
				<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
            $tb->addBody($content);
        }
        $tb->addActionAdd('<a href="index.php?modname=notes&amp;op=addnotes">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD_NOTES') . '</a>');
        $GLOBALS['page']->add(getTitleArea(array($lang->def('_NOTES')), 'notes') . '<div class="std_block">', 'content');
        if (isset($_POST['result'])) {
            switch ($_POST['result']) {
                case "ok":
                    $GLOBALS['page']->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')), 'content');
                case "err":
                    $GLOBALS['page']->add(getErrorUi($lang->def('_OPERATION_FAILURE')), 'content');
            }
        }
        $GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar($ini), 'content');
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=delnotes]');
        $GLOBALS['page']->add('</div>', 'content');
    }
Example #8
0
function modquest(&$url)
{
    $lang =& DoceboLanguage::createInstance('test');
    $id_quest = importVar('id_quest', true, 0);
    list($type_quest) = sql_fetch_row(mysql_query("\r\n\tSELECT type_quest\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_testquest\r\n\tWHERE idQuest = '" . $id_quest . "' AND idTest = 0"));
    require_once _lms_ . '/modules/question/question.php';
    quest_edit($type_quest, $id_quest, $url->getUrl());
}
function regional_settings()
{
    checkPerm('view');
    /*funAdminAccess('lang','OP');
    	$newPerm = funAdminAccess('addlang', 'NEW', true);
    	$modPerm = funAdminAccess('modlang', 'MOD', true);
    	$remPerm = funAdminAccess('dellang', 'REM', true);*/
    $write_perm = true;
    $mod_perm = true;
    $rem_perm = true;
    require_once _base_ . "/lib/lib.table.php";
    $out =& $GLOBALS['page'];
    $lang =& DoceboLanguage::createInstance('admin_regset', 'framework');
    $regset = new RegionalSettingsManager();
    $out->setWorkingZone("content");
    $out->add(getTitleArea($lang->def("_REGIONAL_SETTINGS"), "regset"));
    $out->add("<div class=\"std_block\">\n");
    $ini = importVar("ini", true, 0);
    $arr = $regset->getAllRegions();
    $table = new Table(Get::sett('visuItem'));
    $out->add($table->OpenTable(""));
    $head = array($lang->def("_REGION_CODE"), $lang->def("_DESCRIPTION"), '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def("_MOD") . '" title="' . $lang->def("_MOD") . '" />', '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def("_DEL") . '" title="' . $lang->def("_DEL") . '" />');
    $head_type = array('', '', 'img', 'img');
    $out->add($table->WriteHeader($head, $head_type));
    $tot = count($arr) < $ini + Get::sett('visuItem') ? count($arr) : $ini + Get::sett('visuItem');
    for ($i = $ini; $i < $tot; $i++) {
        $rowcnt = array();
        $rowcnt[] = $arr[$i];
        $rowcnt[] = $regset->getRegionInfo($arr[$i], "description");
        if ($mod_perm) {
            $btn = "<a href=\"index.php?modname=regional_settings&amp;op=editregion&amp;id=" . $arr[$i] . "\">";
            $btn .= "<img src=\"" . getPathImage() . "standard/edit.png\" ";
            $btn .= "alt=\"" . $lang->def("_MOD") . "\" title=\"" . $lang->def("_MOD") . " " . $arr[$i] . "\" />";
            $btn .= "</a>\n";
            $rowcnt[] = $btn;
        } else {
            $rowcnt[] = "&nbsp;";
        }
        if ($rem_perm && !$regset->getRegionInfo($arr[$i], "default")) {
            $btn = "<a href=\"\">";
            $btn .= "<img src=\"" . getPathImage() . "standard/delete.png\" ";
            $btn .= "alt=\"" . $lang->def("_DEL") . "\" title=\"" . $lang->def("_DEL") . " " . $arr[$i] . "\" />";
            $btn .= "</a>\n";
            $rowcnt[] = $btn;
        } else {
            $rowcnt[] = "&nbsp;";
        }
        $out->add($table->writeRow($rowcnt));
    }
    if ($write_perm) {
        $out->add($table->WriteAddRow('<a href="index.php?modname=regional_settings&amp;op=addregion">
		 <img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD') . '</a>'));
    }
    $out->add($table->CloseTable());
    $out->add($table->WriteNavBar('', 'index.php?modname=regional_settings&amp;op=regset&amp;ini=', $ini, count($arr)));
    $out->add("</div>\n");
}
 public function saveTask()
 {
     $model = new SettingAdm();
     $active_tab = importVar('active_tab', false, 1);
     if ($model->saveElement($active_tab)) {
         Util::jump_to('index.php?r=adm/setting/show&active_tab=' . $active_tab . '&result=ok');
     } else {
         Util::jump_to('index.php?r=adm/setting/show&active_tab=' . $active_tab . '&result=err');
     }
 }
Example #11
0
 function modglossary()
 {
     checkPerm('view', false, 'storage');
     $lang =& DoceboLanguage::createInstance('glossary');
     require_once _base_ . '/lib/lib.form.php';
     $idGlossary = importVar('idGlossary', true, 0);
     $back_url = urldecode(importVar('back_url'));
     $back_coded = htmlentities(urlencode($back_url));
     list($title, $description) = sql_fetch_row(sql_query("\r\n\tSELECT title, description\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossary \r\n\tWHERE idGlossary = '" . $idGlossary . "'"));
     $GLOBALS['page']->add(getTitleArea($lang->def('_GLOSSARY'), 'glossary', $lang->def('_GLOSSARY')) . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $back_url) . '&amp;create_result=0', $lang->def('_BACK')) . Form::openForm('glossaryform', 'index.php?modname=glossary&amp;op=upglossary') . Form::openElementSpace() . Form::getHidden('back_url', 'back_url', $back_coded) . Form::getHidden('idGlossary', 'idGlossary', $idGlossary) . Form::getTextfield($lang->def('_TITLE'), 'title', 'title', 150, $title) . Form::getTextarea($lang->def('_DESCRIPTION'), 'description', 'description', $description) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('modglossary', 'modglossary', $lang->def('_SAVE')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
 }
Example #12
0
    function play($object_link, $id_param)
    {
        //-kb-play-// if(!checkPerm('view', true, 'organization') && !checkPerm('view', true, 'storage')) die("You can't access");
        $lang =& DoceboLanguage::createInstance('link');
        $idCategory = $object_link->getId();
        $mode = importVar('mode', false, 'link');
        $back_coded = htmlentities(urlencode($object_link->back_url));
        require_once $GLOBALS['where_lms'] . '/lib/lib.param.php';
        $idReference = getLOParam($id_param, 'idReference');
        // NOTE: Track only if $idReference is present
        if ($idReference !== FALSE) {
            require_once $GLOBALS['where_lms'] . '/class.module/track.link.php';
            list($exist, $idTrack) = Track_Link::getIdTrack($idReference, getLogUserId(), $idCategory, TRUE);
            if ($exist) {
                $ti = new Track_Link($idTrack);
                $ti->setDate(date('Y-m-d H:i:s'));
                $ti->status = 'completed';
                $ti->update();
            } else {
                $ti = new Track_Link(false);
                $ti->createTrack($idReference, $idTrack, getLogUserId(), date('Y-m-d H:i:s'), 'completed', 'link');
            }
        }
        list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_link_cat \r\n\tWHERE idCategory = '" . (int) $idCategory . "'"));
        $link = 'index.php?modname=link&amp;op=play&amp;idCategory=' . $idCategory . '&amp;id_param=' . $id_param . '&amp;back_url=' . $back_coded;
        /*$GLOBALS['page']->add('<div id="top" class="std_block">'
        		.'<div class="colum_container">' */
        cout('<div id="top" class="yui-navset yui-navset-top tab_block">
		<ul class="yui-nav">
			<li class="first' . ($mode != 'keyw' ? ' selected' : '') . '">
				<a href="' . $link . '&amp;mode=list">
					<em>' . Lang::t('_SWITCH_TO_LIST', 'link') . '</em>
				</a>
			</li>
			<li' . ($mode == 'keyw' ? ' class="selected"' : '') . '>
				<a href="' . $link . '&amp;mode=keyw">
					<em>' . Lang::t('_SWITCH_TO_KEYWORD', 'link') . '</em>
				</a>
			</li>
		</ul>
		<div class="yui-content">', 'content');
        cout(getBackUi(Util::str_replace_once('&', '&amp;', $object_link->back_url), $lang->def('_BACK')), 'content');
        $GLOBALS['page']->add('<b>' . $lang->def('_TITLE') . ' : ' . $title . '</b><br /><br />' . $lang->def('_LINKIUNNEWWINDOW') . '<br /><br />', 'content');
        if ($mode == 'keyw') {
            displayAsKey($idCategory, $link . '&amp;mode=keyw');
        } else {
            displayAsList($idCategory);
        }
        $GLOBALS['page']->add('<div class="align_center">' . '<a href="#top"><img src="' . getPathImage() . 'standard/up.png" title="' . $lang->def('_BACKTOTOP') . '" />' . $lang->def('_BACKTOTOP') . '</a>' . getBackUi(Util::str_replace_once('&', '&amp;', $object_link->back_url), $lang->def('_BACK')) . '</div>', 'content');
        cout('</div></div>', 'content');
    }
Example #13
0
/**
 * @package  DoceboSCS
 * @version  $Id: functions.php 113 2006-03-08 18:08:42Z ema $
 */
function setRoom(&$out, &$lang)
{
    $ri = importVar("ri");
    if ($ri > 0) {
        $_SESSION["chat_room_id"] = $ri;
        $script = "<script type=\"text/javascript\">\n";
        //$script.="parent.chatText.reloadMsg();\n";
        $script .= "parent.chatCtl.resetLmi();\n";
        $script .= "parent.chatUsers.setTimeout('refreshPage()',1000);\n";
        $script .= "</script>\n";
        $out->add($script);
    }
    $out->add(listRooms($out, $lang));
}
Example #14
0
function config()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.tab.php';
    require_once _base_ . '/lib/lib.form.php';
    require_once _adm_ . '/class/class.conf.php';
    $lang =& DoceboLanguage::createInstance('configuration', 'framework');
    $active_tab = importVar('active_tab', false, 1);
    //instance class-------------------------------------------
    $conf = new Config_Framework();
    $groups = $conf->getRegroupUnit();
    cout(getTitleArea($lang->def('_CONFIGURATION')) . '<div class="std_block">');
    //save page if require
    if (isset($_POST['save_config'])) {
        if ($conf->saveElement($active_tab)) {
            cout(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
        } else {
            cout(getErrorUi($lang->def('_ERROR_IN_SAVE')));
        }
    }
    cout('<div id="global_conf" class="yui-navset">' . '<ul class="yui-nav">');
    while (list($id, $name) = each($groups)) {
        // print the tab list
        cout('<li' . ($id == $active_tab ? ' class="selected"' : '') . '><a href="#tab_g_' . $id . '"><em>' . $name['name'] . '</em></a></li>');
    }
    reset($groups);
    cout('</ul>' . '<div class="yui-content">');
    while (list($id, $name) = each($groups)) {
        // print the tab content
        cout('<div id="tab_g_' . $id . '">' . '<h2>' . $name['name'] . '</h2>' . '<p style="padding:4px">' . $name['descr'] . '</p>' . Form::openForm('conf_option_' . $id, 'index.php?modname=configuration&amp;op=config') . Form::openElementSpace() . Form::getHidden('active_tab_' . $id, 'active_tab', $id));
        switch ($id) {
            case SMS_GROUP:
                cout(show_sms_panel($lang) . '<br />');
                break;
            default:
                cout('<br />');
        }
        cout('' . $conf->getPageWithElement($id) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save_config_' . $id, 'save_config', $lang->def('_SAVE')) . Form::getButton('undo_' . $id, 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::CloseForm() . '<br />' . '</div>');
    }
    cout('<script type="text/javascript">
		var targets =  YAHOO.util.Selector.query("span[id^=tt_target]");
		new YAHOO.widget.Tooltip("tooltip_info",
			{ context:targets,
			effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.20}
		 });
		</script>', 'scripts');
    reset($groups);
    cout('</div>' . '<div style="clear:left">&nbsp;</div>' . '</div>' . '</div>');
    cout('<script type="text/javascript">' . "\tnew YAHOO.widget.TabView('global_conf', {orientation:'left'});" . '</script>', 'scripts');
}
Example #15
0
 function loadBody()
 {
     //EFFECTS: include module language and module main file
     switch ($GLOBALS['op']) {
         case "play":
             $id_poll = importVar('id_poll', true, 0);
             $id_param = importVar('id_param', true, 0);
             $back_url = importVar('back_url');
             $object_poll = createLO('poll', $id_poll);
             $object_poll->play($id_poll, $id_param, unserialize(urldecode($back_url)));
             break;
         default:
             parent::loadBody();
     }
 }
Example #16
0
 function loadBody()
 {
     //EFFECTS: include module language and module main file
     switch ($GLOBALS['op']) {
         case "play":
             $idCategory = importVar('idCategory', true, 0);
             $id_param = importVar('id_param', true, 0);
             $back_url = importVar('back_url');
             $object_link = createLO('link', $idCategory);
             $object_link->play($idCategory, $id_param, urldecode($back_url));
             break;
         default:
             parent::loadBody();
     }
 }
Example #17
0
function profileBackUrl()
{
    $lang =& DoceboLanguage::createInstance('profile', 'framework');
    $id_user = importVar('id_user', true, 0);
    $type = importVar('type', false, 'false');
    $from = importVar('from', true, 0);
    $back_my_friend = importVar('back', true, 0);
    if ($type !== 'false') {
        if ($from == 0) {
            return getBackUi('index.php?modname=profile&op=profile&id_user='******'&ap=goprofile', '<< ' . $lang->def('_BACK') . '');
        } else {
            return getBackUi('index.php?modname=myfiles&op=myfiles&working_area=' . $type, '<< ' . $lang->def('_BACK') . '');
        }
    }
    if ($back_my_friend) {
        return getBackUi('index.php?modname=myfriends&op=myfriends', '<< ' . $lang->def('_BACK'));
    }
    return false;
}
Example #18
0
function release_cert(&$url)
{
    checkPerm('view');
    $id_certificate = importVar('id_certificate', true, 0);
    $id_course = importVar('id_course', true, 0);
    $id_meta = Get::req('idmeta', DOTY_INT, 0);
    $cert = new Certificate();
    $subs = $cert->getSubstitutionArray(Docebo::user()->getIdST(), $id_course, $id_meta);
    $cert->send_certificate($id_certificate, Docebo::user()->getIdST(), $id_course, $subs);
}
Example #19
0
 /**
  * function play( $id, $id_param, $back_url )
  * @param int $id contains the resource id
  * @param int $id_param contains the id needed for params retriving
  * @param string $back_url contain the back url
  * @return nothing return
  **/
 function play($id, $id_param, $back_url)
 {
     require_once $GLOBALS['where_lms'] . '/modules/poll/do.poll.php';
     $this->id = $id;
     $this->back_url = $back_url;
     $step = importVar('next_step');
     switch ($step) {
         case "poll_review":
             review($this, $id_param);
             break;
         case "play":
             playPollDispatch($this, $id_param);
             break;
         default:
             intro($this, $id_param);
             break;
     }
 }
Example #20
0
        }
        break;
        //change language for register user
    //change language for register user
    case "registerconfirm":
        setLanguage($_POST['language']);
        break;
    case "registerme":
        list($language_reg) = sql_fetch_row(sql_query("\r\n\t\tSELECT language\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_user_temp \r\n\t\tWHERE random_code = '" . $_GET['random_code'] . "'"));
        if ($language_reg != '') {
            setLanguage($language_reg);
        }
        break;
}
// special operation
$sop = importVar('sop', false, '');
if ($sop) {
    if (is_array($sop)) {
        $sop = key($sop);
    }
    switch ($sop) {
        case "setcourse":
            $id_c = Get::req('sop_idc', DOTY_INT, 0);
            if (isset($_SESSION['idCourse']) && $_SESSION['idCourse'] != $id_c) {
                TrackUser::closeSessionCourseTrack();
                unset($_SESSION['idCourse']);
                unset($_SESSION['idEdition']);
                require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
                logIntoCourse($id_c, false);
            } elseif (!isset($_SESSION['idCourse'])) {
                require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
Example #21
0
 function catalogueDispatch($op)
 {
     if (isset($_POST['undo'])) {
         $op = 'catlist';
     }
     if (isset($_POST['undoentry'])) {
         $op = 'entrylist';
     }
     if (isset($_POST['cancelselector'])) {
         $op = 'catlist';
     }
     switch ($op) {
         case "catlist":
             catlist();
             break;
         case "newcatalogue":
             mancatalogue(false);
             break;
         case "modcatalogue":
             mancatalogue(importVar('id', false, 0));
             break;
         case "savecatalogue":
             savecatalogue();
             break;
         case "delcatalogue":
             delcatalogue();
             break;
         case "entrylist":
             entrylist();
             break;
         case "import":
             import();
             break;
         case "delentry":
             delentry();
             break;
         case "modcatalogueassoc":
             modcatalogueassoc();
             break;
     }
 }
Example #22
0
function delfriend(&$url)
{
    checkPerm('view');
    require_once $GLOBALS['where_framework'] . '/lib/lib.myfriends.php';
    $lang =& DoceboLanguage::createInstance('myfriends', 'lms');
    $my_fr = new MyFriends(getLogUserId());
    $id_friend = importVar('id_friend', true, 0);
    $GLOBALS['page']->add(getTitleArea(array($url->getUrl() => $lang->def('_MY_FRIENDS'), $lang->def('_REMOVE_FRIEND')), 'myfriends') . '<div class="std_block">', 'content');
    if (isset($_GET['confirm'])) {
        if ($my_fr->delFriend($id_friend)) {
            Util::jump_to($url->getUrl('result=ok_del'));
        }
        $GLOBALS['page']->add(getErrorUi($lang->def('_ERR_REMOVE_FRIEND')));
    }
    $ui = $my_fr->getFriendsInfo(array($id_friend));
    if ($ui == false) {
        $GLOBALS['page']->add(getErrorUi($lang->def('_INVALID_FRIEND')));
    } else {
        $acl_man =& Docebo::user()->getAclManager();
        $ui = current($ui);
        $GLOBALS['page']->add(getDeleteUi($lang->def('_AREYOUSURE'), '<span>' . $lang->def('_USERNAME') . ' : </span>' . $acl_man->relativeId($ui[ACL_INFO_USERID]) . '<br />' . '<span>' . $lang->def('_USERCOMPLETENAME') . ' : </span>' . $ui[ACL_INFO_LASTNAME] . ($ui[ACL_INFO_LASTNAME] != '' ? ' ' : '') . $ui[ACL_INFO_FIRSTNAME], true, $url->getUrl('op=delfriend&id_friend=' . $id_friend . '&confirm=1'), $url->getUrl()), 'content');
    }
    $GLOBALS['page']->add('</div>', 'content');
}
Example #23
0
function sessiondetails()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.table.php';
    $idst_user = importVar('id', true, 0);
    $id_enter = importVar('id_enter', true, 0);
    $p_ini = importVar('p_ini');
    $link = 'index.php?modname=statistic&amp;op=sessiondetails&amp;id=' . $idst_user . '&amp;id_enter=' . $id_enter;
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0, 'link');
    $nav_bar->setLink($link . '&amp;p_ini=' . $p_ini);
    $ini = $nav_bar->getSelectedElement();
    $lang =& DoceboLanguage::createInstance('statistic', 'lms');
    $acl_man = Docebo::user()->getAclManager();
    $user_info =& $acl_man->getUser($idst_user, false);
    $query_track = "\r\n\tSELECT g.function, g.type, g.timeof, UNIX_TIMESTAMP(g.timeof) AS unix_time \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral AS g\r\n\tWHERE g.idCourse = '" . (int) $_SESSION['idCourse'] . "' AND g.idUser = '******' AND " . " ( g.idEnter = '" . $id_enter . "' OR (  g.idEnter = 0 AND g.session_id = '" . importVar('sid') . "' ) ) " . " ORDER BY g.timeof \r\n\tLIMIT " . $ini . ", " . Get::sett('visuItem');
    $re_tracks = sql_query($query_track);
    $query_tot_track = "\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral \r\n\tWHERE idCourse = '" . (int) $_SESSION['idCourse'] . "' AND idUser = '******' AND idEnter = '" . $id_enter . "'";
    list($tot_elem) = sql_fetch_row(sql_query($query_tot_track));
    $nav_bar->setElementTotal($tot_elem);
    // Find modulename -> name int his course
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    $course_man = new Man_Course();
    $mods_names =& $course_man->getModulesName($_SESSION['idCourse']);
    $page_title = array('index.php?modname=statistic&amp;op=statistic' => $lang->def('_STATISTICS'), 'index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini => $user_info[ACL_INFO_LASTNAME] . $user_info[ACL_INFO_FIRSTNAME] ? $user_info[ACL_INFO_LASTNAME] . ' ' . $user_info[ACL_INFO_FIRSTNAME] : $acl_man->relativeId($user_info[ACL_INFO_USERID]), $lang->def('_VIEW_SESSION_DETAILS'));
    $GLOBALS['page']->add(getTitleArea($page_title, 'statistic') . '<div class="std_block">' . getBackUi('index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini, $lang->def('_BACK')), 'content');
    $tb = new Table(0, $lang->def('_VIEW_SESSION_DETAILS'), $lang->def('_VIEW_SESSION_DETAILS'));
    $type_h = array('', '', '');
    $cont_h = array($lang->def('_DATE'), $lang->def('_TYPE_OF_OPERATION'), $lang->def('_TIME_IN'));
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    $type_h[2] = 'align_right';
    $tb->setColsStyle($type_h);
    $total_sec = 0;
    $read_previous = false;
    while ($read = mysql_fetch_assoc($re_tracks)) {
        if ($read_previous !== false) {
            $time_in = $read['unix_time'] - $read_previous['unix_time'];
            $hours = (int) ($time_in / 3600);
            $minutes = (int) ($time_in % 3600 / 60);
            $seconds = (int) ($time_in % 60);
            if ($minutes < 10) {
                $minutes = '0' . $minutes;
            }
            if ($seconds < 10) {
                $seconds = '0' . $seconds;
            }
            $readable = $hours . 'h ' . $minutes . 'm ' . $seconds . 's ';
            $cont = array(Format::date($read_previous['timeof'], false, true), '<span class="text_bold">' . (isset($mods_names[$read_previous['function']]) ? $mods_names[$read_previous['function']] : $read_previous['function']) . '</span> [' . $read_previous['type'] . ']', $readable);
            $tb->addBody($cont);
        }
        $read_previous = $read;
    }
    $query_last_track = "\r\n\tSELECT g.function, g.type, g.timeof, UNIX_TIMESTAMP(g.timeof) AS unix_time \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral AS g\r\n\tWHERE g.idCourse = '" . (int) $_SESSION['idCourse'] . "' AND g.idUser = '******' AND g.idEnter = '" . $id_enter . "' \r\n\tLIMIT " . ($ini + Get::sett('visuItem')) . ", 1";
    $re_track = sql_query($query_last_track);
    if (mysql_num_rows($re_track) > 0) {
        $read = mysql_fetch_assoc($re_track);
        $time_in = $read['unix_time'] - $read_previous['unix_time'];
        $hours = (int) ($time_in / 3600);
        $minutes = (int) ($time_in % 3600 / 60);
        $seconds = (int) ($time_in % 60);
        if ($minutes < 10) {
            $minutes = '0' . $minutes;
        }
        if ($seconds < 10) {
            $seconds = '0' . $seconds;
        }
        $readable = $hours . 'h ' . $minutes . 'm ' . $seconds . 's ';
    } else {
        $readable = '';
    }
    $cont = array(Format::date($read_previous['timeof']), '<span class="text_bold">' . (isset($mods_names[$read_previous['function']]) ? $mods_names[$read_previous['function']] : $read_previous['function']) . '</span> [' . $read_previous['type'] . ']', $readable);
    $tb->addBody($cont);
    $GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar() . getBackUi('index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini, $lang->def('_BACK')) . '</div>', 'content');
}
Example #24
0
function adminManager_edit_course()
{
    checkPerm('view');
    require_once $GLOBALS['where_lms'] . '/lib/lib.course_managment.php';
    $lang =& DoceboLanguage::createInstance('adminrules', 'framework');
    $adminidst = importVar('adminidst', true, 0);
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $sel = new Course_Manager();
    $sel->setLink('index.php?modname=admin_manager&amp;op=edit_course');
    if (isset($_GET['load']) || isset($_POST['save_selection'])) {
        $course_initial_sel = array();
        $coursepath_initial_sel = array();
        $catalogue_initial_sel = array();
        $query = "\r\n\t\tSELECT id_entry, type_of_entry\r\n\t\tFROM " . $GLOBALS['prefix_fw'] . "_admin_course\r\n\t\tWHERE idst_user = '******'";
        $re_entry = sql_query($query);
        while (list($id, $type) = sql_fetch_row($re_entry)) {
            switch ($type) {
                case "course":
                    $course_initial_sel[$id] = $id;
                    break;
                case "coursepath":
                    $coursepath_initial_sel[$id] = $id;
                    break;
                case "catalogue":
                    $catalogue_initial_sel[$id] = $id;
                    break;
            }
        }
        if (isset($_GET['load'])) {
            $sel->resetCourseSelection($course_initial_sel);
            $sel->resetCoursePathSelection($coursepath_initial_sel);
            $sel->resetCatalogueSelection($catalogue_initial_sel);
        }
    }
    if (isset($_POST['save_selection'])) {
        $re = true;
        $course = $sel->getCourseSelection($_POST);
        $re &= updateEntry($course, $course_initial_sel, 'course', $adminidst);
        $coursepath = $sel->getCoursePathSelection($_POST);
        $re &= updateEntry($coursepath, $coursepath_initial_sel, 'coursepath', $adminidst);
        $catalogue = $sel->getCatalogueSelection($_POST);
        $re &= updateEntry($catalogue, $catalogue_initial_sel, 'catalogue', $adminidst);
        Util::jump_to('index.php?modname=admin_manager&amp;op=view&amp;result=' . ($re ? 'ok' : 'err'));
    }
    if (isset($_POST['undo_pref'])) {
        Util::jump_to('index.php?modname=admin_manager&amp;op=view');
    }
    $out->addStart(getTitleArea($lang->def('_ADMIN_MANAGMENT'), 'admin_managmer', $lang->def('_ADMIN_MANAGMENT')) . '<div class="std_block">' . Form::openForm('admin_menu_editing', 'index.php?modname=admin_manager&amp;op=edit_course') . Form::getHidden('adminidst', 'adminidst', $adminidst), 'content');
    $out->addEnd(Form::openButtonSpace() . Form::getButton('save_selection', 'save_selection', $lang->def('_SAVE')) . Form::getButton('undo_pref', 'undo_pref', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
    $sel->loadSelector();
}
Example #25
0
 /**
  * function play( $id, $id_param, $back_url )
  * @param int $id contains the resource id
  * @param int $id_param contains the id needed for params retriving
  * @param string $back_url contain the back url
  * @return nothing return
  **/
 function play($id, $id_param, $back_url)
 {
     require_once $GLOBALS['where_lms'] . '/modules/link/do.link.php';
     $this->id = $id;
     $this->back_url = $back_url;
     $step = importVar('next_step');
     switch ($step) {
         default:
             play($this, $id_param);
             break;
     }
 }
Example #26
0
    require_once $GLOBALS['where_lms'] . '/modules/question_poll/' . $type_file;
    $quest_obj = eval("return new {$type_class}( 0 );");
    $quest_obj->create($id_poll, $back_poll);
}
// XXX: quest_edit
function quest_edit($type_quest, $id_quest, $back_poll)
{
    $re_quest = sql_query("\r\n\tSELECT type_file, type_class \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_quest_type_poll \r\n\tWHERE type_quest = '" . $type_quest . "'");
    if (!mysql_num_rows($re_quest)) {
        return;
    }
    list($type_file, $type_class) = sql_fetch_row($re_quest);
    require_once $GLOBALS['where_lms'] . '/modules/question_poll/' . $type_file;
    $quest_obj = eval("return new {$type_class}( {$id_quest} );");
    $quest_obj->edit($back_poll);
}
// XXX: switch
switch ($GLOBALS['op']) {
    case "create":
        $type_quest = importVar('type_quest');
        $id_poll = importVar('id_poll', true, 0);
        $back_poll = urldecode(importVar('back_poll'));
        quest_create($type_quest, $id_poll, $back_poll);
        break;
    case "edit":
        $type_quest = importVar('type_quest');
        $id_quest = importVar('id_quest', true, 0);
        $back_poll = urldecode(importVar('back_poll'));
        quest_edit($type_quest, $id_quest, $back_poll);
        break;
}
Example #27
0
function select_media(&$out, &$lang)
{
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.multimedia.php';
    $form = new Form();
    $from = importVar("from");
    $item_id = (int) importVar("item_id");
    $src = "";
    $title = "";
    $path = "";
    switch ($from) {
        case "cms":
            if (!canAccessCmsMedia()) {
                die("You can't access!");
            }
            $path = _FPATH_INTERNAL;
            $relative_path = _FPATH;
            $preview_path = _PPATH;
            $qtxt = "SELECT t1.fname, t1.real_fname, t1.media_url, t2.title FROM " . $GLOBALS["prefix_cms"] . "_media as t1 ";
            $qtxt .= "LEFT JOIN " . $GLOBALS["prefix_cms"] . "_media_info as t2 ON (t2.idm=t1.idMedia) ";
            $qtxt .= "WHERE t1.idMedia='" . $item_id . "' AND t1.publish='1'";
            $q = sql_query($qtxt);
            if ($q && mysql_num_rows($q) > 0) {
                $row = mysql_fetch_array($q);
                $src = $row["real_fname"];
                $title = $row["title"];
                if (!empty($row["media_url"])) {
                    $src = $row["media_url"];
                } else {
                    $src = $row["real_fname"];
                }
            }
            break;
        case "personal":
            if (!canAccessPersonalMedia()) {
                die("You can't access!");
            }
            $user_id = Docebo::user()->getIdSt();
            $path = _USER_FPATH_INTERNAL;
            $relative_path = _USER_FPATH;
            $preview_path = _USER_FPATH;
            $qtxt = "SELECT real_fname, media_url FROM " . $GLOBALS["prefix_fw"] . "_user_file ";
            $qtxt .= "WHERE id='" . $item_id . "' AND user_idst='" . $user_id . "' AND type='image'";
            $q = sql_query($qtxt);
            if ($q && mysql_num_rows($q) > 0) {
                $row = mysql_fetch_array($q);
                if (!empty($row["media_url"])) {
                    $src = $row["media_url"];
                } else {
                    $src = $row["real_fname"];
                }
            }
            break;
    }
    //	$src=rawurlencode($src);
    $res = "";
    $url = getPopupBaseUrl() . "&amp;op=main";
    if (!empty($row["media_url"])) {
        $media_url = $row["media_url"];
        $popup_file_path = $media_url;
    } else {
        $popup_file_path = $path . $src;
    }
    addMediaPopupJS($popup_file_path);
    // TODO: remove inline style
    if (file_exists($preview_path . $src)) {
        $style = "width: 100px; padding: 2px; border: 1px solid #AAAAAA; margin-bottom: 0.4em;";
        $res .= "<img style=\"" . $style . "\" src=\"" . $preview_path . $src . "\" alt=\"" . $title . "\" title=\"" . $title . "\" />\n";
    } else {
        $media_type = getMediaType($src);
        $style = "width: 64px; padding: 2px; border: 1px solid #AAAAAA; margin-bottom: 0.4em;";
        $res .= "<img style=\"" . $style . "\" src=\"" . getPathImage('fw') . "media/" . $media_type . ".png\" alt=\"" . $title . "\" title=\"" . $title . "\" />\n";
    }
    $res .= $form->openForm("popup_form", $url, false, false, '', "onSubmit=\"insItem();\" onReset=\"closePopup();\"");
    $res .= $form->openElementSpace();
    $type = getPopupSelType();
    switch ($type) {
        case "image":
            $res .= $form->getTextfield($lang->def("_ALT_TXT"), "alt_text", "alt_text", 255, $title);
            $res .= $form->getTextfield($lang->def("_TITLE"), "title_text", "title_text", 255, $title);
            //$res.=$form->getTextfield($lang->def("_BORDER"), "border", "border", 3, "0");
            break;
        case "flash":
            $flash_info = getSwfInfoArray($relative_path . $src);
            $res .= $form->getTextfield($lang->def("_WIDTH"), "width", "width", 4, $flash_info["width"]);
            $res .= $form->getTextfield($lang->def("_HEIGHT"), "height", "height", 4, $flash_info["height"]);
            $res .= $form->getTextfield($lang->def("_BGCOLOR"), "bgcolor", "border", 7, "#FFF");
            break;
        case "audio":
        case "video":
        case "streaming":
            require_once _base_ . '/lib/lib.json.php';
            $json = new Services_JSON();
            if (!empty($media_url)) {
                $code = getStreamingEmbed($media_url, FALSE, $src);
            } else {
                $cut_from = strlen($GLOBALS["where_files_relative"]);
                $base_relative_path = $GLOBALS["base_where_files_relative"] . substr($relative_path, $cut_from);
                $current_pl = Get::cur_plat();
                $site_file_path = getPLSetting($current_pl, "url") . $base_relative_path;
                $code = getEmbedPlay($site_file_path, $src, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE);
            }
            $code = '<div>' . $code . '</div>';
            $core_url = getPLSetting("framework", "url");
            $bad_path = $GLOBALS["where_framework_relative"] . "/addons/players/";
            $good_path = $core_url . "addons/players/";
            $code = str_replace($bad_path, $good_path, $code);
            $content = array("code" => $code);
            $embed_code = $json->encode($content);
            $res .= $form->getHidden("embed_code", "embed_code", rawurlencode($embed_code));
            $res .= $src;
            break;
    }
    $res .= $form->closeElementSpace();
    $res .= $form->openButtonSpace();
    $res .= $form->getButton('apply', 'apply', $lang->def('_SAVE'));
    $res .= $form->getReset('undo', 'undo', $lang->def('_UNDO'));
    $res .= $form->closeButtonSpace();
    $res .= $form->closeForm();
    $out->add($res);
}
Example #28
0
function showprofile()
{
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.lms_user_profile.php';
    $lang =& DoceboLanguage::createInstance('catalogue');
    $lang =& DoceboLanguage::createInstance('course');
    $id_user = importVar('id_user');
    $id_course = importVar('id_course');
    $man_course = new Man_Course();
    $course = $man_course->getCourseInfo($id_course);
    $profile = new LmsUserProfile($id_user);
    $profile->init('profile', 'framework', 'modname=login&op=showprofile&id_course' . $id_course . '&id_user='******'ap');
    $GLOBALS['page']->add(getTitleArea($lang->def('_NAME', 'catalogue'), 'catalogue') . '<div class="std_block">' . getBackUi('index.php?modname=login&amp;op=courselist&amp;id_parent=' . $course['idCategory'], $lang->def('_BACK')), 'content');
    $GLOBALS['page']->add('<p class="category_path">' . '<b>' . $lang->def('_CATEGORY_PATH') . ' :</b> ' . $man_course->getCategoryPath($course['idCategory'], $lang->def('_MAIN_CATEGORY'), $lang->def('_TITLE_CATEGORY_JUMP'), 'index.php?modname=login&amp;op=courselist', 'id_parent') . ' &gt; ' . $course['name'] . '</p>' . $profile->getProfile(getLogUserId()) . '</div>', 'content');
}
function importRequest($name, $default = "")
{
    return importVar($_REQUEST, $name, $default);
}
Example #30
0
function conference_delconf()
{
    checkPerm('mod');
    $id = importVar('id');
    $conference = new Conference_Manager();
    $room = $conference->roomInfo($id);
    $lang =& DoceboLanguage::createInstance('conference', 'lms');
    if (Get::req('confirm', DOTY_INT, 0)) {
        $conference->deleteRoom($id);
        require_once $GLOBALS['where_scs'] . '/lib/lib.booking.php';
        $booking = new RoomBooking();
        $booking->deleteBookingByRoom($id);
        Util::jump_to('index.php?modname=conference&amp;op=list');
    } else {
        $title_page = array('index.php?modname=conference&amp;op=list' => $lang->def('_VIDEOCONFERENCE'), $lang->def('_DEL'));
        $GLOBALS['page']->add(getTitleArea($title_page, 'conference', $lang->def('_VIDEOCONFERENCE')) . '<div class="std_block">' . getDeleteUi($lang->def('_AREYOUSURE'), '<span>' . $lang->def('_VIDEOCONFERENCE') . ' : </span>' . $room["name"], true, 'index.php?modname=conference&amp;op=delconf&amp;id=' . $id . '&amp;confirm=1', 'index.php?modname=conference&amp;op=list') . '</div>', 'content');
    }
}