Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 94 - Invalid property requested: url #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions classes/form/enrolkey_profile_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,46 +57,6 @@ public function definition() {
$mform->addElement('header', 'moodle_optional', get_string('optional', 'form'));
$mform->setExpanded('moodle_optional', false);

$mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"');
$mform->setType('url', core_user::get_property_type('url'));

$removedfields = [];
if (defined('core_user::REMOVED_FIELDS')) {
$removedfields = core_user::REMOVED_FIELDS;
}

// Fields that might not exist, such as in Totara 13+.
if (!isset($removedfields['icq'])) {
$mform->addElement('text', 'icq', get_string('icqnumber'), 'maxlength="15" size="25"');
$mform->setType('icq', core_user::get_property_type('icq'));
$mform->setForceLtr('icq');
}

$mform->addElement('text', 'skype', get_string('skypeid'), 'maxlength="50" size="25"');
$mform->setType('skype', core_user::get_property_type('skype'));
$mform->setForceLtr('skype');

// Fields that might not exist, such as in Totara 13+.
if (!isset($removedfields['aim'])) {
$mform->addElement('text', 'aim', get_string('aimid'), 'maxlength="50" size="25"');
$mform->setType('aim', core_user::get_property_type('aim'));
$mform->setForceLtr('aim');
}

// Fields that might not exist, such as in Totara 13+.
if (!isset($removedfields['yahoo'])) {
$mform->addElement('text', 'yahoo', get_string('yahooid'), 'maxlength="50" size="25"');
$mform->setType('yahoo', core_user::get_property_type('yahoo'));
$mform->setForceLtr('yahoo');
}

// Fields that might not exist, such as in Totara 13+.
if (!isset($removedfields['msn'])) {
$mform->addElement('text', 'msn', get_string('msnid'), 'maxlength="50" size="25"');
$mform->setType('msn', core_user::get_property_type('msn'));
$mform->setForceLtr('msn');
}

$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"');
$mform->setType('idnumber', core_user::get_property_type('idnumber'));

Expand Down
1 change: 1 addition & 0 deletions edit_cohort.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

require_once(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/cohort/lib.php');

admin_externalpage_setup('auth_enrolkey_manage');

Expand Down