Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
cc43fb66
Commit
cc43fb66
authored
Jan 13, 2015
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for leaderbord Top submissions and updated the edx-submissions to latest commit.
TNL-1125
parent
0bbc69fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletions
+30
-1
openassessment/xblock/test/test_leaderboard.py
+28
-0
requirements/base.txt
+2
-1
No files found.
openassessment/xblock/test/test_leaderboard.py
View file @
cc43fb66
...
...
@@ -69,6 +69,34 @@ class TestLeaderboardRender(XBlockHandlerTransactionTestCase):
self
.
_assert_leaderboard_visible
(
xblock
,
True
)
@scenario
(
'data/leaderboard_show.xml'
)
def
test_show_submissions_that_have_greater_than_0_score
(
self
,
xblock
):
# Create some submissions (but fewer than the max that can be shown)
self
.
_create_submissions_and_scores
(
xblock
,
[
(
"test answer 0"
,
0
),
(
"test answer 1"
,
1
),
])
self
.
_assert_scores
(
xblock
,
[
{
"content"
:
"test answer 1"
,
"score"
:
1
}
])
self
.
_assert_leaderboard_visible
(
xblock
,
True
)
# Since leaderboard results are cached, we need to clear
# the cache in order to see the new scores.
cache
.
clear
()
# Create more submissions than the max
self
.
_create_submissions_and_scores
(
xblock
,
[
(
"test answer 2"
,
10
),
(
"test answer 3"
,
0
)
])
self
.
_assert_scores
(
xblock
,
[
{
"content"
:
"test answer 2"
,
"score"
:
10
},
{
"content"
:
"test answer 1"
,
"score"
:
1
}
])
self
.
_assert_leaderboard_visible
(
xblock
,
True
)
@scenario
(
'data/leaderboard_show.xml'
)
def
test_no_text_key_submission
(
self
,
xblock
):
# Instead of using the default submission as a dict with "text",
# make the submission a string.
...
...
requirements/base.txt
View file @
cc43fb66
...
...
@@ -5,7 +5,8 @@
# edX Internal Requirements
git+https://github.com/edx/XBlock.git@9c634481dfc85a17dcb3351ca232d7098a38e10e#egg=XBlock
edx-submissions>=0.0.8,<0.1.0
# edx-submissions
git+https://github.com/edx/edx-submissions.git@7d19adcc49045b225aa55441604928905b018b30#egg=edx-submissions
# Third Party Requirements
boto>=2.32.1,<3.0.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