本文整理汇总了PHP中learnpath::getProgress方法的典型用法代码示例。如果您正苦于以下问题:PHP learnpath::getProgress方法的具体用法?PHP learnpath::getProgress怎么用?PHP learnpath::getProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类learnpath
的用法示例。
在下文中一共展示了learnpath::getProgress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLpStats
//.........这里部分代码省略.........
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
</td>';
} else {
$output .= '<td>
<a href="../exercice/exercise_show.php?origin=' . $origin . '&id=' . $my_exe_id . '&cidReq=' . $courseCode . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
</a></td>';
}
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></td>';
} else {
$output .= '<td>
<a href="../exercice/exercise_show.php?cidReq=' . $courseCode . '&origin=correct_exercise_in_lp&id=' . $my_exe_id . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></a></td>';
}
}
}
$output .= '</tr>';
$n++;
}
}
$output .= '<tr><td colspan="12"> </td></tr>';
}
}
}
}
$total_time += $time_for_total;
// QUIZZ IN LP
$a_my_id = array();
if (!empty($my_lp_id)) {
$a_my_id[] = $my_lp_id;
}
}
}
// NOT Extend all "left green cross"
if (!empty($a_my_id)) {
if ($extendedAttempt) {
// "Right green cross" extended
$total_score = self::get_avg_student_score($user_id, $course_id, $a_my_id, $session_id, false, false);
} else {
// "Left green cross" extended
$total_score = self::get_avg_student_score($user_id, $course_id, $a_my_id, $session_id, false, true);
}
} else {
// Extend all "left green cross"
$total_score = self::get_avg_student_score($user_id, $course_id, array($lp_id), $session_id, false, false);
}
$total_time = learnpathItem::getScormTimeFromParameter('js', $total_time);
$total_time = str_replace('NaN', '00' . $h . '00\'00"', $total_time);
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$final_score = Display::return_icon('invisible.gif', get_lang('ResultsHiddenByExerciseSetting'));
} else {
if (is_numeric($total_score)) {
$final_score = $total_score . '%';
} else {
$final_score = $total_score;
}
}
$progress = learnpath::getProgress($lp_id, $user_id, $course_id, $session_id);
if ($counter % 2 == 0) {
$oddclass = 'row_odd';
} else {
$oddclass = 'row_even';
}
$action = null;
if ($type == 'classic') {
$action = '<td></td>';
}
$output .= '<tr class="' . $oddclass . '">
<td></td>
<td colspan="4">
<i>' . get_lang('AccomplishedStepsTotal') . '</i>
</td>
<td colspan="2">' . $progress . '%</td>
<td colspan="2">
' . $final_score . '
</td>
<td colspan="2">' . $total_time . '</div>
' . $action . '
</tr>';
$output .= '
</tbody>
</table>
</div>
';
if (!empty($export_csv)) {
$temp = array('', '', '', '');
$csv_content[] = $temp;
$temp = array(get_lang('AccomplishedStepsTotal'), '', $final_score, $total_time);
$csv_content[] = $temp;
ob_end_clean();
Export::arrayToCsv($csv_content, 'reporting_learning_path_details');
exit;
}
return $output;
}
示例2:
$dsp_line = '<tr align="center" class="'.$oddclass.'">'.
'<td align="left" valign="top">'.$icon_learnpath.'
<a href="'.$url_start_lp.'">'.$my_title.'</a>'.$session_img.$extra."</td>";
$dsp_desc = '';
$dsp_export = '';
$dsp_build = '';
$dsp_delete = '';
$dsp_visible = '';
$dsp_default_view = '';
$dsp_debug = '';
$dsp_order = '';
$progress = learnpath::getProgress(
$id,
$userId,
api_get_course_int_id(),
api_get_session_id()
);
if ($is_allowed_to_edit) {
$dsp_progress = '<td><center>'.$progress.'</center></td>';
} else {
$dsp_progress = '<td>'.learnpath::get_progress_bar($progress, '%').'</td>';
}
$dsp_edit = '<td class="td_actions">';
$dsp_edit_close = '</td>';
$token_parameter = "&sec_token=$token";
$dsp_edit_lp = null;
$dsp_publish = null;