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