Merge branch 'preprodparkur' of github.com:chamilo/chamilo-lms into preprodparkur

pull/4101/head
Julio Montoya 6 years ago
commit f5cdf49b99
  1. 8
      app/Resources/public/css/base.css
  2. 13
      main/exercise/exercise_result.php
  3. 11
      main/exercise/exercise_submit.php
  4. 1
      main/inc/lib/template.lib.php
  5. 2
      main/template/default/layout/page.tpl
  6. 2
      main/template/default/layout/show_header.tpl

@ -36,6 +36,14 @@ body {
margin-bottom: 10px; margin-bottom: 10px;
} }
body.page_origin_embeddable {
padding-top: 10px;
}
body.page_origin_embeddable #cm-content > .container {
margin-bottom: 0px;
padding-bottom: 0px;
}
.footer > .container { .footer > .container {
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;

@ -89,11 +89,6 @@ if (!in_array($origin, ['learnpath', 'embeddable'])) {
// So we are not in learnpath tool // So we are not in learnpath tool
Display::display_header($nameTools, get_lang('Exercise')); Display::display_header($nameTools, get_lang('Exercise'));
} else { } else {
$htmlHeadXtra[] = "
<style>
body { background: none;}
</style>
";
Display::display_reduced_header(); Display::display_reduced_header();
} }
@ -229,7 +224,7 @@ if (!in_array($origin, ['learnpath', 'embeddable'])) {
} }
Session::write('attempt_remaining', $remainingMessage); Session::write('attempt_remaining', $remainingMessage);
showEmbeddableFinishButton(); //showEmbeddableFinishButton();
Display::display_reduced_footer(); Display::display_reduced_footer();
} else { } else {
$lp_mode = Session::read('lp_mode'); $lp_mode = Session::read('lp_mode');
@ -260,12 +255,12 @@ function showEmbeddableFinishButton()
echo Display::tag( echo Display::tag(
'p', 'p',
Display::toolbarButton( Display::toolbarButton(
get_lang('EndTest'), get_lang('GoBackToVideo'),
'#', '#',
'times', 'undo',
'warning', 'warning',
['role' => 'button', 'class' => 'btn-close-quiz'] ['role' => 'button', 'class' => 'btn-close-quiz']
), ),
['class' => 'text-right'] ['class' => 'text-center']
); );
} }

@ -863,7 +863,6 @@ if (!in_array($origin, ['learnpath', 'embeddable'])) { //so we are not in learnp
Display::display_header(null, 'Exercises'); Display::display_header(null, 'Exercises');
} else { } else {
$htmlHeadXtra[] = "<style> body { background: none;} </style> ";
Display::display_reduced_header(); Display::display_reduced_header();
echo '<div style="height:10px">&nbsp;</div>'; echo '<div style="height:10px">&nbsp;</div>';
} }
@ -1125,6 +1124,16 @@ if (!empty($error)) {
return event.keyCode != 13; return event.keyCode != 13;
}); });
$(".checkCalculatedQuestionOnEnter").keypress(function(event) {
if (event.keyCode === 13) {
event.preventDefault();
var id = $(this).attr("id");
var parts = id.split("_");
var buttonId = "button_" + parts[1];
document.getElementById(buttonId).click();
}
});
$(".main_question").mouseover(function() { $(".main_question").mouseover(function() {
//$(this).find(".exercise_save_now_button").show(); //$(this).find(".exercise_save_now_button").show();
//$(this).addClass("question_highlight"); //$(this).addClass("question_highlight");

@ -984,6 +984,7 @@ class Template
*/ */
public function display($template, $clearFlashMessages = true) public function display($template, $clearFlashMessages = true)
{ {
$this->assign('page_origin', api_get_origin());
$this->assign('flash_messages', Display::getFlashToString()); $this->assign('flash_messages', Display::getFlashToString());
if ($clearFlashMessages) { if ($clearFlashMessages) {

@ -9,7 +9,7 @@
{% include 'layout/head.tpl'|get_template %} {% include 'layout/head.tpl'|get_template %}
{% endblock %} {% endblock %}
</head> </head>
<body> <body class="{{ 'page_origin' ? ('page_origin_' ~ page_origin) : '' }}">
<!-- START MAIN --> <!-- START MAIN -->
<main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}"> <main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
<noscript>{{ "NoJavascript"|get_lang }}</noscript> <noscript>{{ "NoJavascript"|get_lang }}</noscript>

@ -9,7 +9,7 @@
{% include 'layout/head.tpl'|get_template %} {% include 'layout/head.tpl'|get_template %}
{% endblock %} {% endblock %}
</head> </head>
<body> <body class="{{ 'page_origin' ? ('page_origin_' ~ page_origin) : '' }}">
<!-- START MAIN --> <!-- START MAIN -->
<main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}"> <main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">

Loading…
Cancel
Save