Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-data-api
Commits
347cce51
Commit
347cce51
authored
Feb 17, 2015
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #55 from edx/concat-bug-fix
Fixing MySQL GROUP_CONCAT() Issues
parents
1de62169
3be0074a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
analytics_data_api/v0/views/courses.py
+8
-1
No files found.
analytics_data_api/v0/views/courses.py
View file @
347cce51
...
...
@@ -645,7 +645,14 @@ FROM answer_distribution
WHERE course_id =
%
s
GROUP BY module_id;
"""
with
connections
[
settings
.
ANALYTICS_DATABASE
]
.
cursor
()
as
cursor
:
connection
=
connections
[
settings
.
ANALYTICS_DATABASE
]
with
connection
.
cursor
()
as
cursor
:
if
connection
.
vendor
==
'mysql'
:
# The default value of group_concat_max_len, 1024, is too low for some course data. Increase this value
# to its maximum possible value. For more information see
# http://code.openark.org/blog/mysql/those-oversized-undersized-variables-defaults.
cursor
.
execute
(
"SET @@group_concat_max_len = @@max_allowed_packet;"
)
cursor
.
execute
(
sql
,
[
self
.
course_id
])
rows
=
dictfetchall
(
cursor
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment