Merge branch 'wip-MDL-45154-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE

This commit is contained in:
Dan Poltawski
2014-04-18 09:57:23 +08:00
2 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -418,7 +418,7 @@ function profile_list_categories() {
function profile_edit_category($id, $redirect) {
global $CFG, $DB, $OUTPUT;
require_once('index_category_form.php');
require_once($CFG->dirroot.'/user/profile/index_category_form.php');
$categoryform = new category_form();
if ($category = $DB->get_record('user_info_category', array('id'=>$id))) {
@@ -474,7 +474,7 @@ function profile_edit_field($id, $datatype, $redirect) {
$field->description = clean_text($field->description, $field->descriptionformat);
$field->description = array('text'=>$field->description, 'format'=>$field->descriptionformat, 'itemid'=>0);
require_once('index_field_form.php');
require_once($CFG->dirroot.'/user/profile/index_field_form.php');
$fieldform = new field_form(null, $field->datatype);
// Convert the data format for
+7 -7
View File
@@ -87,12 +87,11 @@ switch ($action) {
//normal form
}
/// Print the header
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('profilefields', 'admin'));
// Show all categories.
$categories = $DB->get_records('user_info_category', null, 'sortorder ASC');
/// Check that we have at least one category defined
if ($DB->count_records('user_info_category') == 0) {
// Check that we have at least one category defined.
if (empty($categories)) {
$defaultcategory = new stdClass();
$defaultcategory->name = $strdefaultcategory;
$defaultcategory->sortorder = 1;
@@ -100,8 +99,9 @@ if ($DB->count_records('user_info_category') == 0) {
redirect($redirect);
}
/// Show all categories
$categories = $DB->get_records('user_info_category', null, 'sortorder ASC');
// Print the header.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('profilefields', 'admin'));
foreach ($categories as $category) {
$table = new html_table();