Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
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
edx-proctoring
Commits
2a2e33df
Commit
2a2e33df
authored
Jul 07, 2015
by
Chris Dodge
Committed by
Muhammad Shoaib
Jul 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust lifecycle to make it work in Instructor Dashboard
parent
8aeb38da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
+22
-12
edx_proctoring/static/proctoring/js/proctored_app.js
+0
-8
edx_proctoring/static/proctoring/js/proctored_exam_allowance_view.js
+22
-4
No files found.
edx_proctoring/static/proctoring/js/proctored_app.js
View file @
2a2e33df
...
@@ -5,12 +5,4 @@ $(function() {
...
@@ -5,12 +5,4 @@ $(function() {
model
:
new
ProctoredExamModel
()
model
:
new
ProctoredExamModel
()
});
});
proctored_exam_view
.
render
();
proctored_exam_view
.
render
();
var
container
=
$
(
".special-allowance-container"
);
var
course_id
=
container
.
data
(
'course-id'
);
var
proctored_exam_allowance_view
=
new
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
({
el
:
container
,
allowance_template_url
:
'/static/proctoring/templates/add-allowance.underscore'
,
course_id
:
course_id
});
});
});
edx_proctoring/static/proctoring/js/proctored_exam_allowance_view.js
View file @
2a2e33df
...
@@ -8,10 +8,14 @@ var edx = edx || {};
...
@@ -8,10 +8,14 @@ var edx = edx || {};
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
=
Backbone
.
View
.
extend
({
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
=
Backbone
.
View
.
extend
({
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
$el
=
options
.
el
;
this
.
collection
=
new
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceCollection
();
this
.
collection
=
new
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceCollection
();
this
.
course_id
=
options
.
course_id
;
this
.
tempate_url
=
options
.
allowance_template_url
;
/* unfortunately we have to make some assumptions about what is being set up in HTML */
this
.
$el
=
$
(
'.special-allowance-container'
);
this
.
course_id
=
this
.
$el
.
data
(
'course-id'
);
/* this should be moved to a 'data' attribute in HTML */
this
.
tempate_url
=
'/static/proctoring/templates/add-allowance.underscore'
;
this
.
template
=
null
;
this
.
template
=
null
;
/* re-render if the model changes */
/* re-render if the model changes */
...
@@ -25,6 +29,21 @@ var edx = edx || {};
...
@@ -25,6 +29,21 @@ var edx = edx || {};
this
.
collection
.
url
=
this
.
collection
.
url
+
'/'
+
this
.
course_id
;
this
.
collection
.
url
=
this
.
collection
.
url
+
'/'
+
this
.
course_id
;
},
},
/*
This entry point is required for Instructor Dashboard
See setup_instructor_dashboard_sections() in
instructor_dashboard.coffee (in edx-platform)
*/
constructor
:
function
(
section
){
/* the Instructor Dashboard javascript expects this to be set up */
$
(
section
).
data
(
'wrapper'
,
this
);
this
.
initialize
({});
},
onClickTitle
:
function
(){
// called when this is selected in the instructor dashboard
return
;
},
loadTemplateData
:
function
(){
loadTemplateData
:
function
(){
var
self
=
this
;
var
self
=
this
;
$
.
ajax
({
url
:
self
.
tempate_url
,
dataType
:
"html"
})
$
.
ajax
({
url
:
self
.
tempate_url
,
dataType
:
"html"
})
...
@@ -60,5 +79,4 @@ var edx = edx || {};
...
@@ -60,5 +79,4 @@ var edx = edx || {};
}
}
}
}
});
});
this
.
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
=
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
;
}).
call
(
this
,
Backbone
,
$
,
_
);
}).
call
(
this
,
Backbone
,
$
,
_
);
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