Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
problem-builder
Commits
fe0e8254
Commit
fe0e8254
authored
Mar 15, 2016
by
Omar Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #106 from open-craft/omar/edx-release/report-download
Fix dashboard report image download (edx-release hotfix)
parents
a4e1e429
85f9a263
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
.travis.yml
+1
-1
problem_builder/public/js/dashboard.js
+12
-0
setup.py
+1
-1
No files found.
.travis.yml
View file @
fe0e8254
...
@@ -9,7 +9,7 @@ install:
...
@@ -9,7 +9,7 @@ install:
-
"
pip
install
-r
requirements.txt"
-
"
pip
install
-r
requirements.txt"
-
"
pip
install
-r
$VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt"
-
"
pip
install
-r
$VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt"
-
"
pip
install
-r
$VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt"
-
"
pip
install
-r
$VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt"
-
"
pip
uninstall
-y
xblock-problem-builder
&&
python
setup.py
sdist
&&
pip
install
dist/xblock-problem-builder-2.0.
2
.tar.gz"
-
"
pip
uninstall
-y
xblock-problem-builder
&&
python
setup.py
sdist
&&
pip
install
dist/xblock-problem-builder-2.0.
3
.tar.gz"
-
"
pip
install
-r
test_requirements.txt"
-
"
pip
install
-r
test_requirements.txt"
-
"
mkdir
var"
-
"
mkdir
var"
script
:
script
:
...
...
problem_builder/public/js/dashboard.js
View file @
fe0e8254
...
@@ -8,6 +8,18 @@ function PBDashboardBlock(runtime, element, initData) {
...
@@ -8,6 +8,18 @@ function PBDashboardBlock(runtime, element, initData) {
var
generateDataUriFromImageURL
=
function
(
imgURL
)
{
var
generateDataUriFromImageURL
=
function
(
imgURL
)
{
// Given the URL to an image, IF the image has already been cached by the browser,
// Given the URL to an image, IF the image has already been cached by the browser,
// returns a data: URI with the contents of the image (image will be converted to PNG)
// returns a data: URI with the contents of the image (image will be converted to PNG)
// Expand relative urls and urls without an explicit protocol into absolute urls
var
a
=
document
.
createElement
(
'a'
);
a
.
href
=
imgURL
;
imgURL
=
a
.
href
;
// If the image is from another domain, just return its URL. We can't
// create a data URL from cross-domain images:
// https://html.spec.whatwg.org/multipage/scripting.html#dom-canvas-todataurl
if
(
a
.
origin
!==
window
.
location
.
origin
)
return
imgURL
;
var
img
=
new
Image
();
var
img
=
new
Image
();
img
.
src
=
imgURL
;
img
.
src
=
imgURL
;
if
(
!
img
.
complete
)
if
(
!
img
.
complete
)
...
...
setup.py
View file @
fe0e8254
...
@@ -75,7 +75,7 @@ BLOCKS = [
...
@@ -75,7 +75,7 @@ BLOCKS = [
setup
(
setup
(
name
=
'xblock-problem-builder'
,
name
=
'xblock-problem-builder'
,
version
=
'2.0.
2
'
,
version
=
'2.0.
3
'
,
description
=
'XBlock - Problem Builder'
,
description
=
'XBlock - Problem Builder'
,
packages
=
[
'problem_builder'
,
'problem_builder.v1'
],
packages
=
[
'problem_builder'
,
'problem_builder.v1'
],
install_requires
=
[
install_requires
=
[
...
...
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