Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schoolyourself-xblock
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
OpenEdx
schoolyourself-xblock
Commits
d5953eee
Commit
d5953eee
authored
Nov 17, 2014
by
John Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the student view for the reviews to show the test tube UI instead of the module screenshot
parent
e79740de
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
11 deletions
+60
-11
schoolyourself/public/review_icon.png
+0
-0
schoolyourself/schoolyourself_lesson.py
+2
-1
schoolyourself/schoolyourself_review.py
+4
-2
schoolyourself/static/css/student_view.css
+35
-0
schoolyourself/templates/lesson_student_view.html
+10
-8
schoolyourself/templates/review_student_view.html
+9
-0
No files found.
schoolyourself/public/review_icon.png
0 → 100644
View file @
d5953eee
6.17 KB
schoolyourself/schoolyourself_lesson.py
View file @
d5953eee
...
...
@@ -39,7 +39,8 @@ class SchoolYourselfLessonXBlock(SchoolYourselfXBlock):
# Now actually render the fragment, which is just a button with
# some JS code that handles the click event on that button.
fragment
=
Fragment
(
self
.
render_template
(
"student_view.html"
,
context
))
fragment
=
Fragment
(
self
.
render_template
(
"lesson_student_view.html"
,
context
))
# Load the common JS/CSS libraries:
fragment
.
add_css_url
(
...
...
schoolyourself/schoolyourself_review.py
View file @
d5953eee
...
...
@@ -38,12 +38,14 @@ class SchoolYourselfReviewXBlock(SchoolYourselfXBlock):
context
=
{
"iframe_url"
:
"
%
s/review/player?
%
s"
%
(
self
.
base_url
,
urllib
.
urlencode
(
url_params
)),
"screenshot_url"
:
screenshot_url
"icon_url"
:
self
.
runtime
.
local_resource_url
(
self
,
"public/review_icon.png"
)
}
# Now actually render the fragment, which is just a button with
# some JS code that handles the click event on that button.
fragment
=
Fragment
(
self
.
render_template
(
"student_view.html"
,
context
))
fragment
=
Fragment
(
self
.
render_template
(
"review_student_view.html"
,
context
))
# Load the common JS/CSS libraries:
fragment
.
add_css_url
(
...
...
schoolyourself/static/css/student_view.css
View file @
d5953eee
.schoolyourself-container
{
border
:
1px
solid
#737c95
;
text-align
:
center
;
}
.schoolyourself-lesson-player
{
position
:
relative
;
display
:
inline-block
;
cursor
:
pointer
;
cursor
:
hand
;
width
:
100%
;
}
.schoolyourself-play-button
{
...
...
@@ -73,3 +79,32 @@
.schoolyourself-lesson-player
:hover
.schoolyourself-screenshot-curtain
{
background
:
rgba
(
0
,
0
,
0
,
0.2
);
}
.schoolyourself-review-box
{
position
:
relative
;
width
:
100%
;
height
:
384px
;
text-align
:
center
;
}
.schoolyourself-review-icon
{
width
:
100px
;
line-height
:
384px
;
display
:
inline-block
;
}
.schoolyourself-review-icon
>
img
{
vertical-align
:
middle
;
width
:
100%
;
opacity
:
0.7
;
transition
:
opacity
100ms
ease-in
;
-webkit-transition
:
opacity
100ms
ease-in
;
-moz-transition
:
opacity
100ms
ease-in
;
-ms-transition
:
opacity
100ms
ease-in
;
-o-transition
:
opacity
100ms
ease-in
;
}
.schoolyourself-lesson-player
:hover
.schoolyourself-review-icon
>
img
{
opacity
:
1
;
}
schoolyourself/templates/student_view.html
→
schoolyourself/templates/
lesson_
student_view.html
View file @
d5953eee
<div
class=
"schoolyourself-lesson-player"
data-url=
"${iframe_url}"
>
<div
class=
"schoolyourself-screenshot"
>
<div
class=
"schoolyourself-screenshot-curtain"
></div>
<img
src=
"${screenshot_url}"
/>
</div>
<div
class=
"schoolyourself-play-button"
>
<div
class=
"schoolyourself-arrow-container"
>
<div
class=
"schoolyourself-arrow"
></div>
<div
class=
"schoolyourself-container"
>
<div
class=
"schoolyourself-lesson-player"
data-url=
"${iframe_url}"
>
<div
class=
"schoolyourself-screenshot"
>
<div
class=
"schoolyourself-screenshot-curtain"
></div>
<img
src=
"${screenshot_url}"
/>
</div>
<div
class=
"schoolyourself-play-button"
>
<div
class=
"schoolyourself-arrow-container"
>
<div
class=
"schoolyourself-arrow"
></div>
</div>
</div>
</div>
</div>
...
...
schoolyourself/templates/review_student_view.html
0 → 100644
View file @
d5953eee
<div
class=
"schoolyourself-container"
>
<div
class=
"schoolyourself-lesson-player"
data-url=
"${iframe_url}"
>
<div
class=
"schoolyourself-review-box"
>
<div
class=
"schoolyourself-review-icon"
>
<img
src=
"${icon_url}"
/>
</div>
</div>
</div>
</div>
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