Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
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
cs_comments_service
Commits
6ffc09ac
Commit
6ffc09ac
authored
Nov 17, 2014
by
Chris Dodge
Committed by
Saqib
Aug 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter out anonymous posts
parent
75bfffad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
api/users.rb
+2
-2
No files found.
api/users.rb
View file @
6ffc09ac
...
@@ -92,9 +92,9 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id|
...
@@ -92,9 +92,9 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id|
# get all metadata regarding forum content, but don't bother to fetch the body
# get all metadata regarding forum content, but don't bother to fetch the body
# as we don't need it and we shouldn't push all that data over the wire
# as we don't need it and we shouldn't push all that data over the wire
if
user_id
==
"*"
then
if
user_id
==
"*"
then
content
=
Content
.
where
(
course_id:
course_id
).
without
(
:body
)
content
=
Content
.
where
(
course_id:
course_id
,
anonymous:
false
,
anonymous_to_peers:
false
).
without
(
:body
)
else
else
content
=
Content
.
where
(
author_id:
user_id
,
course_id:
course_id
).
without
(
:body
)
content
=
Content
.
where
(
author_id:
user_id
,
course_id:
course_id
,
anonymous:
false
,
anonymous_to_peers:
false
).
without
(
:body
)
user_stats
[
user_id
]
=
{
user_stats
[
user_id
]
=
{
"num_threads"
=>
0
,
"num_threads"
=>
0
,
"num_comments"
=>
0
,
"num_comments"
=>
0
,
...
...
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