Merge branch 'MDL-38317-master' of git://github.com/StudiUM/moodle

This commit is contained in:
Sam Hemelryk 2013-09-17 08:39:14 +12:00
commit 0dd46bb851
3 changed files with 27 additions and 11 deletions

View File

@ -63,7 +63,8 @@ if ($id) {
$displaystring = null;
if (!empty($grade_item->itemmodule)) {
$displaystring = get_string('modulename', $grade_item->itemmodule).': '.$grade_item->get_name();
$displaystring = get_string('modulename', $grade_item->itemmodule).get_string('labelsep', 'langconfig')
.$grade_item->get_name();
} else {
$displaystring = $grade_item->get_name();
}

View File

@ -88,17 +88,22 @@ class grade_import_mapping_form extends moodleform {
}
$mform->addElement('select', 'mapfrom', get_string('mapfrom', 'grades'), $mapfromoptions);
$maptooptions = array('userid'=>'userid', 'username'=>'username', 'useridnumber'=>'useridnumber', 'useremail'=>'useremail', '0'=>'ignore');
$maptooptions = array(
'userid' => get_string('userid', 'grades'),
'username' => get_string('username'),
'useridnumber' => get_string('idnumber'),
'useremail' => get_string('email'),
'0' => get_string('ignore', 'grades')
);
$mform->addElement('select', 'mapto', get_string('mapto', 'grades'), $maptooptions);
$mform->addElement('header', 'general', get_string('mappings', 'grades'));
// add a comment option
$comments = array();
// Add a feedback option.
$feedbacks = array();
if ($gradeitems = $this->_customdata['gradeitems']) {
foreach ($gradeitems as $itemid => $itemname) {
$comments['feedback_'.$itemid] = 'comments for '.$itemname;
$feedbacks['feedback_'.$itemid] = get_string('feedbackforgradeitems', 'grades', $itemname);
}
}
@ -106,11 +111,16 @@ class grade_import_mapping_form extends moodleform {
$i = 0; // index
foreach ($header as $h) {
$h = trim($h);
// this is what each header maps to
$mform->addElement('selectgroups', 'mapping_'.$i, s($h),
array('others'=>array('0'=>'ignore', 'new'=>'new gradeitem'),
'gradeitems'=>$gradeitems,
'comments'=>$comments));
// This is what each header maps to.
$headermapsto = array(
get_string('others', 'grades') => array(
'0' => get_string('ignore', 'grades'),
'new' => get_string('newitem', 'grades')
),
get_string('gradeitems', 'grades') => $gradeitems,
get_string('feedbacks', 'grades') => $feedbacks
);
$mform->addElement('selectgroups', 'mapping_'.$i, s($h), $headermapsto);
$i++;
}
}

View File

@ -202,6 +202,8 @@ $string['feedback'] = 'Feedback';
$string['feedback_help'] = 'This box enables any comments about the grade to be added.';
$string['feedbackadd'] = 'Add feedback';
$string['feedbackedit'] = 'Edit feedback';
$string['feedbackforgradeitems'] = 'Feedback for {$a}';
$string['feedbacks'] = 'Feedbacks';
$string['feedbacksaved'] = 'Feedback saved';
$string['feedbackview'] = 'View feedback';
$string['finalgrade'] = 'Final grade';
@ -335,6 +337,7 @@ $string['chooseaction'] = 'Choose an action ...';
$string['choosecategory'] = 'Select category';
$string['identifier'] = 'Identify user by';
$string['idnumbers'] = 'ID numbers';
$string['ignore'] = 'Ignore';
$string['import'] = 'Import';
$string['importcsv'] = 'Import CSV';
$string['importcustom'] = 'Import as custom outcomes (only this course)';
@ -446,6 +449,7 @@ $string['numberofgrades'] = 'Number of grades';
$string['onascaleof'] = 'on a scale of {$a->grademin} to {$a->grademax}';
$string['operations'] = 'Operations';
$string['options'] = 'Options';
$string['others'] = 'Others';
$string['outcome'] = 'Outcome';
$string['outcome_help'] = 'This setting determines the outcome which this grade item will represent in the gradebook.';
$string['outcomeassigntocourse'] = 'Assign another outcome to this course';
@ -656,6 +660,7 @@ $string['usenoscale'] = 'Use no scale';
$string['usepercent'] = 'Use percent';
$string['user'] = 'User';
$string['usergrade'] = 'User {$a->fullname} ({$a->useridnumber}) on item {$a->gradeidnumber}';
$string['userid'] = 'User ID';
$string['userpreferences'] = 'User preferences';
$string['userenrolmentsuspended'] = 'User enrolment suspended';
$string['useweighted'] = 'Use weighted';