本文整理汇总了PHP中ExerciseLib::getLatestHotPotatoResult方法的典型用法代码示例。如果您正苦于以下问题:PHP ExerciseLib::getLatestHotPotatoResult方法的具体用法?PHP ExerciseLib::getLatestHotPotatoResult怎么用?PHP ExerciseLib::getLatestHotPotatoResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExerciseLib
的用法示例。
在下文中一共展示了ExerciseLib::getLatestHotPotatoResult方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_get_cidreq
$actions .= '<a href="hotpotatoes_exercise_report.php?' . api_get_cidreq() . '&path=' . $path . '">' . Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL) . '</a>';
// if active
if ($active) {
$nbrActiveTests = $nbrActiveTests + 1;
$actions .= ' <a href="' . $exercisePath . '?' . api_get_cidreq() . '&hpchoice=disable&page=' . $page . '&file=' . $path . '">' . Display::return_icon('visible.png', get_lang('Deactivate'), '', ICON_SIZE_SMALL) . '</a>';
} else {
// else if not active
$actions .= ' <a href="' . $exercisePath . '?' . api_get_cidreq() . '&hpchoice=enable&page=' . $page . '&file=' . $path . '">' . Display::return_icon('invisible.png', get_lang('Activate'), '', ICON_SIZE_SMALL) . '</a>';
}
$actions .= '<a href="' . $exercisePath . '?' . api_get_cidreq() . '&hpchoice=delete&file=' . $path . '" onclick="javascript:if(!confirm(\'' . addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset) . ' ' . $title . "?") . '\')) return false;">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>';
$item .= Display::tag('td', $actions);
$tableRows[] = Display::tag('tr', $item);
} else {
// Student only
if ($active == 1) {
$attempt = ExerciseLib::getLatestHotPotatoResult($path, $userId, api_get_course_int_id(), api_get_session_id());
$nbrActiveTests = $nbrActiveTests + 1;
$item .= Display::tag('td', '<a href="showinframes.php?' . api_get_cidreq() . '&file=' . $path . '&cid=' . api_get_course_id() . '&uid=' . $userId . '" ' . (!$active ? 'class="invisible"' : '') . ' >' . $title . '</a>');
if (!empty($attempt)) {
$actions = '<a href="hotpotatoes_exercise_report.php?' . api_get_cidreq() . '&path=' . $path . '&filter_by_user=' . $userId . '">' . Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL) . '</a>';
$attemptText = get_lang('LatestAttempt') . ' : ';
$attemptText .= ExerciseLib::show_score($attempt['exe_result'], $attempt['exe_weighting']) . ' ';
$attemptText .= $actions;
} else {
// No attempts.
$attemptText = get_lang('NotAttempted') . ' ';
}
$item .= Display::tag('td', $attemptText);
if ($isDrhOfCourse) {
$actions = '<a href="hotpotatoes_exercise_report.php?' . api_get_cidreq() . '&path=' . $path . '">' . Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL) . '</a>';
$item .= Display::tag('td', $actions, array('class' => 'td_actions'));