#203 Removed 'issued' string and replaced with 'receiveddate'

Also renamed 'Received date' to 'Awarded on'.
This commit is contained in:
Mark Nelson 2018-06-18 18:39:29 +08:00
parent 9c633f1b28
commit aeee01b7be
5 changed files with 9 additions and 7 deletions

View file

@ -60,9 +60,9 @@ $table = new html_table();
if ($usesections = course_format_uses_sections($course->format)) { if ($usesections = course_format_uses_sections($course->format)) {
$table->head = array(get_string('sectionname', 'format_'.$course->format), get_string('name'), $table->head = array(get_string('sectionname', 'format_'.$course->format), get_string('name'),
get_string('issued', 'customcert')); get_string('receiveddate', 'customcert'));
} else { } else {
$table->head = array(get_string('name'), get_string('issued', 'customcert')); $table->head = array(get_string('name'), get_string('receiveddate', 'customcert'));
} }
$currentsection = ''; $currentsection = '';

View file

@ -94,7 +94,6 @@ $string['invalidposition'] = 'Please select a positive number for position {$a}.
$string['invalidheight'] = 'The height has to be a valid number greater than 0.'; $string['invalidheight'] = 'The height has to be a valid number greater than 0.';
$string['invalidmargin'] = 'The margin has to be a valid number greater than 0.'; $string['invalidmargin'] = 'The margin has to be a valid number greater than 0.';
$string['invalidwidth'] = 'The width has to be a valid number greater than 0.'; $string['invalidwidth'] = 'The width has to be a valid number greater than 0.';
$string['issued'] = 'Issued';
$string['landscape'] = 'Landscape'; $string['landscape'] = 'Landscape';
$string['leftmargin'] = 'Left margin'; $string['leftmargin'] = 'Left margin';
$string['leftmargin_help'] = 'This is the left margin of the certificate PDF in mm.'; $string['leftmargin_help'] = 'This is the left margin of the certificate PDF in mm.';
@ -135,7 +134,7 @@ $string['privacy:metadata:customcert_issues:timecreated'] = 'The time the certif
$string['privacy:metadata:customcert_issues:userid'] = 'The ID of the user who was issued the certificate'; $string['privacy:metadata:customcert_issues:userid'] = 'The ID of the user who was issued the certificate';
$string['rearrangeelements'] = 'Reposition elements'; $string['rearrangeelements'] = 'Reposition elements';
$string['rearrangeelementsheading'] = 'Drag and drop elements to change where they are positioned on the certificate.'; $string['rearrangeelementsheading'] = 'Drag and drop elements to change where they are positioned on the certificate.';
$string['receiveddate'] = 'Received date'; $string['receiveddate'] = 'Awarded on';
$string['refpoint'] = 'Reference point location'; $string['refpoint'] = 'Reference point location';
$string['refpoint_help'] = 'The reference point is the location of an element from which its x and y coordinates are determined. It is indicated by the \'+\' that appears in the centre or corners of the element.'; $string['refpoint_help'] = 'The reference point is the location of an element from which its x and y coordinates are determined. It is indicated by the \'+\' that appears in the centre or corners of the element.';
$string['replacetemplate'] = 'Replace'; $string['replacetemplate'] = 'Replace';

View file

@ -181,7 +181,7 @@ function customcert_user_outline($course, $user, $mod, $customcert) {
$result = new stdClass(); $result = new stdClass();
if ($issue = $DB->get_record('customcert_issues', array('customcertid' => $customcert->id, 'userid' => $user->id))) { if ($issue = $DB->get_record('customcert_issues', array('customcertid' => $customcert->id, 'userid' => $user->id))) {
$result->info = get_string('issued', 'customcert'); $result->info = get_string('receiveddate', 'customcert');
$result->time = $issue->timecreated; $result->time = $issue->timecreated;
} else { } else {
$result->info = get_string('notissued', 'customcert'); $result->info = get_string('notissued', 'customcert');
@ -205,7 +205,7 @@ function customcert_user_complete($course, $user, $mod, $customcert) {
if ($issue = $DB->get_record('customcert_issues', array('customcertid' => $customcert->id, 'userid' => $user->id))) { if ($issue = $DB->get_record('customcert_issues', array('customcertid' => $customcert->id, 'userid' => $user->id))) {
echo $OUTPUT->box_start(); echo $OUTPUT->box_start();
echo get_string('issued', 'customcert') . ": "; echo get_string('receiveddate', 'customcert') . ": ";
echo userdate($issue->timecreated); echo userdate($issue->timecreated);
echo $OUTPUT->box_end(); echo $OUTPUT->box_end();
} else { } else {

View file

@ -91,6 +91,9 @@
<%/showreport%> <%/showreport%>
<%#hasissues%> <%#hasissues%>
<ion-list> <ion-list>
<ion-list-header class="text-center">
{{ 'plugin.mod_customcert.receiveddate' | translate }}
</ion-list-header>
<%#issues%> <%#issues%>
<ion-item class="text-center"> <ion-item class="text-center">
{{ <% timecreated %> | coreToLocaleString }} {{ <% timecreated %> | coreToLocaleString }}

View file

@ -88,7 +88,7 @@ if (empty($action)) {
if ($issues = $DB->get_records('customcert_issues', array('userid' => $USER->id, 'customcertid' => $customcert->id))) { if ($issues = $DB->get_records('customcert_issues', array('userid' => $USER->id, 'customcertid' => $customcert->id))) {
$table = new html_table(); $table = new html_table();
$table->class = 'generaltable'; $table->class = 'generaltable';
$table->head = array(get_string('issued', 'customcert')); $table->head = array(get_string('receiveddate', 'customcert'));
$table->align = array('left'); $table->align = array('left');
$table->attributes = array('style' => 'width:20%; margin:auto'); $table->attributes = array('style' => 'width:20%; margin:auto');