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
94b58c2d
Commit
94b58c2d
authored
Apr 19, 2016
by
attiyaishaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding bokchoy test and change in html file.
parent
3fb65924
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
17 deletions
+16
-17
common/test/acceptance/pages/lms/courseware.py
+0
-2
common/test/acceptance/pages/studio/index.py
+0
-2
common/test/acceptance/tests/studio/base_studio_test.py
+0
-1
common/test/acceptance/tests/studio/test_studio_home.py
+12
-9
common/test/acceptance/tests/studio/test_studio_outline.py
+0
-1
lms/djangoapps/certificates/models.py
+1
-0
lms/djangoapps/courseware/views/views.py
+3
-2
No files found.
common/test/acceptance/pages/lms/courseware.py
View file @
94b58c2d
...
@@ -298,11 +298,9 @@ class AboutPage(CoursePage):
...
@@ -298,11 +298,9 @@ class AboutPage(CoursePage):
def
is_browser_on_page
(
self
):
def
is_browser_on_page
(
self
):
return
self
.
q
(
css
=
'.intro'
)
.
present
return
self
.
q
(
css
=
'.intro'
)
.
present
@property
@property
def
is_register_button_present
(
self
):
def
is_register_button_present
(
self
):
"""
"""
Returns True if the timed/proctored exam timer bar is visible on the courseware.
Returns True if the timed/proctored exam timer bar is visible on the courseware.
"""
"""
from
nose.tools
import
set_trace
;
set_trace
()
return
self
.
q
(
css
=
".register"
)
.
is_present
()
return
self
.
q
(
css
=
".register"
)
.
is_present
()
common/test/acceptance/pages/studio/index.py
View file @
94b58c2d
...
@@ -20,7 +20,6 @@ class DashboardPage(PageObject):
...
@@ -20,7 +20,6 @@ class DashboardPage(PageObject):
super
(
DashboardPage
,
self
)
.
__init__
(
browser
)
super
(
DashboardPage
,
self
)
.
__init__
(
browser
)
url
=
BASE_URL
+
"/course/"
url
=
BASE_URL
+
"/course/"
def
is_browser_on_page
(
self
):
def
is_browser_on_page
(
self
):
return
self
.
q
(
css
=
'.content-primary'
)
.
visible
return
self
.
q
(
css
=
'.content-primary'
)
.
visible
...
@@ -62,7 +61,6 @@ class DashboardPage(PageObject):
...
@@ -62,7 +61,6 @@ class DashboardPage(PageObject):
# Clicking on course with run will trigger an ajax event
# Clicking on course with run will trigger an ajax event
self
.
wait_for_ajax
()
self
.
wait_for_ajax
()
def
view_live
(
self
,
element
):
def
view_live
(
self
,
element
):
"""
"""
Clicks the "View Live" link and switches to the new tab
Clicks the "View Live" link and switches to the new tab
...
...
common/test/acceptance/tests/studio/base_studio_test.py
View file @
94b58c2d
...
@@ -11,7 +11,6 @@ from ...pages.studio.overview import CourseOutlinePage
...
@@ -11,7 +11,6 @@ from ...pages.studio.overview import CourseOutlinePage
from
...pages.studio.utils
import
verify_ordering
from
...pages.studio.utils
import
verify_ordering
class
StudioCourseTest
(
UniqueCourseTest
):
class
StudioCourseTest
(
UniqueCourseTest
):
"""
"""
Base class for all Studio course tests.
Base class for all Studio course tests.
...
...
common/test/acceptance/tests/studio/test_studio_home.py
View file @
94b58c2d
...
@@ -179,6 +179,7 @@ class StudioLanguageTest(WebAppTest):
...
@@ -179,6 +179,7 @@ class StudioLanguageTest(WebAppTest):
u'Dummy Language (Esperanto)'
u'Dummy Language (Esperanto)'
)
)
class
CourseNotEnrollTest
(
WebAppTest
):
class
CourseNotEnrollTest
(
WebAppTest
):
"""
"""
Test that we can create a new content library on the studio home page.
Test that we can create a new content library on the studio home page.
...
@@ -204,11 +205,11 @@ class CourseNotEnrollTest(WebAppTest):
...
@@ -204,11 +205,11 @@ class CourseNotEnrollTest(WebAppTest):
# TODO - is there a better way to make this agnostic to the underlying default module store?
# TODO - is there a better way to make this agnostic to the underlying default module store?
default_store
=
os
.
environ
.
get
(
'DEFAULT_STORE'
,
'draft'
)
default_store
=
os
.
environ
.
get
(
'DEFAULT_STORE'
,
'draft'
)
course_key
=
CourseLocator
(
course_key
=
CourseLocator
(
self
.
course_org
,
self
.
course_org
,
self
.
course_number
,
self
.
course_number
,
self
.
course_run
,
self
.
course_run
,
deprecated
=
(
default_store
==
'draft'
)
deprecated
=
(
default_store
==
'draft'
)
)
)
return
unicode
(
course_key
)
return
unicode
(
course_key
)
def
test_unenroll_course
(
self
):
def
test_unenroll_course
(
self
):
...
@@ -235,17 +236,20 @@ class CourseNotEnrollTest(WebAppTest):
...
@@ -235,17 +236,20 @@ class CourseNotEnrollTest(WebAppTest):
self
.
assertTrue
(
self
.
dashboard_page
.
is_new_course_form_valid
())
self
.
assertTrue
(
self
.
dashboard_page
.
is_new_course_form_valid
())
self
.
dashboard_page
.
submit_new_course_form
()
self
.
dashboard_page
.
submit_new_course_form
()
self
.
dashboard_page
.
visit
()
LogoutPage
(
self
.
browser
)
.
visit
()
LogoutPage
(
self
.
browser
)
.
visit
()
AutoAuthPage
(
self
.
browser
,
course_id
=
None
,
staff
=
True
)
.
visit
()
AutoAuthPage
(
self
.
browser
,
course_id
=
None
,
staff
=
True
)
.
visit
()
self
.
dashboard_page
.
visit
()
self
.
dashboard_page
.
visit
()
self
.
dashboard_page
.
view_live
(
'.submit>input:last-child'
)
self
.
dashboard_page
.
view_live
(
'.submit>input:last-child'
)
about_page
=
AboutPage
(
self
.
browser
,
self
.
course_id
)
about_page
=
AboutPage
(
self
.
browser
,
self
.
course_id
)
about_page
.
wait_for_page
()
about_page
.
wait_for_page
()
self
.
assertTrue
(
about_page
.
is_browser_on_page
())
self
.
assertTrue
(
about_page
.
is_register_button_present
)
self
.
assertTrue
(
about_page
.
is_register_button_present
)
self
.
dashboard_page
.
visit
()
self
.
dashboard_page
.
visit
()
self
.
dashboard_page
.
view_live
(
'.submit>input:first-child'
)
self
.
dashboard_page
.
view_live
(
'.submit>input:first-child'
)
courseware
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
course_ware
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
courseware
.
wait_for_page
()
course_ware
.
wait_for_page
()
self
.
assertTrue
(
courseware
.
is_browser_on_page
())
self
.
assertTrue
(
course_ware
.
is_browser_on_page
())
\ No newline at end of file
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
94b58c2d
...
@@ -1450,7 +1450,6 @@ class DefaultStatesContentTest(CourseOutlineTest):
...
@@ -1450,7 +1450,6 @@ class DefaultStatesContentTest(CourseOutlineTest):
self
.
assertEqual
(
courseware
.
xblock_component_type
(
2
),
'discussion'
)
self
.
assertEqual
(
courseware
.
xblock_component_type
(
2
),
'discussion'
)
def
test_unenroll_course
(
self
):
def
test_unenroll_course
(
self
):
from
nose.tools
import
set_trace
;
set_trace
()
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
visit
()
self
.
course_outline_page
.
view_live
()
self
.
course_outline_page
.
view_live
()
courseware
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
courseware
=
CoursewarePage
(
self
.
browser
,
self
.
course_id
)
...
...
lms/djangoapps/certificates/models.py
View file @
94b58c2d
...
@@ -222,6 +222,7 @@ class GeneratedCertificate(models.Model):
...
@@ -222,6 +222,7 @@ class GeneratedCertificate(models.Model):
MODES
=
Choices
(
'verified'
,
'honor'
,
'audit'
,
'professional'
,
'no-id-professional'
)
MODES
=
Choices
(
'verified'
,
'honor'
,
'audit'
,
'professional'
,
'no-id-professional'
)
VERIFIED_CERTS_MODES
=
[
CourseMode
.
VERIFIED
,
CourseMode
.
CREDIT_MODE
]
VERIFIED_CERTS_MODES
=
[
CourseMode
.
VERIFIED
,
CourseMode
.
CREDIT_MODE
]
user
=
models
.
ForeignKey
(
User
)
user
=
models
.
ForeignKey
(
User
)
course_id
=
CourseKeyField
(
max_length
=
255
,
blank
=
True
,
default
=
None
)
course_id
=
CourseKeyField
(
max_length
=
255
,
blank
=
True
,
default
=
None
)
verify_uuid
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
default
=
''
,
db_index
=
True
)
verify_uuid
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
default
=
''
,
db_index
=
True
)
...
...
lms/djangoapps/courseware/views/views.py
View file @
94b58c2d
...
@@ -354,11 +354,11 @@ def _index_bulk_op(request, course_key, chapter, section, position):
...
@@ -354,11 +354,11 @@ def _index_bulk_op(request, course_key, chapter, section, position):
if
not
registered
:
if
not
registered
:
# TODO (vshnayder): do course instructors need to be registered to see course?
# TODO (vshnayder): do course instructors need to be registered to see course?
log
.
debug
(
u'User
%
s tried to view course
%
s but is not enrolled'
,
user
,
course
.
location
.
to_deprecated_string
())
log
.
debug
(
u'User
%
s tried to view course
%
s but is not enrolled'
,
user
,
course
.
location
.
to_deprecated_string
())
if
bool
(
staff_access
)
==
False
:
if
not
bool
(
staff_access
)
:
return
redirect
(
"{url}?{redirect}"
.
format
(
return
redirect
(
"{url}?{redirect}"
.
format
(
url
=
reverse
(
enroll_staff
,
args
=
[
course_key
.
to_deprecated_string
()]),
url
=
reverse
(
enroll_staff
,
args
=
[
course_key
.
to_deprecated_string
()]),
redirect
=
request
.
GET
.
urlencode
()
redirect
=
request
.
GET
.
urlencode
()
)
)
)
)
return
redirect
(
reverse
(
'about_course'
,
args
=
[
course_key
.
to_deprecated_string
()]))
return
redirect
(
reverse
(
'about_course'
,
args
=
[
course_key
.
to_deprecated_string
()]))
...
@@ -838,6 +838,7 @@ def get_cosmetic_display_price(course, registration_price):
...
@@ -838,6 +838,7 @@ def get_cosmetic_display_price(course, registration_price):
# Translators: This refers to the cost of the course. In this case, the course costs nothing so it is free.
# Translators: This refers to the cost of the course. In this case, the course costs nothing so it is free.
return
_
(
'Free'
)
return
_
(
'Free'
)
@require_global_staff
@require_global_staff
@require_http_methods
([
'POST'
,
'GET'
])
@require_http_methods
([
'POST'
,
'GET'
])
def
enroll_staff
(
request
,
course_id
):
def
enroll_staff
(
request
,
course_id
):
...
...
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