Issue Details (XML | Word | Printable)

Key: CONTRIB-1342
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Mike Churchward
Reporter: Mike Churchward
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

Global constants not working in 2.0

Created: 08/Jun/09 11:35 PM   Updated: 09/Jun/09 12:15 AM
Return to search
Component/s: Module: Questionnaire
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Mike Churchward
Security Level: None
Resolved date: 09/Jun/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
For some reason, many of the global constants are not working in 2.0. For example, adding a questionnaire gives:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (realm = 'template' OR owner = '2') ORDER BY realm,name' at line 1

SELECT id,name,owner,realm,status,title FROM mdl_questionnaire_survey WHERE status != AND (realm = 'template' OR owner = '2') ORDER BY realm,name
[array ( )]
line 305 of lib\dml\moodle_database.php: dml_read_exception thrown
      * line 558 of lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 913 of lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      * line 606 of mod\questionnaire\lib.php: call to moodle_database->get_records_select()
      * line 625 of mod\questionnaire\lib.php: call to questionnaire_get_survey_list()
      * line 88 of mod\questionnaire\mod_form.php: call to questionnaire_get_survey_select()
      * line 152 of lib\formslib.php: call to mod_questionnaire_mod_form->definition()
      * line 60 of course\moodleform_mod.php: call to moodleform->moodleform()
      * line 215 of course\modedit.php: call to moodleform_mod->moodleform_mod()

These seem to work if they are changed to 'define' constants, which they should be anyway.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mike Churchward made changes - 09/Jun/09 12:15 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]