Trellis Learning Management System


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000259 [Trellis] Administration/Reports minor always 2010-04-28 14:59 2010-04-28 15:17
Reporter henry View Status public  
Assigned To henry
Priority normal Resolution open  
Status assigned   Product Version 0.5.2
Summary 0000259: trying to browse program sections results in sql error
Description Clicking "Browse Program Sections" in the navigation menu on the left results in a sql error:
Error 31024

SteamDB->select_field(SELECT COUNT(*) FROM ( program_sections prgs, programs prg) LEFT JOIN (SELECT it.reference_id AS program_section_id, u.user_id AS instructor_id, GROUP_CONCAT(DISTINCT CONCAT_WS(' ', u.first_name, u.last_name) SEPARATOR ', ') AS instructor_name FROM users u, instructors it WHERE u.user_id = it.user_id AND instructor_type = 'program_section' GROUP BY reference_id) AS it ON prgs.program_section_id = it.program_section_id LEFT JOIN (SELECT uprg.program_section_id, COUNT(uprg.user_id) AS program_section_users FROM users_programs uprg, users u, users_communities ucm, WHERE uprg.user_id = u.user_id AND u.user_status <> 'disabled' AND u.user_id = ucm.user_id AND ucm.community_id = '5' AND GROUP BY uprg.program_section_id) AS prgs_u ON prgs_u.program_section_id = prgs.program_section_id LEFT JOIN locations l ON prgs.location_id = l.location_id WHERE prgs.program_id = prg.program_id AND prg.community_id = '5' LIMIT 1): the query could not be completed; 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 'WHERE uprg.user_id = u.user_id AND u.user_status <> 'disabled' AND u.user_id = u' at line 1
In /var/www/trellis_web/0.6/core/global/classes/SteamDB_to_TrellisDB.php on line 443.
Additional Information
Tags No tags attached.
Error Code
URI
Attached Files

- Relationships

-  Notes
User avatar (0001109)
henry (developer)
2010-04-28 15:02

This happens because of line 1433 in TrellisLMS->get_program_sections(). The SQL query has syntax errors, specifically an extra comma before the WHERE keyword and an extra AND before the GROUP BY keyword.
User avatar (0001110)
vcs (reporter)
2010-04-28 15:15

issue#259, debugged sql query in get_program_sections() method (trunk)


Repository: /var/svn/trellis-dev, Revision: 8867, Committer: henry
User avatar (0001111)
vcs (reporter)
2010-04-28 15:16

issue#259, debugged sql query in get_program_sections() method (0.6 branch)


Repository: /var/svn/trellis-dev, Revision: 8868, Committer: henry
User avatar (0001112)
henry (developer)
2010-04-28 15:17

Reminder sent to: james

This has been fixed, tested, is working and ready for review.

- Issue History
Date Modified Username Field Change
2010-04-28 14:59 henry New Issue
2010-04-28 15:02 henry Note Added: 0001109
2010-04-28 15:13 james Status new => confirmed
2010-04-28 15:13 james Status confirmed => assigned
2010-04-28 15:13 james Assigned To => henry
2010-04-28 15:15 vcs Checkin
2010-04-28 15:15 vcs Note Added: 0001110
2010-04-28 15:16 vcs Checkin
2010-04-28 15:16 vcs Note Added: 0001111
2010-04-28 15:17 henry Issue Monitored: james
2010-04-28 15:17 henry Note Added: 0001112



Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker