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
5d6bcbbe
Commit
5d6bcbbe
authored
Jul 11, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move JS server object into a common directory so it's shared with LMS and Studio
parent
3e3cef09
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
10 deletions
+23
-10
karma.conf.js
+3
-0
openassessment/xblock/static/js/openassessment-lms.min.js
+0
-0
openassessment/xblock/static/js/openassessment-studio.min.js
+0
-0
openassessment/xblock/static/js/spec/oa_server.js
+0
-0
openassessment/xblock/static/js/src/oa_server.js
+18
-8
scripts/install-js.sh
+2
-2
No files found.
karma.conf.js
View file @
5d6bcbbe
...
@@ -17,8 +17,10 @@ module.exports = function(config) {
...
@@ -17,8 +17,10 @@ module.exports = function(config) {
'lib/jquery.min.js'
,
'lib/jquery.min.js'
,
'lib/*.js'
,
'lib/*.js'
,
'src/oa_shared.js'
,
'src/oa_shared.js'
,
'src/*.js'
,
'src/lms/*.js'
,
'src/lms/*.js'
,
'src/studio/*.js'
,
'src/studio/*.js'
,
'spec/*.js'
,
'spec/lms/*.js'
,
'spec/lms/*.js'
,
'spec/studio/*.js'
,
'spec/studio/*.js'
,
...
@@ -39,6 +41,7 @@ module.exports = function(config) {
...
@@ -39,6 +41,7 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors
:
{
preprocessors
:
{
'src/*.js'
:
'coverage'
,
'src/lms/*.js'
:
'coverage'
,
'src/lms/*.js'
:
'coverage'
,
'src/studio/*.js'
:
'coverage'
'src/studio/*.js'
:
'coverage'
},
},
...
...
openassessment/xblock/static/js/openassessment-lms.min.js
View file @
5d6bcbbe
This diff is collapsed.
Click to expand it.
openassessment/xblock/static/js/openassessment-studio.min.js
View file @
5d6bcbbe
This diff is collapsed.
Click to expand it.
openassessment/xblock/static/js/spec/
lms/
oa_server.js
→
openassessment/xblock/static/js/spec/oa_server.js
View file @
5d6bcbbe
File moved
openassessment/xblock/static/js/src/
lms/
oa_server.js
→
openassessment/xblock/static/js/src/oa_server.js
View file @
5d6bcbbe
/**
/**
Interface for server-side XBlock handlers.
Encapsulate interactions with OpenAssessment XBlock handlers.
**/
// Since the server is included by both LMS and Studio views,
// skip loading it the second time.
if
(
typeof
OpenAssessment
.
Server
==
"undefined"
||
!
OpenAssessment
.
Server
)
{
/**
Interface for server-side XBlock handlers.
Args:
Args:
runtime (Runtime): An XBlock runtime instance.
runtime (Runtime): An XBlock runtime instance.
element (DOM element): The DOM element representing this XBlock.
element (DOM element): The DOM element representing this XBlock.
Returns:
Returns:
OpenAssessment.Server
OpenAssessment.Server
**/
**/
OpenAssessment
.
Server
=
function
(
runtime
,
element
)
{
OpenAssessment
.
Server
=
function
(
runtime
,
element
)
{
this
.
runtime
=
runtime
;
this
.
runtime
=
runtime
;
this
.
element
=
element
;
this
.
element
=
element
;
};
};
OpenAssessment
.
Server
.
prototype
=
{
OpenAssessment
.
Server
.
prototype
=
{
/**
/**
Construct the URL for the handler, specific to one instance of the XBlock on the page.
Construct the URL for the handler, specific to one instance of the XBlock on the page.
...
@@ -463,4 +471,5 @@ OpenAssessment.Server.prototype = {
...
@@ -463,4 +471,5 @@ OpenAssessment.Server.prototype = {
});
});
}).
promise
();
}).
promise
();
}
}
};
};
}
\ No newline at end of file
scripts/install-js.sh
View file @
5d6bcbbe
...
@@ -19,5 +19,5 @@ if [[ -n "$DEBUG_JS" ]]; then
...
@@ -19,5 +19,5 @@ if [[ -n "$DEBUG_JS" ]]; then
UGLIFY_EXTRA_ARGS
=
"--beautify"
UGLIFY_EXTRA_ARGS
=
"--beautify"
fi
fi
node_modules/.bin/uglifyjs
$STATIC_JS
/src/oa_shared.js
$STATIC_JS
/src/lms/
*
.js
$UGLIFY_EXTRA_ARGS
>
"
$STATIC_JS
/openassessment-lms.min.js"
node_modules/.bin/uglifyjs
$STATIC_JS
/src/oa_shared.js
$STATIC_JS
/src/
*
.js
$STATIC_JS
/src/
lms/
*
.js
$UGLIFY_EXTRA_ARGS
>
"
$STATIC_JS
/openassessment-lms.min.js"
node_modules/.bin/uglifyjs
$STATIC_JS
/src/oa_shared.js
$STATIC_JS
/src/studio/
*
.js
$UGLIFY_EXTRA_ARGS
>
"
$STATIC_JS
/openassessment-studio.min.js"
node_modules/.bin/uglifyjs
$STATIC_JS
/src/oa_shared.js
$STATIC_JS
/src/
*
.js
$STATIC_JS
/src/
studio/
*
.js
$UGLIFY_EXTRA_ARGS
>
"
$STATIC_JS
/openassessment-studio.min.js"
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