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
297176cd
Commit
297176cd
authored
Mar 14, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up unused parameter to JS render functions
Add missing semicolons
parent
0d71cad7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
28 deletions
+14
-28
apps/openassessment/xblock/static/js/src/oa_base.js
+11
-25
apps/openassessment/xblock/static/js/src/oa_server.js
+3
-3
No files found.
apps/openassessment/xblock/static/js/src/oa_base.js
View file @
297176cd
...
...
@@ -51,19 +51,16 @@ OpenAssessment.BaseUI.prototype = {
* Asynchronously load each sub-view into the DOM.
*/
load
:
function
()
{
this
.
renderSubmissionStep
(
true
);
this
.
renderPeerAssessmentStep
(
false
);
this
.
renderSelfAssessmentStep
(
false
);
this
.
renderSubmissionStep
();
this
.
renderPeerAssessmentStep
();
this
.
renderSelfAssessmentStep
();
this
.
renderGradeStep
();
},
/**
Render the submission step.
Args:
expanded (bool): If true, expand the step.
**/
renderSubmissionStep
:
function
(
expand
)
{
renderSubmissionStep
:
function
()
{
var
ui
=
this
;
this
.
server
.
render
(
'submission'
).
done
(
function
(
html
)
{
...
...
@@ -119,11 +116,8 @@ OpenAssessment.BaseUI.prototype = {
/**
Render the peer-assessment step.
Args:
expand (bool): If true, expand the step.
**/
renderPeerAssessmentStep
:
function
(
expand
)
{
renderPeerAssessmentStep
:
function
()
{
var
ui
=
this
;
this
.
server
.
render
(
'peer_assessment'
).
done
(
function
(
html
)
{
...
...
@@ -208,11 +202,8 @@ OpenAssessment.BaseUI.prototype = {
/**
Render the self-assessment step.
Args:
expand (bool): If true, expand the step.
**/
renderSelfAssessmentStep
:
function
(
expand
)
{
renderSelfAssessmentStep
:
function
()
{
var
ui
=
this
;
this
.
server
.
render
(
'self_assessment'
).
done
(
function
(
html
)
{
...
...
@@ -304,7 +295,7 @@ OpenAssessment.BaseUI.prototype = {
// When we have successfully sent the submission, expand the next step
function
(
studentId
,
attemptNum
)
{
ui
.
renderSubmissionStep
();
ui
.
renderPeerAssessmentStep
(
true
);
ui
.
renderPeerAssessmentStep
();
}
).
fail
(
function
(
errCode
,
errMsg
)
{
ui
.
toggleActionError
(
'submit'
,
errMsg
);
...
...
@@ -317,11 +308,8 @@ OpenAssessment.BaseUI.prototype = {
peerAssess
:
function
()
{
var
ui
=
this
;
ui
.
peerAssessRequest
(
function
()
{
// We leave the peer assessment step expanded, because (a) there might
// be more peers for the student to grade, and (b) the "completed" state
// contains no content, so it will look collapsed anyway.
ui
.
renderPeerAssessmentStep
(
true
);
ui
.
renderSelfAssessmentStep
(
true
);
ui
.
renderPeerAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderGradeStep
();
});
},
...
...
@@ -386,10 +374,8 @@ OpenAssessment.BaseUI.prototype = {
this
.
toggleActionError
(
'self'
,
null
);
this
.
server
.
selfAssess
(
submissionId
,
optionsSelected
).
done
(
function
()
{
// When we have successfully sent the assessment,
// collapse the current and previous steps and expand the next step
ui
.
renderPeerAssessmentStep
(
false
);
ui
.
renderSelfAssessmentStep
(
false
);
ui
.
renderPeerAssessmentStep
();
ui
.
renderSelfAssessmentStep
();
ui
.
renderGradeStep
();
}
).
fail
(
function
(
errMsg
)
{
...
...
apps/openassessment/xblock/static/js/src/oa_server.js
View file @
297176cd
...
...
@@ -65,7 +65,7 @@ OpenAssessment.Server.prototype = {
defer
.
resolveWith
(
this
,
[
data
]);
}).
fail
(
function
(
data
)
{
defer
.
rejectWith
(
this
,
[
'Could not contact server.'
]);
})
})
;
}).
promise
();
},
...
...
@@ -96,7 +96,7 @@ OpenAssessment.Server.prototype = {
defer
.
resolveWith
(
this
,
[
data
]);
}).
fail
(
function
(
data
)
{
defer
.
rejectWith
(
this
,
[
'Could not contact server.'
]);
})
})
;
}).
promise
();
},
...
...
@@ -203,7 +203,7 @@ OpenAssessment.Server.prototype = {
).
fail
(
function
(
data
)
{
defer
.
rejectWith
(
this
,
[
'Could not contact server.'
]);
});
}).
promise
()
}).
promise
()
;
},
/**
...
...
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