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
08498bc2
Commit
08498bc2
authored
Aug 13, 2015
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also pass course_id when fetching memberships for user in team profile view.
TNL-3053
parent
b9cf31f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
lms/djangoapps/teams/static/teams/js/spec/views/team_join_spec.js
+9
-3
lms/djangoapps/teams/static/teams/js/views/team_join.js
+2
-1
lms/djangoapps/teams/static/teams/js/views/teams_tab.js
+1
-0
No files found.
lms/djangoapps/teams/static/teams/js/spec/views/team_join_spec.js
View file @
08498bc2
define
([
'underscore'
,
'common/js/spec_helpers/ajax_helpers'
,
'teams/js/models/team'
,
'teams/js/spec_helpers/team_spec_helpers'
,
'teams/js/views/team_join'
],
function
(
_
,
AjaxHelpers
,
TeamModel
,
TeamJoinView
)
{
],
function
(
_
,
AjaxHelpers
,
TeamModel
,
Team
SpecHelpers
,
Team
JoinView
)
{
'use strict'
;
describe
(
'TeamJoinView'
,
function
()
{
var
createTeamsUrl
,
...
...
@@ -61,6 +62,7 @@ define([
var
teamJoinView
=
new
TeamJoinView
(
{
courseID
:
TeamSpecHelpers
.
testCourseID
,
model
:
model
,
teamsUrl
:
createTeamsUrl
(
teamId
),
maxTeamSize
:
maxTeamSize
,
...
...
@@ -91,7 +93,9 @@ define([
AjaxHelpers
.
expectRequest
(
requests
,
'GET'
,
TEAMS_MEMBERSHIP_URL
+
'?'
+
$
.
param
({
"username"
:
currentUsername
})
TEAMS_MEMBERSHIP_URL
+
'?'
+
$
.
param
({
'username'
:
currentUsername
,
'course_id'
:
TeamSpecHelpers
.
testCourseID
})
);
// current user is not a member of any team so we should see the Join Team button
...
...
@@ -134,7 +138,9 @@ define([
AjaxHelpers
.
expectRequest
(
requests
,
'GET'
,
TEAMS_MEMBERSHIP_URL
+
'?'
+
$
.
param
({
"username"
:
currentUsername
})
TEAMS_MEMBERSHIP_URL
+
'?'
+
$
.
param
({
'username'
:
currentUsername
,
'course_id'
:
TeamSpecHelpers
.
testCourseID
})
);
// current user is a member of another team so we should see the correct message
...
...
lms/djangoapps/teams/static/teams/js/views/team_join.js
View file @
08498bc2
...
...
@@ -19,6 +19,7 @@ define(['backbone',
initialize
:
function
(
options
)
{
this
.
template
=
_
.
template
(
teamJoinTemplate
);
this
.
courseID
=
options
.
courseID
;
this
.
maxTeamSize
=
options
.
maxTeamSize
;
this
.
currentUsername
=
options
.
currentUsername
;
this
.
teamMembershipsUrl
=
options
.
teamMembershipsUrl
;
...
...
@@ -85,7 +86,7 @@ define(['backbone',
$
.
ajax
({
type
:
'GET'
,
url
:
view
.
teamMembershipsUrl
,
data
:
{
'username'
:
username
}
data
:
{
'username'
:
username
,
'course_id'
:
view
.
courseID
}
}).
done
(
function
(
data
)
{
info
.
alreadyMember
=
(
data
.
count
>
0
);
info
.
memberOfCurrentTeam
=
false
;
...
...
lms/djangoapps/teams/static/teams/js/views/teams_tab.js
View file @
08498bc2
...
...
@@ -290,6 +290,7 @@
});
var
teamJoinView
=
new
TeamJoinView
(
{
courseID
:
courseID
,
model
:
team
,
teamsUrl
:
self
.
teamsUrl
,
maxTeamSize
:
self
.
maxTeamSize
,
...
...
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