";
- echo "
";
- /// Print Section
- foreach ($certificate as $certrecord) {
- $certificatedate = userdate($certrecord->timecreated);
- echo '' . get_string('certificate', 'block_verify_certificate') . ' ' . $certrecord->code . '
';
- echo '' . get_string('to', 'block_verify_certificate') . ': ' . $certrecord->studentname . '
';
- echo '
' . get_string('course', 'block_verify_certificate') . ': ' . $certrecord->classname . '
';
- echo '
' . get_string('date', 'block_verify_certificate') . ': ' . $certificatedate . '
';
- if ($certrecord->reportgrade != null) {
- echo '' . get_string('grade', 'block_verify_certificate') . ': ' . $certrecord->reportgrade . '
';
- }
- }
- echo $OUTPUT->box_end();
- }
- echo $OUTPUT->footer();
\ No newline at end of file
+ echo "";
+ echo "
";
+ /// Print Section
+ foreach ($issues as $issue) {
+ if (!$certificate = $DB->get_record('certificate', array('id'=> $issue->certificateid))) {
+ print_error('course module is incorrect');
+ }
+ if (!$course = $DB->get_record('course', array('id'=> $certificate->course))) {
+ print_error('course is misconfigured');
+ }
+ if (!$user = $DB->get_record('user', array('id'=> $issue->userid))) {
+ print_error('user is unreachable');
+ }
+ $certificatedate = userdate($issue->timecreated);
+ echo '' . get_string('certificate', 'block_verify_certificate') . ' ' . $issue->code . '
';
+ echo '' . get_string('to', 'block_verify_certificate') . ': ' . fullname($user) . '
';
+ echo '
' . get_string('course', 'block_verify_certificate') . ': ' . $course->fullname . '
';
+ echo '
' . get_string('date', 'block_verify_certificate') . ': ' . $certificatedate . '
';
+ if ($certificate->customtext !== '') {
+ echo '' . get_string('customtext', 'block_verify_certificate') . ':
';
+ echo $certificate->customtext;
+ }
+ }
+ }
+ echo $OUTPUT->box_end();
+ echo $OUTPUT->footer();
diff --git a/lang/de/block_verify_certificate.php b/lang/de/block_verify_certificate.php
index e863964..67b6920 100644
--- a/lang/de/block_verify_certificate.php
+++ b/lang/de/block_verify_certificate.php
@@ -8,4 +8,4 @@ $string['to'] = 'Zuerkannt';
$string['course'] = 'Kurs';
$string['date'] = 'Am';
$string['grade'] = 'Bewertung';
-
+$string['customtext'] = 'Kurs details';
diff --git a/lang/en/block_verify_certificate.php b/lang/en/block_verify_certificate.php
index 577be95..4c91c98 100644
--- a/lang/en/block_verify_certificate.php
+++ b/lang/en/block_verify_certificate.php
@@ -8,4 +8,4 @@ $string['to'] = 'Awarded to';
$string['course'] = 'Course';
$string['date'] = 'On';
$string['grade'] = 'Grade';
-
+$string['customtext'] = 'Course details';
diff --git a/lang/pt_br/block_verify_certificate.php b/lang/pt_br/block_verify_certificate.php
index dcd37b4..b562690 100644
--- a/lang/pt_br/block_verify_certificate.php
+++ b/lang/pt_br/block_verify_certificate.php
@@ -8,4 +8,4 @@ $string['to'] = 'Emitido para';
$string['course'] = 'Curso';
$string['date'] = 'Data';
$string['grade'] = 'Nota';
-
+$string['customtext'] = 'Programa do curso';