Commit 0cdc1ca3 authored by Nigel McNie's avatar Nigel McNie
Browse files

Export resume dates _only_ as labels.

We can't reliably convert them to exact RFC3339 dates, so we don't try
and risk breaking it.

Mahara import can import them straight back in.
parent 35a8f79d
......@@ -253,21 +253,6 @@ abstract class LeapExportElementResumeCompositeChild extends LeapExportElement {
$this->smarty->assign('artefactplugin', 'resume');
$this->smarty->assign('id', 'portfolio:' . $this->get_id());
foreach ($this->entrydata as $field => $value) {
if ($field == 'start' || $field == 'end') {
// Special case. Start and end are dates as per
// - but Mahara
// allows date input for resume items as text fields. So we try
// and coerce them into "real" dates if possible.
// Unfortunately, strtotime isn't a mind reader, so this is
// going to result in some invalid dates...
if (($date = strtotime($value)) === false) {
// TODO What to do when we can't establish a real date?
else {
$this->smarty->assign($field . '_date', PluginExportLeap::format_rfc3339_date($date));
$this->smarty->assign($field . '_label', $value);
$this->smarty->assign($field, $value);
$this->smarty->assign('leaptype', $this->get_leap_type());
{include file="export:leap:entry.tpl" skipfooter=true}
{if $start_date} <leap:date leap:point="start" leap:label="{$start_label|escape}">{$start_date|escape}</leap:date>
{if $start} <leap:date leap:point="start" leap:label="{$start|escape}"></leap:date>
{if $end_date} <leap:date leap:point="end" leap:label="{$end_label|escape}">{$end_date|escape}</leap:date>
{if $end} <leap:date leap:point="end" leap:label="{$end|escape}"></leap:date>
{include file="export:leap:entryfooter.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment