-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
2.1.5, 2.2.2
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
wip-
MDL-32207-master -
-
There is a comparison between a varchar and text field in assignment_count_real_submissions() than needs to be converted for comparison in non-mySQL DBs.
*Replication steps:"
- In an MS-SQL instance (and probably Oracle and PostgreSQL also), create an Advanced Upload of Files assignment
- Attempt to view the new assignment
The following error is shown.
Error reading from database
|
Debug info: SQLState: 42000<br>
|
Error Code: 402<br>
|
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types ntext and varchar are incompatible in the equal to operator.<br>
|
|
SELECT COUNT('x')
|
FROM mdl_assignment_submissions s
|
LEFT JOIN mdl_assignment a ON a.id = s.assignment
|
INNER JOIN (SELECT DISTINCT eu1_u.id
|
FROM mdl_user eu1_u
|
JOIN mdl_role_assignments eu1_ra3 ON (eu1_ra3.userid = eu1_u.id AND eu1_ra3.roleid IN (6,5,4,3,1) AND eu1_ra3.contextid IN (1,3,25,35))
|
JOIN mdl_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
|
JOIN mdl_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = '2')
|
WHERE eu1_u.deleted = 0 AND eu1_u.id <> '1') u ON u.id = s.userid
|
WHERE s.assignment = '1' AND
|
s.data2 = 'submitted'
|
[array (
|
0 => '2',
|
1 => '1',
|
2 => '1',
|
)]
|
Stack trace:
|
|
line 414 of \lib\dml\moodle_database.php: dml_read_exception thrown
|
line 257 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
|
line 374 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
|
line 786 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
|
line 821 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
|
line 1339 of \lib\dml\moodle_database.php: call to sqlsrv_native_moodle_database->get_records_sql()
|
line 1414 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
|
line 1585 of \lib\dml\moodle_database.php: call to moodle_database->get_field_sql()
|
line 420 of \mod\assignment\type\upload\assignment.class.php: call to moodle_database->count_records_sql()
|
line 3941 of \mod\assignment\lib.php: call to assignment_upload->count_real_submissions()
|
line 3601 of \lib\navigationlib.php: call to assignment_extend_settings_navigation()
|
line 3009 of \lib\navigationlib.php: call to settings_navigation->load_module_settings()
|
line 713 of \lib\pagelib.php: call to settings_navigation->initialise()
|
line 729 of \lib\pagelib.php: call to moodle_page->magic_get_settingsnav()
|
line 133 of \blocks\settings\block_settings.php: call to moodle_page->__get()
|
line 280 of \blocks\moodleblock.class.php: call to block_settings->get_content()
|
line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
|
line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
|
line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
|
line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
|
line 6 of \theme\base\layout\general.php: call to block_manager->region_has_content()
|
line 764 of \lib\outputrenderers.php: call to include()
|
line 711 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
|
line ? of unknownfile: call to core_renderer->header()
|
line 1409 of \lib\setuplib.php: call to call_user_func_array()
|
line 194 of \mod\assignment\lib.php: call to bootstrap_renderer->__call()
|
line 194 of \mod\assignment\lib.php: call to bootstrap_renderer->header()
|
line 51 of \mod\assignment\type\upload\assignment.class.php: call to assignment_base->view_header()
|
line 51 of \mod\assignment\view.php: call to assignment_upload->view()
|
- blocks
-
MDL-31987 Always "No attempts" if disabled "Send for marking" button
-
- Closed
-
- is a regression caused by
-
MDL-30724 assignment_count_real_submissions() assumes all rows with a positive timestamp are "real submissions" when this is not true for upload assignment types
-
- Closed
-
- will be (partly) resolved by
-
MDL-31987 Always "No attempts" if disabled "Send for marking" button
-
- Closed
-