Fixing 'next' button in exercises the right way (excessive commas) - refs BT#5728

skala
Yannick Warnier 12 years ago
parent 172e71a311
commit 488ef3e727
  1. 2
      main/exercice/exercise.class.php
  2. 4
      main/exercice/exercise_submit.php
  3. 35
      main/inc/lib/template.lib.php
  4. 4
      main/template/default/layout/head.tpl

@ -3892,4 +3892,4 @@ class Exercise {
}
return $list;
}
}
}

@ -922,7 +922,7 @@ if (!empty($error)) {
} else {
$("#save_all_reponse").html("'.addslashes(Display::return_icon('wrong.gif')).'");
}
},
}
});
return false;
}
@ -1049,4 +1049,4 @@ if ($origin != 'learnpath') {
Display :: display_footer();
} else {
echo '</body></html>';
}
}

@ -425,7 +425,10 @@ class Template {
$logo = return_logo($this->theme);
$this->assign('logo', $logo);
}
/**
* Declare and define the template variable that will be used to load
* javascript libraries in the header.
*/
function set_js_files() {
global $disable_js_and_css_files, $htmlHeadXtra;
@ -437,7 +440,7 @@ class Template {
'thickbox.js',
'bootstrap/bootstrap.js',
);
if (api_is_global_chat_enabled()) {
//Do not include the global chat in LP
if ($this->show_learnpath == false && $this->show_footer == true && $this->hide_global_chat == false) {
@ -479,6 +482,31 @@ class Template {
$this->assign('extra_headers', $extra_headers);
}
}
/**
* Special function to declare last-minute JS libraries which depend on
* other things to be declared first. In particular, it might be useful
* under IE9 with compatibility mode, which for some reason is getting
* upset when a variable is used in a function (even if not used yet)
* when this variable hasn't been defined yet.
*/
function set_js_files_post() {
global $disable_js_and_css_files, $htmlHeadXtra;
$js_files = array();
if (api_is_global_chat_enabled()) {
//Do not include the global chat in LP
if ($this->show_learnpath == false && $this->show_footer == true && $this->hide_global_chat == false) {
$js_files[] = 'chat/js/chat.js';
}
}
$js_file_to_string = null;
foreach ($js_files as $js_file) {
$js_file_to_string .= api_get_js($js_file);
}
if (!$disable_js_and_css_files) {
$this->assign('js_file_to_string_post', $js_file_to_string);
}
}
/**
* Set header parameters
@ -533,6 +561,7 @@ class Template {
//Setting the theme and CSS files
$this->set_css_files();
$this->set_js_files();
//$this->set_js_files_post();
// Implementation of prefetch.
// See http://cdn.chamilo.org/main/img/online.png for details
@ -770,4 +799,4 @@ class Template {
public function display($template) {
echo $this->twig->render($template, $this->params);
}
}
}

@ -227,7 +227,7 @@ $(function() {
autoHeight: false,
active: false, // all items closed by default
collapsible: true,
header: ".accordion-heading",
header: ".accordion-heading"
})
//Global popup
@ -302,4 +302,4 @@ $(function() {
});*/
});
</script>
{{ header_extra_content }}
{{ header_extra_content }}

Loading…
Cancel
Save