本文整理汇总了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));
}
}