Changing exercise pagination colors

skala
Julio Montoya 12 years ago
parent 283b7252c3
commit 5cad46a66f
  1. 10
      main/css/base.css
  2. 8
      main/exercice/exercise.class.php
  3. 7
      main/exercice/exercise_reminder.php
  4. 1
      main/exercice/exercise_submit.php
  5. 5
      main/inc/lib/display.lib.php
  6. 8
      main/inc/lib/exercise.lib.php

@ -5149,15 +5149,14 @@ i.size-32.icon-new-work {
margin-bottom: 15px;
}
.pagination .current a {
font-size: 120%;
cursor: default;
background-color: #3a87ad !important;
}
.pagination .before a, .pagination .before a:hover {
background-color: #028DC2;
color:white;
background-color: #999;
color: white;
}
.pagination .after a, .pagination .after a:hover {
@ -5166,7 +5165,8 @@ i.size-32.icon-new-work {
}
.pagination .remind a {
text-decoration: underline;
/* text-decoration: underline; */
background-color: #f89406
}
.pagination .not_answered a , .pagination .not_answered a:hover {

@ -2267,7 +2267,7 @@ class Exercise
return $id;
}
public function show_button($question_id, $questionNum, $questions_in_media = array())
public function show_button($question_id, $questionNum, $questions_in_media = array(), $remindList = array())
{
global $origin, $safe_lp_id, $safe_lp_item_id, $safe_lp_item_view_id;
$nbrQuestions = $this->get_count_question_list();
@ -2284,7 +2284,7 @@ class Exercise
}
$html .= '<br />';
} else {
//User
// User
if (api_is_allowed_to_session_edit()) {
if ($this->type == ALL_ON_ONE_PAGE || $nbrQuestions == $questionNum) {
if ($this->review_answers) {
@ -2302,9 +2302,7 @@ class Exercise
if ($this->type == ONE_PER_PAGE) {
if ($questionNum != 1) {
$prev_question = $questionNum - 2;
$all_button .= '<a href="javascript://" class="btn" onclick="previous_question_and_save('.$prev_question.', '.$question_id.' ); ">'.get_lang(
'PreviousQuestion'
).'</a>';
$all_button .= '<a href="javascript://" class="btn" onclick="previous_question_and_save('.$prev_question.', '.$question_id.' ); ">'.get_lang('PreviousQuestion').'</a>';
}
//Next question

@ -154,8 +154,8 @@ $remind_list = $exercise_stat_info['questions_to_check'];
$remind_list = explode(',', $remind_list);
echo Display::label(get_lang('QuestionWithNoAnswer'), 'warning');
echo ' ';
echo Display::label(get_lang('Categories'), 'info');
//echo ' ';
//echo Display::label(get_lang('Categories'), 'info');
echo '<hr>';
echo '<div class="clear"></div><br />';
@ -229,8 +229,7 @@ foreach ($question_list as $questionId) {
}
if (!empty($rootCategories)) {
$rootCategories = Display::label($rootCategories, 'info').'';
$table .= '<li class="nav-header">'.$rootCategories.'</li>';
$table .= '<li class="nav-header"><h5>'.$rootCategories.'</h5></li>';
}
$question_title = Display::tag('label', $checkbox.$question_title, $label_attributes);

@ -889,6 +889,7 @@ if ($objExercise->type == ONE_PER_PAGE) {
$current_question = isset($values[$remind_question_id]) ? $values[$remind_question_id] + 1 : $values[$fixedRemindList[0]] +1;
}
echo Display::progress_pagination_bar($questionList, $current_question, $conditions, $link);
echo Display::label(get_lang('Answered'), 'success').' '.Display::label(get_lang('Unanswered')).' '.Display::label(get_lang('ToReview'), 'warning').' '.Display::label(get_lang('CurrentQuestion'), 'info');
//var_dump($category_list);
}

@ -1736,8 +1736,9 @@ class Display
$class = "active";
if ($counter < $current) {
$class = "before";
// $class = "before";
}
$class = "before";
foreach ($conditions as $condition) {
$array = $condition['items'];
@ -1762,7 +1763,7 @@ class Display
}
if ($counter > $current) {
$class = "after";
//$class = "after";
}
if (empty($link)) {

@ -2610,7 +2610,7 @@ class ExerciseLib
}
public static function render_question(
$objExercise,
Exercise $objExercise,
$questionId,
$attempt_list,
$remind_list,
@ -2656,7 +2656,7 @@ class ExerciseLib
// Button save and continue
switch ($objExercise->type) {
case ONE_PER_PAGE:
$exercise_actions .= $objExercise->show_button($questionId, $current_question);
$exercise_actions .= $objExercise->show_button($questionId, $current_question, null, $remind_list);
break;
case ALL_ON_ONE_PAGE :
$button = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\'); ">'.get_lang('SaveForNow').'</a>';
@ -2678,13 +2678,13 @@ class ExerciseLib
}
}
//Checkbox review answers
// Checkbox review answers
if ($objExercise->review_answers && !in_array($question_obj->type, Question::question_type_no_review())) {
$remind_question_div = Display::tag('label', Display::input('checkbox', 'remind_list['.$questionId.']', '', $attributes).get_lang('ReviewQuestionLater'), array('class' => 'checkbox', 'for' =>'remind_list['.$questionId.']'));
$exercise_actions .= Display::div($remind_question_div, array('class'=>'exercise_save_now_button'));
}
echo Display::div(' ', array('class'=>'clear'));
echo Display::div(' ', array('class'=>'clear'));
if ($objExercise->type == ONE_PER_PAGE) {
if (empty($questions_in_media)) {

Loading…
Cancel
Save