Skip to content

Commit

Permalink
MDL-22367 Bye bye Course Fullname 101, you cost us too many queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed May 6, 2010
1 parent 0368809 commit 976033c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions course/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ function definition() {
$mform->setConstant('category', $category->id);
}

$fullname = get_string('defaultcoursefullname');
$shortname = get_string('defaultcourseshortname');
while ($DB->record_exists('course', array('fullname'=>$fullname))
or $DB->record_exists('course', array('fullname'=>$fullname))) {
$fullname++;
$shortname++;
}

$mform->addElement('text','fullname', get_string('fullnamecourse'),'maxlength="254" size="50"');
$mform->addHelpButton('fullname', 'fullnamecourse');
$mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
Expand All @@ -93,8 +85,6 @@ function definition() {
$mform->setConstant('fullname', $course->fullname);
}

$mform->setDefault('fullname', $fullname);

$mform->addElement('text','shortname', get_string('shortnamecourse'),'maxlength="100" size="20"');
$mform->addHelpButton('shortname', 'shortnamecourse');
$mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
Expand All @@ -104,8 +94,6 @@ function definition() {
$mform->setConstant('shortname', $course->shortname);
}

$mform->setDefault('shortname', $shortname);

$mform->addElement('text','idnumber', get_string('idnumbercourse'),'maxlength="100" size="10"');
$mform->addHelpButton('idnumber', 'idnumbercourse');
$mform->setType('idnumber', PARAM_RAW);
Expand Down
2 changes: 0 additions & 2 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@
$string['days'] = 'days';
$string['decodinginternallinks'] = 'Decoding internal links';
$string['default'] = 'Default';
$string['defaultcoursefullname'] = 'Course Fullname 101';
$string['defaultcourseshortname'] = 'CF101';
$string['defaultcoursestudent'] = 'Student';
$string['defaultcoursestudentdescription'] = 'Students generally have fewer privileges within a course.';
$string['defaultcoursestudents'] = 'Students';
Expand Down

0 comments on commit 976033c

Please sign in to comment.