Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
53a1611e
Commit
53a1611e
authored
Sep 18, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change following=>followed.
parent
ef8ca23d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
10 deletions
+9
-10
lms/djangoapps/django_comment_client/forum/urls.py
+1
-1
lms/djangoapps/django_comment_client/forum/views.py
+1
-1
lms/static/coffee/src/discussion/discussion.coffee
+2
-3
lms/static/coffee/src/discussion/utils.coffee
+1
-1
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+4
-4
No files found.
lms/djangoapps/django_comment_client/forum/urls.py
View file @
53a1611e
...
...
@@ -2,7 +2,7 @@ from django.conf.urls.defaults import url, patterns
import
django_comment_client.forum.views
urlpatterns
=
patterns
(
'django_comment_client.forum.views'
,
url
(
r'users/(?P<user_id>\w+)/follow
ing$'
,
'following_threads'
,
name
=
'following
_threads'
),
url
(
r'users/(?P<user_id>\w+)/follow
ed$'
,
'followed_threads'
,
name
=
'followed
_threads'
),
url
(
r'users/(?P<user_id>\w+)$'
,
'user_profile'
,
name
=
'user_profile'
),
url
(
r'(?P<discussion_id>[\w\-]+)/threads/(?P<thread_id>\w+)$'
,
'single_thread'
,
name
=
'single_thread'
),
url
(
r'(?P<discussion_id>[\w\-]+)/inline$'
,
'inline_discussion'
,
name
=
'inline_discussion'
),
...
...
lms/djangoapps/django_comment_client/forum/views.py
View file @
53a1611e
...
...
@@ -279,7 +279,7 @@ def user_profile(request, course_id, user_id):
raise
Http404
def
follow
ing
_threads
(
request
,
course_id
,
user_id
):
def
follow
ed
_threads
(
request
,
course_id
,
user_id
):
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
try
:
profiled_user
=
cc
.
User
(
id
=
user_id
,
course_id
=
course_id
)
...
...
lms/static/coffee/src/discussion/discussion.coffee
View file @
53a1611e
...
...
@@ -26,7 +26,6 @@ if Backbone?
model
retrieveAnotherPage
:
(
mode
,
options
=
{},
sort_options
=
{})
->
# TODO: I really feel that this belongs in DiscussionThreadListView
@
current_page
+=
1
data
=
{
page
:
@
current_page
}
switch
mode
...
...
@@ -37,8 +36,8 @@ if Backbone?
data
[
'commentable_ids'
]
=
options
.
commentable_ids
when
'all'
url
=
DiscussionUtil
.
urlFor
'threads'
when
'follow
ing
'
url
=
DiscussionUtil
.
urlFor
'follow
ing
_threads'
,
options
.
user_id
when
'follow
ed
'
url
=
DiscussionUtil
.
urlFor
'follow
ed
_threads'
,
options
.
user_id
data
[
'sort_key'
]
=
sort_options
.
sort_key
||
'date'
data
[
'sort_order'
]
=
sort_options
.
sort_order
||
'desc'
DiscussionUtil
.
safeAjax
...
...
lms/static/coffee/src/discussion/utils.coffee
View file @
53a1611e
...
...
@@ -66,7 +66,7 @@ class @DiscussionUtil
permanent_link_thread
:
"/courses/
#{
$$course_id
}
/discussion/forum/
#{
param
}
/threads/
#{
param1
}
"
permanent_link_comment
:
"/courses/
#{
$$course_id
}
/discussion/forum/
#{
param
}
/threads/
#{
param1
}
#
#{
param2
}
"
user_profile
:
"/courses/
#{
$$course_id
}
/discussion/forum/users/
#{
param
}
"
follow
ing_threads
:
"/courses/
#{
$$course_id
}
/discussion/forum/users/
#{
param
}
/following
"
follow
ed_threads
:
"/courses/
#{
$$course_id
}
/discussion/forum/users/
#{
param
}
/followed
"
threads
:
"/courses/
#{
$$course_id
}
/discussion/forum"
}[
name
]
...
...
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
53a1611e
...
...
@@ -128,7 +128,7 @@ if Backbone?
when
'search'
options
.
search_text
=
@
current_search
options
.
commentable_ids
=
@
discussionIds
when
'follow
ing
'
when
'follow
ed
'
options
.
user_id
=
window
.
user
.
id
@
collection
.
retrieveAnotherPage
(
@
mode
,
options
,
{
sort_key
:
@
sortBy
})
...
...
@@ -257,7 +257,7 @@ if Backbone?
@
$
(
".post-search-field"
).
val
(
""
)
@
retrieveAllThreads
()
else
if
discussionId
==
"#following"
@
retrieveFollow
ing
(
event
)
@
retrieveFollow
ed
(
event
)
# Retrieve following
else
discussionIds
=
_
.
map
item
.
find
(
".board-name[data-discussion_id]"
),
(
board
)
->
$
(
board
).
data
(
"discussion_id"
).
id
...
...
@@ -388,8 +388,8 @@ if Backbone?
scrollTarget
=
Math
.
max
(
scrollTop
-
itemFromTop
-
$
(
".browse-topic-drop-menu"
).
height
()
+
$
(
items
[
index
]).
height
(),
scrollTarget
)
$
(
".browse-topic-drop-menu"
).
scrollTop
(
scrollTarget
)
retrieveFollow
ing
:
(
event
)
=>
@
mode
=
'follow
ing
'
retrieveFollow
ed
:
(
event
)
=>
@
mode
=
'follow
ed
'
@
collection
.
reset
()
@
collection
.
current_page
=
0
@
loadMorePages
(
event
)
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