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

pull/2487/head
Yannick Warnier 9 years ago
commit d3787dd4e9
  1. 18
      app/Resources/public/css/print.css
  2. 14
      main/exercise/question.class.php
  3. 2
      main/inc/lib/javascript/ckeditor/config_js.php
  4. 71
      main/inc/lib/pdf.lib.php
  5. 10
      main/template/default/export/pdf_footer.tpl

@ -691,3 +691,21 @@ table.border-thin td {
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
table.page-footer {
font-family: serif;
font-size: 10pt;
}
table.page-footer td{
padding: 0;
}
.border-top {
border-top: 1px solid #000;
}

@ -1572,13 +1572,21 @@ abstract class Question
// Categories
$tabCat = TestCategory::getCategoriesIdAndName();
$form->addElement('select', 'questionCategory', get_lang('Category'), $tabCat);
global $text;
switch ($this->type) {
case UNIQUE_ANSWER:
$form->addButton('convertAnswer', get_lang('ConvertToMultipleAnswer'), 'dot-circle-o', 'info');
$buttonGroup = array();
$buttonGroup[] = $form->addButton('convertAnswer', get_lang('ConvertToMultipleAnswer'), 'dot-circle-o', 'default', null, null, null, true);
$buttonGroup[] = $form->addButtonSave($text, 'submitQuestion', true);
$form->addGroup($buttonGroup);
break;
case MULTIPLE_ANSWER:
$form->addButton('convertAnswer', get_lang('ConvertToUniqueAnswer'), 'check-square-o', 'info');
$buttonGroup = array();
$buttonGroup[] = $form->addButton('convertAnswer', get_lang('ConvertToUniqueAnswer'), 'check-square-o', 'default');
$buttonGroup[] = $form->addButtonSave($text, 'submitQuestion', true);
$form->addGroup($buttonGroup);
break;
}

@ -14,5 +14,5 @@ $template->assign('moreButtonsInMaximizedMode', $moreButtonsInMaximizedMode);
$template->assign('course_condition', api_get_cidreq());
header('Content-type: application/x-javascript');
$template->display('default/javascript/editor/ckeditor/config_js.tpl');
$template->display($template->get_template('javascript/editor/ckeditor/config_js.tpl'));

@ -622,67 +622,16 @@ class PDF
*/
public function set_footer()
{
$this->pdf->defaultfooterfontsize = 12; // in pts
$this->pdf->defaultfooterfontstyle = 'B'; // blank, B, I, or BI
$this->pdf->defaultfooterline = 1; // 1 to include line below header/above footer
$platform_name = api_get_setting('Institution');
$left_content = $platform_name;
$center_content = '';
$right_content = '{PAGENO} / {nb}';
//@todo remove this and use a simpler way
$footer = array(
'odd' => array(
'L' => array(
'content' => $left_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'C' => array(
'content' => $center_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'R' => array(
'content' => $right_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'line' => 1,
),
'even' => array(
'L' => array(
'content' => $left_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'C' => array(
'content' => $center_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'R' => array(
'content' => $right_content,
'font-size' => 10,
'font-style' => 'B',
'font-family' => 'serif',
'color' => '#000000'
),
'line' => 1,
),
);
// defines footer for Odd and Even Pages - placed at Outer margin see http://mpdf1.com/manual/index.php?tid=151&searchstring=setfooter
$this->pdf->SetFooter($footer);
$this->pdf->defaultfooterfontsize = 12; // in pts
$this->pdf->defaultfooterfontstyle = 'B'; // blank, B, I, or BI
$this->pdf->defaultfooterline = 1; // 1 to include line below header/above footer
$view = new Template('', false, false, false, true, false, false);
$template = $view->get_template('export/pdf_footer.tpl');
$footerHTML = $view->fetch($template);
$this->pdf->SetHTMLFooter($footerHTML, 'E'); //Even pages
$this->pdf->SetHTMLFooter($footerHTML, 'O'); //Odd pages
}
/**

@ -0,0 +1,10 @@
<table border="0" class="full-width border-top page-footer">
<tr>
<td class="text-left">
<strong>{{ _s.institution }}</strong>
</td>
<td class="text-right">
<strong>{PAGENO} / {nb}</strong>
</td>
</tr>
</table>
Loading…
Cancel
Save