Allow define PDF signatures - refs BT#12441

remotes/angel/1.11.x
Angel Fernando Quiroz Campos 8 years ago
parent 0d6deaf9e1
commit 8ff55e2077
  1. 8
      app/Resources/public/css/print.css
  2. 1
      main/admin/teacher_time_report.php
  3. 2
      main/attendance/attendance_controller.php
  4. 4
      main/course_progress/thematic_controller.php
  5. 1
      main/gradebook/gradebook_display_summary.php
  6. 1
      main/gradebook/index.php
  7. 3
      main/gradebook/lib/GradebookUtils.php
  8. 2
      main/inc/lib/pdf.lib.php
  9. 26
      main/template/default/export/table_pdf.tpl
  10. 1
      main/user/user.php
  11. 1
      main/work/work.lib.php

@ -680,10 +680,14 @@ table td {
}
table.full-width {
width: 100%;
border-collapse: collapse;
}
table.border-thin,
table.border-thin th,
table.border-thin td {
border: 1px solid #000000;
border: 1px solid #000;
border-collapse: collapse;
}
.text-center {
text-align: center;
}

@ -299,7 +299,6 @@ if (isset($_GET['export'])) {
switch ($_GET['export']) {
case 'pdf':
$params = array(
'add_signatures' => false,
'filename' => $fileName,
'pdf_title' => "$reportTitle - $reportSubTitle",
'pdf_description' => get_lang('TeacherTimeReport'),

@ -599,7 +599,7 @@ class AttendanceController
'filename' => get_lang('Attendance').'-'.api_get_local_time(),
'pdf_title' => $courseInfo['title'],
'course_code' => $courseInfo['code'],
'add_signatures' => true,
'add_signatures' => ['Drh', 'Teacher', 'Date'],
'orientation' => 'landscape',
'pdf_teachers' => $teacherName,
'pdf_course_category' => $courseCategory['name'],

@ -230,7 +230,7 @@ class ThematicController
$params = array(
'filename' => get_lang('Thematic').'-'.api_get_local_time(),
'pdf_title' => get_lang('Thematic'),
'add_signatures' => true,
'add_signatures' => ['Drh', 'Teacher', 'Date'],
'format' => 'A4-L',
'orientation' => 'L'
);
@ -253,7 +253,7 @@ class ThematicController
[
'filename' => get_lang('Thematic').'-'.api_get_local_time(),
'pdf_title' => get_lang('Thematic'),
'add_signatures' => true,
'add_signatures' => ['Drh', 'Teacher', 'Date'],
'format' => 'A4-L',
'orientation' => 'L'
]

@ -61,7 +61,6 @@ switch ($action) {
'course_info' => '',
'pdf_date' => '',
'course_code' => api_get_course_id(),
'add_signatures' => false,
'student_info' => null,
'show_grade_generated_date' => true,
'show_real_course_teachers' => false,

@ -950,7 +950,6 @@ if (isset($first_time) && $first_time == 1 && api_is_allowed_to_edit(null,true))
'session_info' => '',
'course_info' => '',
'pdf_date' => '',
'add_signatures' => false,
'student_info' => api_get_user_info(),
'show_grade_generated_date' => true,
'show_real_course_teachers' => false,

@ -958,7 +958,7 @@ class GradebookUtils
'filename' => get_lang('FlatView') . '_' . api_get_utc_datetime(),
'pdf_title' => $title,
'course_code' => $course_code,
'add_signatures' => true
'add_signatures' => ['Drh', 'Teacher', 'Date']
);
$page_format = $params['orientation'] == 'landscape' ? 'A4-L' : 'A4';
@ -1419,7 +1419,6 @@ class GradebookUtils
'course_info' => '',
'pdf_date' => '',
'course_code' => api_get_course_id(),
'add_signatures' => false,
'student_info' => $userInfo,
'show_grade_generated_date' => true,
'show_real_course_teachers' => false,

@ -48,7 +48,7 @@ class PDF
$this->params['course_info'] = isset($params['course_info']) ? $params['course_info'] : api_get_course_info();
$this->params['session_info'] = isset($params['session_info']) ? $params['session_info'] : api_get_session_info(api_get_session_id());
$this->params['course_code'] = isset($params['course_code']) ? $params['course_code'] : api_get_course_id();
$this->params['add_signatures'] = isset($params['add_signatures']) ? $params['add_signatures'] : false;
$this->params['add_signatures'] = isset($params['add_signatures']) ? $params['add_signatures'] : [];
$this->params['show_real_course_teachers'] = isset($params['show_real_course_teachers']) ? $params['show_real_course_teachers'] : false;
$this->params['student_info'] = isset($params['student_info']) ? $params['student_info'] : false;
$this->params['show_grade_generated_date'] = isset($params['show_grade_generated_date']) ? $params['show_grade_generated_date'] : false;

@ -81,27 +81,19 @@
{{ pdf_content }}
{% if add_signatures == true %}
{% if not add_signatures is empty %}
<br />
<br />
<table style="text-align:center" width="100%">
<table class="full-width">
<tr>
<td>
_____________________________
<br />
{{ "Drh" | get_lang }}
</td>
<td>
_____________________________
<br />
{{ "Teacher" | get_lang }}
</td>
<td>
_____________________________
<br />
{{ "Date" | get_lang }}
</td>
{% for signature in add_signatures %}
<td class="text-center">
_____________________________
<br />
{{ signature|get_lang }}
</td>
{% endfor %}
</tr>
</table>
{% endif %}

@ -397,7 +397,6 @@ if (api_is_allowed_to_edit(null, true)) {
array('style' => 'width:500px')
);
$params = array(
'add_signatures' => false,
'filename' => $fileName,
'pdf_title' => $pdfTitle,
'header_attributes' => $header_attributes

@ -5255,7 +5255,6 @@ function exportAllStudentWorkFromPublication(
'filename' => $workData['title'] . '_' . api_get_local_time(),
'pdf_title' => api_replace_dangerous_char($workData['title']),
'course_code' => $courseInfo['code'],
'add_signatures' => false
);
$pdf = new PDF('A4', null, $params);
$pdf->html_to_pdf_with_template($content);

Loading…
Cancel
Save