Commit becdc553 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add empty default my goals strings to language pack, so they can be overridden...


Add empty default my goals strings to language pack, so they can be overridden by local customisations
Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 8de1ba51
......@@ -35,22 +35,27 @@ require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
require_once(get_config('docroot') . 'artefact/lib.php');
$personal = null;
$academic = null;
$career = null;
try {
$personal = artefact_instance_from_type('personalgoal');
$personal = artefact_instance_from_type('personalgoal');
$personal = $personal->get('description');
}
catch (Exception $e) {
$personal = get_string('defaultpersonalgoal', 'artefact.resume');
}
catch (Exception $e) {}
try {
$academic = artefact_instance_from_type('academicgoal');
$academic = $academic->get('description');
}
catch (Exception $e) {
$academic = get_string('defaultacademicgoal', 'artefact.resume');
}
catch (Exception $e) {}
try {
$career = artefact_instance_from_type('careergoal');
$career = $career->get('description');
}
catch (Exception $e) {
$career = get_string('defaultcareergoal', 'artefact.resume');
}
catch (Exception $e) {}
$gform = array(
'name' => 'goalform',
'jsform' => true,
......@@ -62,21 +67,21 @@ $gform = array(
'type' => 'wysiwyg',
'rows' => 10,
'cols' => 65,
'defaultvalue' => ((!empty($personal)) ? $personal->get('description') : null),
'defaultvalue' => $personal,
'title' => get_string('personalgoal', 'artefact.resume'),
),
'academicgoal' => array(
'type' => 'wysiwyg',
'rows' => 10,
'cols' => 65,
'defaultvalue' => ((!empty($academic)) ? $academic->get('description') : null),
'defaultvalue' => $academic,
'title' => get_string('academicgoal', 'artefact.resume'),
),
'careergoal' => array(
'type' => 'wysiwyg',
'rows' => 10,
'cols' => 65,
'defaultvalue' => ((!empty($career)) ? $career->get('description') : null),
'defaultvalue' => $career,
'title' => get_string('careergoal', 'artefact.resume'),
),
'submit' => array(
......
......@@ -75,6 +75,9 @@ $string['backtoresume'] = 'Back to My Resumé';
$string['personalgoal'] = 'Personal Goals';
$string['academicgoal'] = 'Academic Goals';
$string['careergoal'] = 'Career Goals';
$string['defaultpersonalgoal'] = '';
$string['defaultacademicgoal'] = '';
$string['defaultcareergoal'] = '';
$string['personalskill'] = 'Personal Skills';
$string['academicskill'] = 'Academic Skills';
$string['workskill'] = 'Work Skills';
......
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