|
|
|
@ -441,9 +441,9 @@ $total = $total_exercises + $hp_count; |
|
|
|
|
$token = Security::get_token(); |
|
|
|
|
if ($is_allowedToEdit && $origin != 'learnpath') { |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise_admin.php?'.api_get_cidreq().'">'. |
|
|
|
|
Display :: return_icon('new_exercice.png', get_lang('NewEx'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
Display::return_icon('new_exercice.png', get_lang('NewEx'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/question_create.php?'.api_get_cidreq().'">'. |
|
|
|
|
Display :: return_icon('new_question.png', get_lang('AddQ'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
Display::return_icon('new_question.png', get_lang('AddQ'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
// Question category |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/tests_category.php?'.api_get_cidreq().'">'; |
|
|
|
|
echo Display::return_icon('green_open.png', get_lang('QuestionCategory'), '', ICON_SIZE_MEDIUM); |
|
|
|
@ -454,11 +454,11 @@ if ($is_allowedToEdit && $origin != 'learnpath') { |
|
|
|
|
|
|
|
|
|
//echo Display::url(Display::return_icon('looknfeel.png', get_lang('Media')), 'media.php?' . api_get_cidreq()); |
|
|
|
|
// end question category |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/hotpotatoes.php?'.api_get_cidreq().'">'.Display :: return_icon('import_hotpotatoes.png', get_lang('ImportHotPotatoesQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/hotpotatoes.php?'.api_get_cidreq().'">'.Display::return_icon('import_hotpotatoes.png', get_lang('ImportHotPotatoesQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
// link to import qti2 ... |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/qti2.php?'.api_get_cidreq().'">'.Display :: return_icon('import_qti2.png', get_lang('ImportQtiQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/aiken.php?'.api_get_cidreq().'">'.Display :: return_icon('import_aiken.png', get_lang('ImportAikenQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/upload_exercise.php?'.api_get_cidreq().'">'.Display :: return_icon('import_excel.png', get_lang('ImportExcelQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/qti2.php?'.api_get_cidreq().'">'.Display::return_icon('import_qti2.png', get_lang('ImportQtiQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/aiken.php?'.api_get_cidreq().'">'.Display::return_icon('import_aiken.png', get_lang('ImportAikenQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/upload_exercise.php?'.api_get_cidreq().'">'.Display::return_icon('import_excel.png', get_lang('ImportExcelQuiz'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
echo Display::url( |
|
|
|
|
Display::return_icon( |
|
|
|
|
'clean_all.png', |
|
|
|
@ -482,16 +482,16 @@ if ($total > $limit) { |
|
|
|
|
echo '<div style="float:right;height:20px;">'; |
|
|
|
|
//show pages navigation link for previous page |
|
|
|
|
if ($page) { |
|
|
|
|
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&page=".($page - 1)."\">".Display :: return_icon('action_prev.png', get_lang('PreviousPage'))."</a>"; |
|
|
|
|
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&page=".($page - 1)."\">".Display::return_icon('action_prev.png', get_lang('PreviousPage'))."</a>"; |
|
|
|
|
} elseif ($total_exercises + $hp_count > $limit) { |
|
|
|
|
echo Display :: return_icon('action_prev_na.png', get_lang('PreviousPage')); |
|
|
|
|
echo Display::return_icon('action_prev_na.png', get_lang('PreviousPage')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//show pages navigation link for previous page |
|
|
|
|
if ($total_exercises > $from + $limit || $hp_count > $from + $limit) { |
|
|
|
|
echo ' '."<a href=\"".api_get_self()."?".api_get_cidreq()."&page=".($page + 1)."\">".Display::return_icon('action_next.png', get_lang('NextPage'))."</a>"; |
|
|
|
|
} elseif ($page) { |
|
|
|
|
echo ' '.Display :: return_icon('action_next_na.png', get_lang('NextPage')); |
|
|
|
|
echo ' '.Display::return_icon('action_next_na.png', get_lang('NextPage')); |
|
|
|
|
} |
|
|
|
|
echo '</div>'; |
|
|
|
|
} |
|
|
|
@ -734,7 +734,7 @@ if (!empty($exerciseList)) { |
|
|
|
|
|
|
|
|
|
// Exercise results |
|
|
|
|
$actions .='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
|
|
|
Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
// Export |
|
|
|
|
$actions .= Display::url( |
|
|
|
@ -816,7 +816,7 @@ if (!empty($exerciseList)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$actions .='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
|
|
|
Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$actions .= Display::url(Display::return_icon('cd.gif', get_lang('CopyExercise')), '', array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToCopy'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=copy_exercise&sec_token='.$token.'&exerciseId='.$row['id'])); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1015,7 +1015,7 @@ if (!empty($exerciseList)) { |
|
|
|
|
} else { |
|
|
|
|
if ($isDrhOfCourse) { |
|
|
|
|
$actions ='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
|
|
|
Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$item .= Display::tag('td', $actions, array('class' => 'td_actions')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1106,7 +1106,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) { |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$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>'; |
|
|
|
|
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
// if active |
|
|
|
|
if ($active) { |
|
|
|
@ -1145,7 +1145,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) { |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
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>'; |
|
|
|
|
$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; |
|
|
|
@ -1158,7 +1158,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) { |
|
|
|
|
|
|
|
|
|
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>'; |
|
|
|
|
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
$item .= Display::tag('td', $actions, array('class' => 'td_actions')); |
|
|
|
|
} |
|
|
|
|