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
1712b42b
Commit
1712b42b
authored
Jul 07, 2015
by
Muhammad Shoaib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHX-49 initial work
parent
97b5957c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
edx_proctoring/static/proctoring/js/proctored_app.js
+6
-0
edx_proctoring/static/proctoring/js/proctored_exam_allowance_model.js
+12
-0
edx_proctoring/static/proctoring/js/proctored_exam_allowance_view.js
+49
-0
edx_proctoring/static/proctoring/templates/add-allowance.underscore
+5
-0
No files found.
edx_proctoring/static/proctoring/js/proctored_app.js
View file @
1712b42b
...
@@ -5,4 +5,10 @@ $(function() {
...
@@ -5,4 +5,10 @@ $(function() {
model
:
new
ProctoredExamModel
()
model
:
new
ProctoredExamModel
()
});
});
proctored_exam_view
.
render
();
proctored_exam_view
.
render
();
var
proctored_exam_allowance_view
=
new
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
({
el
:
$
(
".special-allowance-container"
),
allowance_template_url
:
'/static/proctoring/templates/add-allowance.underscore'
,
model
:
new
ProctoredExamAllowanceModel
()
});
});
});
edx_proctoring/static/proctoring/js/proctored_exam_allowance_model.js
0 → 100644
View file @
1712b42b
(
function
(
Backbone
)
{
var
ProctoredExamAllowanceModel
=
Backbone
.
Model
.
extend
({
/* we should probably pull this from a data attribute on the HTML */
url
:
'/api/edx_proctoring/v1/proctored_exam/allowance'
,
defaults
:
{
}
});
this
.
ProctoredExamAllowanceModel
=
ProctoredExamAllowanceModel
;
}).
call
(
this
,
Backbone
);
edx_proctoring/static/proctoring/js/proctored_exam_allowance_view.js
0 → 100644
View file @
1712b42b
var
edx
=
edx
||
{};
(
function
(
Backbone
,
$
,
_
)
{
'use strict'
;
edx
.
instructor_dashboard
=
edx
.
instructor_dashboard
||
{};
edx
.
instructor_dashboard
.
proctoring
=
{};
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
=
Backbone
.
View
.
extend
({
initialize
:
function
(
options
)
{
this
.
$el
=
options
.
el
;
this
.
model
=
options
.
model
;
this
.
temPlateUrl
=
options
.
allowance_template_url
;
this
.
template
=
null
;
/* re-render if the model changes */
this
.
listenTo
(
this
.
model
,
'change'
,
this
.
modelChanged
);
/* make the async call to the backend REST API */
/* after it loads, the listenTo event will file and */
/* will call into the rendering */
//this.model.fetch();
this
.
loadTemplateData
();
},
loadTemplateData
:
function
(){
var
self
=
this
;
$
.
ajax
({
url
:
self
.
temPlateUrl
,
dataType
:
"html"
})
.
error
(
function
(
jqXHR
,
textStatus
,
errorThrown
){
})
.
done
(
function
(
template_data
)
{
self
.
template
=
_
.
template
(
template_data
);
self
.
render
()
});
},
modelChanged
:
function
()
{
//this.render();
},
render
:
function
()
{
if
(
this
.
template
!==
null
)
{
var
html
=
this
.
template
();
this
.
$el
.
html
(
html
);
this
.
$el
.
show
();
}
return
this
;
}
});
this
.
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
=
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceView
;
}).
call
(
this
,
Backbone
,
$
,
_
);
edx_proctoring/static/proctoring/templates/add-allowance.underscore
0 → 100644
View file @
1712b42b
<span class="tip"> <%- gettext("Add Allowance for User: ") %> <span>
<a id="add-allowance" href="#" class="add blue-button">+ <%- gettext("Add Allowance") %></a>
</span>
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