当前位置: 首页>>代码示例>>PHP>>正文


PHP EfrontLesson::setOptions方法代码示例

本文整理汇总了PHP中EfrontLesson::setOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP EfrontLesson::setOptions方法的具体用法?PHP EfrontLesson::setOptions怎么用?PHP EfrontLesson::setOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EfrontLesson的用法示例。


在下文中一共展示了EfrontLesson::setOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: serialize

 mb_internal_encoding('utf-8');
 //This must be put here due to PHP bug #48697
 if ($visibility) {
     $positions = serialize(array('first' => array_unique($firstlist), 'second' => array_unique($secondlist), 'visibility' => $visibility));
 } else {
     $positions = serialize(array('first' => array_unique($firstlist), 'second' => array_unique($secondlist)));
 }
 //Dashboard positions
 if ($_POST['dashboard']) {
     eF_updateTableData("users", array('dashboard_positions' => $positions), "login='" . $currentUser->user['login'] . "'");
 } else {
     if ($currentUser->user['user_type'] == 'administrator' && !isset($_POST['lessons_ID'])) {
         EfrontConfiguration::setValue($currentUser->user['login'] . "_positions", $positions);
     } else {
         if (isset($_POST['set_default']) && ($currentUser->user['user_type'] == 'administrator' || $roles[$currentLesson->getRole($currentUser->user['login'])] == 'professor')) {
             $currentLesson->setOptions(array("default_positions" => $positions));
             $positions = serialize(array('first' => array_unique($firstlist), 'second' => array_unique($secondlist), 'visibility' => $visibility, 'update' => true));
             $lessonStudents = $currentLesson->getUsers('student');
             if (sizeof($lessonStudents) > 0) {
                 $users = implode("','", array_keys($lessonStudents));
                 eF_updateTableData("users_to_lessons", array('positions' => $positions), "users_LOGIN in ('" . $users . "') and lessons_ID=" . $currentLesson->lesson['id']);
             }
         } else {
             if (!$visibility) {
                 $result = eF_getTableData("users_to_lessons", "positions", "lessons_ID=" . $currentLesson->lesson['id'] . " AND users_LOGIN='" . $currentUser->user['login'] . "'");
                 $result = unserialize($result[0]['positions']);
                 $visibility = $result['visibility'];
                 if (isset($result['visibility'])) {
                     $positions = serialize(array('first' => array_unique($firstlist), 'second' => array_unique($secondlist), 'visibility' => $visibility));
                 }
             }
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:set_positions.php


注:本文中的EfrontLesson::setOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。