本文整理汇总了PHP中Evaluation::getSessionId方法的典型用法代码示例。如果您正苦于以下问题:PHP Evaluation::getSessionId方法的具体用法?PHP Evaluation::getSessionId怎么用?PHP Evaluation::getSessionId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Evaluation
的用法示例。
在下文中一共展示了Evaluation::getSessionId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_edit_icons_eval
/**
* Builds the course or platform admin icons to edit an evaluation
* @param Evaluation $eval evaluation object
* @param int $selectcat id of selected category
*/
public static function build_edit_icons_eval($eval, $selectcat)
{
$status = CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
$is_locked = $eval->is_locked();
$eval->get_course_code();
$cat = new Category();
$message_eval = $cat->show_message_resource_delete($eval->get_course_code());
if ($message_eval === false && api_is_allowed_to_edit(null, true)) {
$visibility_icon = $eval->is_visible() == 0 ? 'invisible' : 'visible';
$visibility_command = $eval->is_visible() == 0 ? 'set_visible' : 'set_invisible';
if ($is_locked && !api_is_platform_admin()) {
$modify_icons = Display::return_icon('edit_na.png', get_lang('Modify'), '', ICON_SIZE_SMALL);
} else {
$modify_icons = '<a href="gradebook_edit_eval.php?editeval=' . $eval->get_id() . '&cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
}
$modify_icons .= ' <a href="' . api_get_self() . '?visibleeval=' . $eval->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . '&id_session=' . $eval->getSessionId() . ' ">' . Display::return_icon($visibility_icon . '.png', get_lang('Visible'), '', ICON_SIZE_SMALL) . '</a>';
if (api_is_allowed_to_edit(null, true)) {
$modify_icons .= ' <a href="gradebook_showlog_eval.php?visiblelog=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '">' . Display::return_icon('history.png', get_lang('GradebookQualifyLog'), '', ICON_SIZE_SMALL) . '</a>';
}
if ($is_locked && !api_is_platform_admin()) {
$modify_icons .= ' ' . Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL);
} else {
$modify_icons .= ' <a href="' . api_get_self() . '?deleteeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '" onclick="return confirmation();">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>';
}
return $modify_icons;
}
}
示例2: build_edit_icons_eval
/**
* Builds the course or platform admin icons to edit an evaluation
* @param Evaluation $eval evaluation object
* @param int $selectcat id of selected category
*/
public static function build_edit_icons_eval($eval, $selectcat)
{
$status = CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
$is_locked = $eval->is_locked();
$eval->get_course_code();
$cat = new Category();
$message_eval = $cat->show_message_resource_delete($eval->get_course_code());
if ($message_eval === false && api_is_allowed_to_edit(null, true)) {
$visibility_icon = $eval->is_visible() == 0 ? 'invisible' : 'visible';
$visibility_command = $eval->is_visible() == 0 ? 'set_visible' : 'set_invisible';
if ($is_locked && !api_is_platform_admin()) {
$modify_icons = Display::return_icon('edit_na.png', get_lang('Modify'), '', ICON_SIZE_SMALL);
} else {
$modify_icons = '<a href="gradebook_edit_eval.php?editeval=' . $eval->get_id() . '&cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '">' . Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>';
}
$modify_icons .= ' <a href="' . api_get_self() . '?visibleeval=' . $eval->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . '&id_session=' . $eval->getSessionId() . ' ">' . Display::return_icon($visibility_icon . '.png', get_lang('Visible'), '', ICON_SIZE_SMALL) . '</a>';
if (api_is_allowed_to_edit(null, true)) {
$modify_icons .= ' <a href="gradebook_showlog_eval.php?visiblelog=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '">' . Display::return_icon('history.png', get_lang('GradebookQualifyLog'), '', ICON_SIZE_SMALL) . '</a>';
}
/*
if ($locked_status == 0){
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."'; }\">".Display::return_icon('unlock.png',get_lang('LockEvaluation'), array(), ICON_SIZE_SMALL)."</a>";
} else {
if (api_is_platform_admin()){
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToUnLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&typelocked=&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."';\">".Display::return_icon('lock.png',get_lang('UnLockEvaluation'), array(), ICON_SIZE_SMALL)."</a>";
} else {
$modify_icons .= ' <img src="../img/locked_na.png" border="0" title="' . get_lang('TheEvaluationIsLocked') . '" alt="" />';
}
} */
if ($is_locked && !api_is_platform_admin()) {
$modify_icons .= ' ' . Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL);
} else {
$modify_icons .= ' <a href="' . api_get_self() . '?deleteeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq=' . $eval->get_course_code() . '&id_session=' . $eval->getSessionId() . '" onclick="return confirmation();">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>';
}
return $modify_icons;
}
}