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
fc0cae91
Commit
fc0cae91
authored
Jul 10, 2015
by
Muhammad Shoaib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internationalize the strings
parent
3e2d70ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
edx_proctoring/static/proctoring/js/views/proctored_exam_add_allowance_view.js
+4
-4
edx_proctoring/static/proctoring/js/views/proctored_exam_allowance_view.js
+1
-1
edx_proctoring/static/proctoring/templates/add-new-allowance.underscore
+11
-7
edx_proctoring/static/proctoring/templates/course_allowances.underscore
+1
-1
No files found.
edx_proctoring/static/proctoring/js/views/proctored_exam_add_allowance_view.js
View file @
fc0cae91
var
edx
=
edx
||
{};
var
edx
=
edx
||
{};
(
function
(
Backbone
,
$
,
_
)
{
(
function
(
Backbone
,
$
,
_
,
gettext
)
{
'use strict'
;
'use strict'
;
edx
.
instructor_dashboard
=
edx
.
instructor_dashboard
||
{};
edx
.
instructor_dashboard
=
edx
.
instructor_dashboard
||
{};
...
@@ -116,7 +116,7 @@ var edx = edx || {};
...
@@ -116,7 +116,7 @@ var edx = edx || {};
$
.
each
(
values
,
function
(
key
,
value
)
{
$
.
each
(
values
,
function
(
key
,
value
)
{
if
(
value
===
""
)
{
if
(
value
===
""
)
{
formHasErrors
=
true
;
formHasErrors
=
true
;
self
.
showError
(
self
,
key
,
"Required field"
);
self
.
showError
(
self
,
key
,
gettext
(
"Required field"
)
);
}
}
else
{
else
{
self
.
hideError
(
self
,
key
);
self
.
hideError
(
self
,
key
);
...
@@ -144,7 +144,7 @@ var edx = edx || {};
...
@@ -144,7 +144,7 @@ var edx = edx || {};
},
},
error
:
function
(
self
,
response
,
options
)
{
error
:
function
(
self
,
response
,
options
)
{
var
data
=
$
.
parseJSON
(
response
.
responseText
);
var
data
=
$
.
parseJSON
(
response
.
responseText
);
error_response
.
html
(
data
.
detail
);
error_response
.
html
(
gettext
(
data
.
detail
)
);
}
}
});
});
}
}
...
@@ -167,4 +167,4 @@ var edx = edx || {};
...
@@ -167,4 +167,4 @@ var edx = edx || {};
return
this
;
return
this
;
}
}
});
});
}).
call
(
this
,
Backbone
,
$
,
_
);
}).
call
(
this
,
Backbone
,
$
,
_
,
gettext
);
edx_proctoring/static/proctoring/js/views/proctored_exam_allowance_view.js
View file @
fc0cae91
...
@@ -17,8 +17,8 @@ var edx = edx || {};
...
@@ -17,8 +17,8 @@ var edx = edx || {};
/* this should be moved to a 'data' attribute in HTML */
/* this should be moved to a 'data' attribute in HTML */
this
.
tempate_url
=
'/static/proctoring/templates/course_allowances.underscore'
;
this
.
tempate_url
=
'/static/proctoring/templates/course_allowances.underscore'
;
this
.
template
=
null
;
this
.
template
=
null
;
this
.
allowance_url
=
this
.
collection
.
url
+
'allowance'
;
this
.
initial_url
=
this
.
collection
.
url
;
this
.
initial_url
=
this
.
collection
.
url
;
this
.
allowance_url
=
this
.
initial_url
+
'allowance'
;
/* re-render if the model changes */
/* re-render if the model changes */
this
.
listenTo
(
this
.
collection
,
'change'
,
this
.
collectionChanged
);
this
.
listenTo
(
this
.
collection
,
'change'
,
this
.
collectionChanged
);
...
...
edx_proctoring/static/proctoring/templates/add-new-allowance.underscore
View file @
fc0cae91
<div class='modal-header'>
Add a new Allowance
</div>
<div class='modal-header'>
<%- gettext("Add a new Allowance") %>
</div>
<form>
<form>
<h3 class='error-response'><h3>
<h3 class='error-response'><h3>
<table class='compact'>
<table class='compact'>
<tr>
<tr>
<td>
<td>
<label>
Proctored Exam
</label>
<label>
<%- gettext("Proctored Exam") %>
</label>
</td>
</td>
<td>
<td>
<select id='proctored_exam'>
<select id='proctored_exam'>
<% _.each(proctored_exams, function(proctored_exam){ %>
<% _.each(proctored_exams, function(proctored_exam){ %>
<option value="<%= proctored_exam.id %>"><%= proctored_exam.exam_name %></option>
<option value="<%= proctored_exam.id %>">
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: proctored_exam.exam_name }, true) %>
</option>
<% }); %>
<% }); %>
</select>
</select>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td>
<label>
Allowance Type
</label>
<label>
<%- gettext("Allowance Type") %>
</label>
</td>
</td>
<td>
<td>
<select id="allowance_type">
<select id="allowance_type">
<% _.each(allowance_types, function(allowance_type){ %>
<% _.each(allowance_types, function(allowance_type){ %>
<option value="<%= allowance_type %>"><%= allowance_type %></option>
<option value="<%= allowance_type %>">
<%- interpolate(gettext(' %(allowance_type)s '), { allowance_type: allowance_type }, true) %>
</option>
<% }); %>
<% }); %>
</select>
</select>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td>
<label>
Value
</label>
<label>
<%- gettext("Value") %>
</label>
</td>
</td>
<td>
<td>
<input type="text" id="allowance_value" />
<input type="text" id="allowance_value" />
...
@@ -36,7 +40,7 @@
...
@@ -36,7 +40,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
<td>
<label>
Username or Email
</label>
<label>
<%- gettext("Username or Email") %>
</label>
</td>
</td>
<td>
<td>
<input type="text" id="user_info" />
<input type="text" id="user_info" />
...
...
edx_proctoring/static/proctoring/templates/course_allowances.underscore
View file @
fc0cae91
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<td>
<td>
<a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"
<a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"
data-key-name="<%= proctored_exam_allowance.key %>"
data-key-name="<%= proctored_exam_allowance.key %>"
data-user-id="<%= proctored_exam_allowance.user
_
id %>"
data-user-id="<%= proctored_exam_allowance.user
.
id %>"
class="remove_allowance" href="#">[x]</a>
class="remove_allowance" href="#">[x]</a>
</td>
</td>
</tr>
</tr>
...
...
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