Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1.4, 3.2.1, 3.3, 3.8.5, 3.9.2, 3.10, 4.0
Description
The instructorcustomparameters field on the mdl32_lti is limited to 255 characters.
This is causing issues with our content-item implementation. We have a number of custom parameters that we return to be launched with content item which total to more than 255 characters. We can't change the number of parameters we are returning, otherwise it somewhat defeats the point of content item.
Debug information:
Debug info: Data too long for column 'instructorcustomparameters' at row 1
|
UPDATE mdl32_lti SET name = ?,showtitlelaunch = ?,typeid = ?,toolurl = ?,securetoolurl = ?,launchcontainer = ?,resourcekey = ?,password = ?,instructorcustomparameters = ?,icon = ?,secureicon = ?,instructorchoicesendname = ?,instructorchoicesendemailaddr = ?,instructorchoiceacceptgrades = ?,grade = ?,course = ?,intro = ?,introformat = ?,timemodified = ?,showdescriptionlaunch = ? WHERE id=?
|
[array (
|
0 => 'LTI-CI',
|
1 => '1',
|
2 => '1',
|
3 => 'http://local.dev/api/lti/1p0/assignment?lang=en_us',
|
4 => '',
|
5 => '1',
|
6 => '',
|
7 => '',
|
8 => 'custom_startdate=2017-01-24T10:46:00+00:00
|
custom_feedbackreleasedate=2017-01-25T10:46:00+00:00
|
custom_submit_papers_to=1
|
custom_late_accept_flag=0
|
custom_use_quoted_exclusion=0
|
custom_duedate=2017-01-25T10:46:00+00:00
|
custom_use_biblio_exclusion=0
|
custom_institutioncheck=1
|
custom_studentpapercheck=1
|
custom_journalcheck=1
|
custom_anonymous_marking_enabled=0
|
custom_internetcheck=1
|
custom_allow_non_or_submissions=0
|
custom_report_gen_speed=0
|
custom_s_view_reports=0',
|
9 => '',
|
10 => '',
|
11 => '0',
|
12 => '0',
|
13 => 0,
|
14 => 0,
|
15 => '2',
|
16 => '',
|
17 => '1',
|
18 => 1485254809,
|
19 => 0,
|
20 => '1',
|
)]
|
Error code: dmlwriteexception
|
|
|
×Stack trace:
|
line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 1406 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 1438 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
|
line 171 of /mod/lti/lib.php: call to mysqli_native_moodle_database->update_record()
|
line 571 of /course/modlib.php: call to lti_update_instance()
|
line 159 of /course/modedit.php: call to update_moduleinfo()
|
To Reproduce
The issue can be reproduced by creating a standard LTI External tool
Then creating a course and a new assignment using the LTI external tool
Then entering into the custom parameters:
custom_startdate=2017-01-24T10:46:00+00:00
|
custom_feedbackreleasedate=2017-01-25T10:46:00+00:00
|
custom_submit_papers_to=1
|
custom_late_accept_flag=0
|
custom_use_quoted_exclusion=0
|
custom_duedate=2017-01-25T10:46:00+00:00
|
custom_use_biblio_exclusion=0
|
custom_institutioncheck=1
|
custom_studentpapercheck=1
|
custom_journalcheck=1
|
custom_anonymous_marking_enabled=0
|
custom_internetcheck=1
|
custom_allow_non_or_submissions=0
|
custom_report_gen_speed=0
|
custom_s_view_reports=0
|
On attempting to create the assignment the creation will fail with a database error because the instructorcustomparameters filed is too long