[MDL-13475] Incorrent course & role shortname truncate length Created: 15/Feb/08  Updated: 17/Dec/10  Resolved: 03/Mar/08

Status: Closed
Project: Moodle
Component/s: Database SQL/XMLDB
Affects Version/s: 1.8.4
Fix Version/s: 1.9

Type: Bug Priority: Minor
Reporter: Iñaki Arenaza Assignee: Martin Dougiamas
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File course_shortname_is_varchar_100.diff    
Issue Links:
has been marked as being related by MDL-13746 course_request->shortname and mnet_en... Closed
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_19_STABLE
Fix Release Date: 3/Mar/08
Component watchers:
Jake Dallimore, Jun Pataleta


prefix_course.shortname was enlarged in 1.6 to varchar(100), but a few places in the code, forms and upgrade routines still limit the value to 15 characters (the length of the field in 1.5 and below), and something similar happens with prefix_role.shortname. In addition to that, prefix_course_request.shortname and prefix_mnet_enrol_course.shortname should be enlarged to the same value (varchar(100)) as they hold values that can go into/come from prefix_course.shortname.

The attached patch fixes these issues for 1.8.4+ current as of today. I haven't done the same review to 1.9 or HEAD yet, so I don't know if all those issues are still present there.

Saludos. Iñaki.

Comment by Eloy Lafuente (stronk7) [ 15/Feb/08 ]

Well spotted Iñaki,

100% agree both course_request->shortname and mnet_enrol_course->shortname to be 100cc.

Adding the boss here because we have some other DB changes pending and no enough version increments to do all them. Anyway... I think this only will be fixed for 1.9 and up (not for 1.8).


Comment by Eloy Lafuente (stronk7) [ 15/Feb/08 ]

Adding some more people....

Comment by Martin Dougiamas [ 15/Feb/08 ]

Thanks, Iñaki and Eloy.

Yes, let's get this into 1.9. Petr, can you do it?

Comment by Martin Dougiamas [ 03/Mar/08 ]

I'm treating these as two separate issues.

1) Fix the places that reference course->shortname and role->shortname in current code as something other than 100 characters (this issue) . Currently in CVS for 1.9.

2) Fix tables course_request->shortname and mnet_enrol_course->shortname to be 100 chars - see MDL-13746 2.0

Generated at Fri Nov 16 08:58:51 UTC 2018 using Jira 7.12.0#712001-sha1:ad166f5f9410495f8c71bd6c53abc939fb5afea7.