本文整理汇总了PHP中learnpath::set_previous_step_as_prerequisite_for_all_items方法的典型用法代码示例。如果您正苦于以下问题:PHP learnpath::set_previous_step_as_prerequisite_for_all_items方法的具体用法?PHP learnpath::set_previous_step_as_prerequisite_for_all_items怎么用?PHP learnpath::set_previous_step_as_prerequisite_for_all_items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类learnpath
的用法示例。
在下文中一共展示了learnpath::set_previous_step_as_prerequisite_for_all_items方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
}
if (!$lp_found) {
error_log('New LP - No learnpath given for view', 0);
require 'lp_list.php';
} else {
if ($debug > 0) {
error_log('New LP - Trying to impress this LP item to ' . $_REQUEST['item_id'], 0);
}
if (!empty($_REQUEST['item_id'])) {
$learnPath->set_current_item($_REQUEST['item_id']);
}
require 'lp_impress.php';
}
break;
case 'set_previous_step_as_prerequisite':
$learnPath->set_previous_step_as_prerequisite_for_all_items();
$learnPath->updateCurrentLpFromSession();
$url = api_get_self() . '?action=add_item&type=step&lp_id=' . intval($learnPath->lp_id) . "&message=ItemUpdated";
header('Location: ' . $url);
break;
case 'clear_prerequisites':
$learnPath->clear_prerequisites();
$learnPath->updateCurrentLpFromSession();
$url = api_get_self() . '?action=add_item&type=step&lp_id=' . intval($learnPath->lp_id) . "&message=ItemUpdated";
header('Location: ' . $url);
break;
case 'toggle_seriousgame':
//activate/deactive seriousgame_mode
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}