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
dca724af
Commit
dca724af
authored
Dec 18, 2014
by
Bastien Abadie
Committed by
Bastien Abadie
Jan 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit OpenAssessment BaseView scroll to current element. TNL-499
parent
71725bec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
1 deletions
+13
-1
AUTHORS
+1
-0
openassessment/xblock/static/js/openassessment-lms.min.js
+0
-0
openassessment/xblock/static/js/src/lms/oa_base.js
+1
-1
test/acceptance/pages.py
+5
-0
test/acceptance/tests.py
+6
-0
No files found.
AUTHORS
View file @
dca724af
...
...
@@ -13,3 +13,4 @@ Andrew Dekker <a.dekker@uq.edu.au>
Steven Burch <stv@stanford.edu>
Muzaffar Yousaf <muzaffar@edx.org>
Usman Khalid <2200617@gmail.com>
Bastien Abadie <bastien@nextcairn.com>
openassessment/xblock/static/js/openassessment-lms.min.js
View file @
dca724af
This diff is collapsed.
Click to expand it.
openassessment/xblock/static/js/src/lms/oa_base.js
View file @
dca724af
...
...
@@ -38,7 +38,7 @@ OpenAssessment.BaseView.prototype = {
*/
scrollToTop
:
function
()
{
if
(
$
.
scrollTo
instanceof
Function
)
{
$
(
window
).
scrollTo
(
$
(
"#openassessment__steps"
),
800
,
{
offset
:
-
50
});
$
(
window
).
scrollTo
(
$
(
"#openassessment__steps"
,
this
.
element
),
800
,
{
offset
:
-
50
});
}
},
...
...
test/acceptance/pages.py
View file @
dca724af
...
...
@@ -116,6 +116,11 @@ class AssessmentPage(OpenAssessmentPage):
)
return
self
.
q
(
css
=
css_id
)
.
is_present
()
@property
def
is_on_top
(
self
):
pos
=
self
.
browser
.
get_window_position
()
return
pos
[
'y'
]
<
100
def
assess
(
self
,
options_selected
):
"""
Create an assessment.
...
...
test/acceptance/tests.py
View file @
dca724af
...
...
@@ -103,6 +103,9 @@ class SelfAssessmentTest(OpenAssessmentTest):
# Verify the grade
self
.
assertEqual
(
self
.
grade_page
.
wait_for_page
()
.
score
,
self
.
EXPECTED_SCORE
)
# Check browser scrolled back to top
self
.
assertTrue
(
self
.
self_asmnt_page
.
is_on_top
)
class
PeerAssessmentTest
(
OpenAssessmentTest
):
"""
...
...
@@ -169,6 +172,9 @@ class StudentTrainingTest(OpenAssessmentTest):
self
.
student_training_page
.
wait_for_page
()
.
wait_for_response
()
.
assess
(
options_selected
)
# Check browser scrolled back to top only on first example
self
.
assertEqual
(
self
.
self_asmnt_page
.
is_on_top
,
example_num
==
0
)
# Check that we've completed student training
try
:
self
.
student_training_page
.
wait_for_complete
()
...
...
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