Moodle

course shortname truncated in course/edit_form.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.2
  • Fix Version/s: 1.8.3, 1.9
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

The database field {prefix}course.shortname is defined as char(100). The fieldsize for shortname in course/edit_form.php is limited to 15 characters.

course/edit_form.php, v. 1.25.2.2, line 72.

  • $mform->addElement('text','shortname', get_string('shortname'),'maxlength="15" size="10"');
    + $mform->addElement('text','shortname', get_string('shortname'),'maxlength="100" size="10"');

Activity

Hide
A. T. Wyatt added a comment -

Yes, I have been changing this each time I upgrade moodle! I vote for a 25 character length on the form! Remember, too, that the same fix should be applied to the course request form.

Show
A. T. Wyatt added a comment - Yes, I have been changing this each time I upgrade moodle! I vote for a 25 character length on the form! Remember, too, that the same fix should be applied to the course request form.
Hide
Mark Pearson added a comment -

Well, this is what code from edit_form.php reads from the moodle-latest-18.tgz downloaded on July 23rd (Moodle 1.8.2+ (2007021520)) :

$mform->addElement('text','shortname', get_string('shortname'),'maxlength="15" size="10"');

So, it looks like this has not been fixed.

Show
Mark Pearson added a comment - Well, this is what code from edit_form.php reads from the moodle-latest-18.tgz downloaded on July 23rd (Moodle 1.8.2+ (2007021520)) : $mform->addElement('text','shortname', get_string('shortname'),'maxlength="15" size="10"'); So, it looks like this has not been fixed.
Hide
Yu Zhang added a comment -

Fixed in 1.8 and HEAD, thanks guys!

Show
Yu Zhang added a comment - Fixed in 1.8 and HEAD, thanks guys!

People

Vote (4)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: