echo $learnpath_id; ?> " /> <input type="hidden" name="learnpath_item_id" value="<?php echo $learnpath_item_id; ?> " /> <input type="hidden" name="learnpath_item_view_id" value="<?php echo $learnpath_item_view_id; ?> " /> <?php } $i = $total_score = $max_score = 0; //We check if the user attempts before sending to the exercise_result.php if ($objExercise->selectAttempts() > 0) { $attempt_count = Event::get_attempt_count(api_get_user_id(), $objExercise->id, $learnpath_id, $learnpath_item_id, $learnpath_item_view_id); if ($attempt_count >= $objExercise->selectAttempts()) { Display::display_warning_message(sprintf(get_lang('ReachedMaxAttempts'), $objExercise->selectTitle(), $objExercise->selectAttempts()), false); if ($origin != 'learnpath') { //we are not in learnpath tool Display::display_footer(); } exit; } } $total_score = 0; if (!empty($exercise_stat_info)) { $total_score = $exercise_stat_info['exe_result']; } $max_score = $objExercise->get_max_score();
if (!empty($my_attempt_array)) { foreach ($my_attempt_array as $data) { $column = 0; $table->setCellContents($row, $column, $data); $class = 'class="row_odd"'; if ($row % 2) { $class = 'class="row_even"'; } $table->setRowAttributes($row, $class, true); $column++; $row++; } } $table_content = $table->toHtml(); } if ($objExercise->selectAttempts()) { if ($is_allowed_to_edit) { //$options.= Display::div(get_lang('ExerciseAttempts').' '.$objExercise->selectAttempts(), array('class'=>'right_option')); } $attempt_message = get_lang('Attempts') . ' ' . $counter . ' / ' . $objExercise->selectAttempts(); if ($counter == $objExercise->selectAttempts()) { $attempt_message = Display::return_message($attempt_message, 'error'); } else { $attempt_message = Display::return_message($attempt_message, 'info'); } if ($visible_return['value'] == true) { $message .= $attempt_message; } } if ($time_control) { $html .= $objExercise->returnTimeLeftDiv();