Merge branch 'wip-MDL-55654-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2016-09-12 19:14:00 +02:00
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -437,10 +437,8 @@ function profile_list_datatypes() {
*/
function profile_list_categories() {
global $DB;
if (!$categories = $DB->get_records_menu('user_info_category', null, 'sortorder ASC', 'id, name')) {
$categories = array();
}
return $categories;
$categories = $DB->get_records_menu('user_info_category', null, 'sortorder ASC', 'id, name');
return array_map('format_string', $categories);
}
@@ -572,7 +570,7 @@ function profile_edit_field($id, $datatype, $redirect) {
if (empty($id)) {
$strheading = get_string('profilecreatenewfield', 'admin', $datatypes[$datatype]);
} else {
$strheading = get_string('profileeditfield', 'admin', $field->name);
$strheading = get_string('profileeditfield', 'admin', format_string($field->name));
}
// Print the page.
+1 -1
View File
@@ -81,7 +81,7 @@ switch ($action) {
// Ask for confirmation, as there is user data available for field.
$fieldname = $DB->get_field('user_info_field', 'name', array('id' => $id));
$optionsyes = array ('id' => $id, 'confirm' => 1, 'action' => 'deletefield', 'sesskey' => sesskey());
$strheading = get_string('profiledeletefield', 'admin', $fieldname);
$strheading = get_string('profiledeletefield', 'admin', format_string($fieldname));
$PAGE->navbar->add($strheading);
echo $OUTPUT->header();
echo $OUTPUT->heading($strheading);