Issue Details (XML | Word | Printable)

Key: MDL-15678
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Robert Puffer
Votes: 17
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Online Assignment Truncates text at 64k

Created: 17/Jul/08 03:05 AM   Updated: 21/Jul/08 10:13 PM
Return to search
Component/s: Assignment
Affects Version/s: 1.9.2
Fix Version/s: 2.0

Environment: Vista, SuSE Linux 10.3 Enterprise

Database: MySQL
Participants: A. T. Wyatt, Kenneth Newquist, Petr Skoda and Robert Puffer
Security Level: None
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
The Onliine Assignment cuts off text entry at 64k because the data field definition for mdl_assignment_submission data1 and data2 are set to text (64k)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Kenneth Newquist added a comment - 17/Jul/08 03:40 AM
I can confirm this. The Online Text Assignment fails silently when you have an entry that's longer than 64K, because data1/data2 are set to the type 'text'. Changing it to 'mediumtext' will significantly increase the amount of text that can be stored (from 64K to 16 MB).

This problem also effects Journal (and this is where I first saw the problem crop up) because it's mdl_journal_entries table has a similar limitation on its 'text' field – it's set to type 'text'.

On our campus, the problem occurred while students were using Journal for internship journaling; half the class ran out of space in their journal's halfway through a summer term session (with entries containing 9,000 words, or 55,000 characters). This led me to see if Online Text Assignment had the same limitation, which it did.

Making this change allowed me to add a 21,000 word, 116,000 character document without any problems.


A. T. Wyatt added a comment - 17/Jul/08 11:08 PM
I would like to see this set as a default value. I should think it would be expecting too much for most people to fix this problem, since they are either unable or reluctant to make database changes.

Petr Skoda added a comment - 17/Jul/08 11:23 PM
Hello,
database changes are not allowed in STABLE branch, this will have to wait till 2.0

I would not personally recommend encouraging people to to type long essays there because browser may time out or something else might happen which would result in data loss.

Petr


Petr Skoda made changes - 17/Jul/08 11:23 PM
Field Original Value New Value
Fix Version/s 2.0 [ 10122 ]
Kenneth Newquist added a comment - 21/Jul/08 10:13 PM
While I agree that timeout's can be a problem, the way things are currently setup folks are already silently losing data because of the database field size limitation – they update their journal entry, save the text, and – unless they're paying attention – don't realize that they've lost text until they go back to edit it. If the field size isn't increased, then IMHO we need some mechanism for warning people that they're hitting the size limit (e.g. like Mediwiki's notice about editing files that are greater than 32kb in length). If it is increased, a similar mechanism could still be added (e.g. "Your entry is longer than the the recommended length of [foo] kb.)