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
e8925972
Commit
e8925972
authored
Jan 08, 2016
by
Adam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11168 from edx/adam/fix-userstanding-page
userstanding is now OneToOneField
parents
96478f82
7dc54723
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
common/djangoapps/student/tests/test_userstanding.py
+7
-0
common/djangoapps/student/views.py
+1
-1
No files found.
common/djangoapps/student/tests/test_userstanding.py
View file @
e8925972
...
...
@@ -58,6 +58,13 @@ class UserStandingTest(TestCase):
# to skip tests for cms
@unittest.skipUnless
(
settings
.
ROOT_URLCONF
==
'lms.urls'
,
'Test only valid in lms'
)
def
test_can_access_manage_account_page
(
self
):
response
=
self
.
admin_client
.
get
(
reverse
(
'manage_user_standing'
),
{
'user'
:
self
.
admin
,
})
self
.
assertEqual
(
response
.
status_code
,
200
)
@unittest.skipUnless
(
settings
.
ROOT_URLCONF
==
'lms.urls'
,
'Test only valid in lms'
)
def
test_disable_account
(
self
):
self
.
assertEqual
(
UserStanding
.
objects
.
filter
(
user
=
self
.
good_user
)
.
count
(),
0
...
...
common/djangoapps/student/views.py
View file @
e8925972
...
...
@@ -1346,7 +1346,7 @@ def manage_user_standing(request):
headers
=
[
'username'
,
'account_changed_by'
]
rows
=
[]
for
user
in
all_disabled_users
:
row
=
[
user
.
username
,
user
.
standing
.
all
()[
0
]
.
changed_by
]
row
=
[
user
.
username
,
user
.
standing
.
changed_by
]
rows
.
append
(
row
)
context
=
{
'headers'
:
headers
,
'rows'
:
rows
}
...
...
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