Merge remote-tracking branch 'origin/1.11.x' into 1.11.x

pull/2588/merge
Yannick Warnier 7 years ago
commit 5e16f981ee
  1. 4
      app/Resources/public/css/base.css
  2. 10
      main/exercise/exercise_show.php
  3. 20
      main/inc/lib/exercise.lib.php
  4. 12
      main/inc/lib/pear/HTML/QuickForm/checkbox.php
  5. 19
      main/template/default/mail/exercise_result_alert_body.tpl
  6. 18
      main/template/default/mail/footer.tpl
  7. 14
      main/template/default/mail/header.tpl
  8. 54
      main/template/default/mail/mail.tpl

@ -526,7 +526,9 @@ input[type=checkbox], input[type=radio] {
margin-right: 5px;
margin-top: 2px;
}
.checkbox_send_notification{
margin-bottom: 10px;
}
/* end chamilo forms fixes */
.actions {

@ -1049,7 +1049,7 @@ if ($isFeedbackAllowed && $origin != 'learnpath' && $origin != 'student_progress
'course' => Security::remove_XSS($_GET['cidReq']),
]);
$emailForm = new FormValidator('myform', 'post', $formUrl, '', ['id' => 'myform']);
$emailForm = new FormValidator('form-email', 'post', $formUrl, '', ['id' => 'form-email']);
$emailForm->addHidden('lp_item_id', $learnpath_id);
$emailForm->addHidden('lp_item_view_id', $lp_item_view_id);
$emailForm->addHidden('student_id', $student_id);
@ -1065,11 +1065,11 @@ if ($isFeedbackAllowed && $origin != 'learnpath' && $origin != 'student_progress
]);
$emailForm = new FormValidator(
'myform',
'form-email',
'post',
$formUrl,
'',
['id' => 'myform']
['id' => 'form-email']
);
}
@ -1079,13 +1079,13 @@ if ($isFeedbackAllowed && $origin != 'learnpath' && $origin != 'student_progress
get_lang('SendEmail'),
['onclick' => 'openEmailWrapper();']
);
$emailForm->addHtml('<span id="email_content_wrapper" style="display:none">');
$emailForm->addHtml('<div id="email_content_wrapper" style="display:none; margin-bottom: 20px;">');
$emailForm->addHtmlEditor(
'notification_content',
get_lang('Content'),
false
);
$emailForm->addHtml('</span>');
$emailForm->addHtml('</div>');
if (empty($track_exercise_info['orig_lp_id']) || empty($track_exercise_info['orig_lp_item_id'])) {
// Default url

@ -4972,16 +4972,16 @@ EOT;
PERSON_NAME_EMAIL_ADDRESS
);
$message = '<p>'.get_lang('DearStudentEmailIntroduction').'</p><p>'.get_lang('AttemptVCC');
$message .= '<h3>'.get_lang('CourseName').'</h3><p>'.Security::remove_XSS($course_info['name']).'';
$message .= '<h3>'.get_lang('Exercise').'</h3><p>'.Security::remove_XSS($test);
$message .= '<p>'.get_lang('ClickLinkToViewComment').' <br /><a href="#url#">#url#</a><br />';
$message .= '<p>'.get_lang('Regards').'</p>';
$message .= $from_name;
$message = str_replace("#test#", Security::remove_XSS($test), $message);
$message = str_replace("#url#", $url, $message);
return $message;
$view = new Template('', false, false, false, false, false, false);
$view->assign('course_title', Security::remove_XSS($course_info['name']));
$view->assign('test_title', Security::remove_XSS($test));
$view->assign('url', $url );
$view->assign('teacher_name', $from_name);
$template = $view->get_template('mail/exercise_result_alert_body.tpl');
return $view->fetch($template);
}
/**

@ -140,13 +140,11 @@ class HTML_QuickForm_checkbox extends HTML_QuickForm_input
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
$labelClass = $this->labelClass;
$checkboxClass = $this->checkboxClass;
$label ='
<div class="'.$checkboxClass.'">
<label class="'.$labelClass.'">' .
HTML_QuickForm_input::toHtml().$this->_text.
$className = $this->checkboxClass;
$name = $this->_attributes['name'];
$label ='<div id="'.$name.'" class="'.$className.'_'.$name.'">
<label>' .
HTML_QuickForm_input::toHtml().' '.$this->_text.
'</label>
</div>
';

@ -0,0 +1,19 @@
<div id="email-message" style="padding-top:10px; padding-bottom:10px;">
<p><strong>{{ 'DearStudentEmailIntroduction'|get_lang }}</strong> {{ 'AttemptVCC'|get_lang }} </p>
<div style="border-color: #bce8f1; padding: 15px; background-color: #d9edf7; margin-bottom: 15px; font-size: 16px; color:#31708f;">
<p>
<strong>{{ 'CourseName'|get_lang }}: </strong>
{{ course_title }}
<br>
<strong>{{ 'Exercise'|get_lang }}: </strong>
{{ test_title }}
</p>
</div>
<p>{{ 'ClickLinkToViewComment'|get_lang }}</p>
<p><a style="font-weight: bold; color: #2BA6CB;" href="{{ url }}">{{ url }}</a></p>
<div style="text-align: right;">
<p><strong>{{ 'Regards'|get_lang }}</strong><br>
{{ teacher_name }}</p>
</div>
</div>

@ -1,7 +1,11 @@
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td style="background-color: #2C3E50; border-bottom: 1px solid #2C3E50; box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.1);">
&nbsp;
</td>
</tr>
</table>
<div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
<tr>
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
<a style="color: #999999; font-size: 12px; text-align: center; text-decoration: none;" href="{{_p.web}}" target="_blank">
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
</a>&copy; {{ "now"|date("Y") }}
</td>
</tr>
</table>
</div>

@ -1,9 +1,5 @@
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td width="245" {{ mail_header_style }}>
{{ logo }}
</td>
<td width="100%"> &nbsp;
</td>
</tr>
</table>
<div id="logo-header" {{ mail_header_style }}>
<div style="margin-bottom: 20px; margin-top: 10px;">
{{ logo }}
</div>
</div>

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{ _s.institution }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="application/ld+json">
{
"@context": "http://schema.org",
@ -16,31 +16,39 @@
}
</script>
</head>
<body style="margin: 0; padding: 0; ">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;">
<body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;">
<div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;">
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
<!-- START MAIN CONTENT AREA -->
<tr>
<td>
{% include 'mail/header.tpl'|get_template %}
</td>
</tr>
<tr>
<td cellpadding="0" cellspacing="0" style="padding: 40px 10px">
<span {{ mail_content_style }}>
{{ content }}
</span>
</td>
</tr>
<tr>
<td>
{% include 'mail/footer.tpl'|get_template %}
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
<!-- START HEADER LOGO -->
{% include 'mail/header.tpl'|get_template %}
<!-- END HEADER LOGO -->
<div {{ mail_content_style }}>
{{ content }}
</div>
</td>
</tr>
</table>
</td>
</tr>
<!-- END MAIN CONTENT AREA -->
</table>
</td>
</tr>
</table>
<!-- START FOOTER -->
{% include 'mail/footer.tpl'|get_template %}
<!-- END FOOTER -->
</div>
</td>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
</tr>
</table>
</body>
</html>

Loading…
Cancel
Save