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
9b500a15
Commit
9b500a15
authored
Dec 19, 2012
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added extra test checks for GST.
parent
b8ea29c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
+24
-0
No files found.
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
View file @
9b500a15
...
...
@@ -270,6 +270,7 @@ define('Graph', ['logme'], function (logme) {
xrange
.
min
=
Function
.
apply
(
null
,
allParamNames
);
}
catch
(
err
)
{
logme
(
'ERROR: could not create a function from the string "'
+
config
.
plot
.
xrange
.
min
+
'" for xrange.min.'
);
logme
(
'Error message: "'
+
err
.
message
+
'"'
);
return
false
;
}
...
...
@@ -280,6 +281,7 @@ define('Graph', ['logme'], function (logme) {
xrange
.
max
=
Function
.
apply
(
null
,
allParamNames
);
}
catch
(
err
)
{
logme
(
'ERROR: could not create a function from the string "'
+
config
.
plot
.
xrange
.
max
+
'" for xrange.max.'
);
logme
(
'Error message: "'
+
err
.
message
+
'"'
);
return
false
;
}
...
...
@@ -447,6 +449,7 @@ define('Graph', ['logme'], function (logme) {
funcString
+
'" was not converted by the Function constructor.'
);
logme
(
'Error message: "'
+
err
.
message
+
'"'
);
paramNames
.
pop
();
paramNames
.
pop
();
...
...
@@ -529,8 +532,22 @@ define('Graph', ['logme'], function (logme) {
// JSON.
c1
=
0
;
try
{
start
=
xrange
.
min
.
apply
(
window
,
paramValues
);
}
catch
(
err
)
{
logme
(
'ERROR: Could not determine xrange start.'
);
logme
(
'Error message: "'
+
err
.
message
+
'".'
);
return
false
;
}
try
{
end
=
xrange
.
max
.
apply
(
window
,
paramValues
);
}
catch
(
err
)
{
logme
(
'ERROR: Could not determine xrange end.'
);
logme
(
'Error message: "'
+
err
.
message
+
'".'
);
return
false
;
}
step
=
(
end
-
start
)
/
(
numPoints
-
1
);
// Generate the data points.
...
...
@@ -568,7 +585,14 @@ define('Graph', ['logme'], function (logme) {
if
(
c1
!=
numPoints
)
{
x
=
end
;
paramValues
.
push
(
x
);
try
{
y
=
functionObj
.
func
.
apply
(
window
,
paramValues
);
}
catch
(
err
)
{
logme
(
'ERROR: Could not generate data.'
);
logme
(
'Error message: "'
+
err
.
message
+
'".'
);
return
false
;
}
paramValues
.
pop
();
dataPoints
.
push
([
x
,
y
]);
}
...
...
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