$string['cannotcreategroup'] = 'Error creating group';
$string['cannotcreatelangdir'] = 'Cannot create lang dir.';
$string['cannotcreatelangbase'] = 'Error: Could not create base lang directory.';
+$string['cannotcreatefield'] = 'Error creating new field';
$string['cannotcreatetempdir'] = 'Cannot create temp dir.';
$string['cannotcreatesitedir'] = 'Cannot create site folder. The site administrator needs to fix the file permissions.';
$string['cannotcreateuploaddir'] = 'Cannot create upload folder. The site administrator needs to fix the file permissions';
$string['cannotdeletelangcache'] = 'Language cache can not be deleted, please fix permissions in dataroot/cache/languages!';
$string['cannotdeletebackupids'] = 'Couldn\'t delete previous backup ids.';
$string['cannotdeletecap'] = 'Could not delete deprecated capability $a';
+$string['cannotdeletecate'] = 'Error while deliting category';
$string['cannotdeletecourse'] = 'You do not have the permission to delete this course.';
+$string['cannotdeletecustomfield'] = 'Error deleting custom field data';
$string['cannotdeleterole'] = 'It can not be deleted, because $a';
$string['cannotdeleterolewithid'] = 'Could not delete role with ID $a';
$string['cannotdownloadcomponents'] = 'Cannot download components.';
$string['cannotupdatecoursemodule'] = 'Could not update the course module with the correct section';
$string['cannotupdatecomment'] = 'Could not update this comment';
$string['cannotupdatecm'] = 'Could not update the course module with the correct section';
+$string['cannotupdatefield'] = 'Error updating field';
$string['cannotupdatelevel'] = 'Could not update the indent level on that course module';
$string['cannotupdategroup'] = 'Error updating group';
$string['cannotupdaterecord'] = 'Could not update record ID $a';
$strign['cannotupdatepasswordonextauth'] = 'Failed to update password on external auth: $a. See the server logs for more details.';
$string['cannotupdateplugincap'] = 'Could not update $a capabilities!';
$string['cannotupdateprofile'] = 'Error updating user record';
+$string['cannotupdatecustomprofile'] = 'Error updating user custom record';
$stirng['cannotupdaterss'] = 'Cannot update rss';
$string['cannotupdatesummary'] = 'Could not update the summary!';
$string['cannotupdatesubcate'] = 'Could not update a child category!';
* @return string the filtering condition or null if the filter is disabled
*/
function get_sql_filter($data) {
- print_error('Abstract method get_sql_filter() called - must be implemented');
+ print_error('mustbeoveride', 'debug', '', 'get_sql_filter');
}
/**
* @return mixed array filter data or false when filter not set
*/
function check_data($formdata) {
- print_error('Abstract method check_data() called - must be implemented');
+ print_error('mustbeoveride', 'debug', '', 'check_data');
}
/**
* @param object $mform a MoodleForm object to setup
*/
function setupForm(&$mform) {
- print_error('Abstract method setupForm() called - must be implemented');
+ print_error('mustbeoveride', 'debug', '', 'setupForm');
}
/**
* @return string active filter label
*/
function get_label($data) {
- print_error('Abstract method get_label() called - must be implemented');
+ print_error('mustbeoveride', 'debug', '', 'get_label');
}
}
if (empty($data->id)) {
unset($data->id);
if (!$data->id = $DB->insert_record('user_info_field', $data)) {
- print_error('Error creating new field');
+ print_error('cannotcreatefield');
}
} else {
if (!$DB->update_record('user_info_field', $data)) {
- print_error('Error updating field');
+ print_error('cannotupdatefield');
}
}
}
/// Retrieve the category
if (!$category = $DB->get_record('user_info_category', array('id'=>$id))) {
- print_error('Incorrect category id');
+ print_error('invalidcategoryid');
}
if (!$categories = $DB->get_records('user_info_category', null, 'sortorder ASC')) {
- print_error('Error no categories!?!?');
+ print_error('nocate', 'debug');
}
unset($categories[$category->id]);
/// Finally we get to delete the category
if (!$DB->delete_records('user_info_category', array('id'=>$category->id))) {
- print_error('Error while deliting category');
+ print_error('cannotdeletecate');
}
profile_reorder_categories();
return true;
/// Remove any user data associated with this field
if (!$DB->delete_records('user_info_data', array('fieldid'=>$id))) {
- print_error('Error deleting custom field data');
+ print_error('cannotdeletecustomfield');
}
/// Try to remove the record from the database
unset($data->id);
$data->sortorder = $DB->count_records('user_info_category') + 1;
if (!$DB->insert_record('user_info_category', $data, false)) {
- print_error('There was a problem adding the record to the database');
+ print_error('cannotinsertcategory');
}
} else {
if (!$DB->update_record('user_info_category', $data)) {
- print_error('There was a problem updating the record in the database');
+ print_error('cannotupdatecategory');
}
}
profile_reorder_categories();
* @param form instance of the moodleform class
*/
function edit_field_add(&$mform) {
- print_error('mustbeoveride', 'debug');
+ print_error('mustbeoveride', 'debug', '', 'edit_field_add');
}