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
8acf9407
Commit
8acf9407
authored
Oct 24, 2016
by
alisan617
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert and fix membership tab course team mgmt section
parent
e05262e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
lms/static/js/instructor_dashboard/membership.js
+21
-18
No files found.
lms/static/js/instructor_dashboard/membership.js
View file @
8acf9407
...
...
@@ -12,7 +12,11 @@ such that the value can be defined later than this assignment (file load order).
(
function
()
{
'use strict'
;
var
AuthListWidget
,
BatchEnrollment
,
BetaTesterBulkAddition
,
MemberListWidget
,
Membership
,
emailStudents
,
plantTimeout
,
statusAjaxError
;
MemberListWidget
,
Membership
,
emailStudents
,
plantTimeout
,
statusAjaxError
,
/* eslint-disable */
__hasProp
=
{}.
hasOwnProperty
,
__extends
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
__hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
/* eslint-enable */
plantTimeout
=
function
()
{
return
window
.
InstructorDashboard
.
util
.
plantTimeout
.
apply
(
this
,
arguments
);
...
...
@@ -38,10 +42,8 @@ such that the value can be defined later than this assignment (file load order).
add_btn_label
:
'Add Member'
,
add_handler
:
function
()
{}
});
templateHtml
=
$
(
'#member-list-widget-template'
).
html
();
edx
.
HtmlUtils
.
setHtml
(
this
.
$container
,
window
.
Mustache
.
render
(
templateHtml
,
edx
.
HtmlUtils
.
HTML
(
memberListParams
))
);
templateHtml
=
window
.
Mustache
.
render
(
$
(
'#member-list-widget-template'
).
html
(),
memberListParams
);
edx
.
HtmlUtils
.
setHtml
(
this
.
$container
,
edx
.
HtmlUtils
.
HTML
(
templateHtml
));
this
.
$
(
'input[type="button"].add'
).
click
(
function
()
{
condition
=
typeof
memberListParams
.
add_handler
===
'function'
;
return
condition
?
memberListParams
.
add_handler
(
memberlistwidget
.
$
(
'.add-field'
).
val
())
:
undefined
;
...
...
@@ -64,7 +66,7 @@ such that the value can be defined later than this assignment (file load order).
item
=
rowArray
[
i
];
$td
=
$
(
'<td>'
);
if
(
item
instanceof
jQuery
)
{
edx
.
HtmlUtils
.
append
(
$td
,
item
);
edx
.
HtmlUtils
.
append
(
$td
,
edx
.
HtmlUtils
.
HTML
(
item
)
);
}
else
{
$td
.
text
(
item
);
}
...
...
@@ -86,13 +88,14 @@ such that the value can be defined later than this assignment (file load order).
return
memberListWidget
;
}());
AuthListWidget
=
(
function
()
{
function
authListWidget
(
$container
,
rolename
,
$errorSection
)
{
AuthListWidget
=
(
function
(
_super
)
{
__extends
(
AuthListWidget
,
_super
);
// eslint-disable-line no-use-before-define
function
AuthListWidget
(
$container
,
rolename
,
$errorSection
)
{
// eslint-disable-line no-shadow
var
msg
,
authlistwidget
=
this
;
this
.
rolename
=
rolename
;
this
.
$errorSection
=
$errorSection
;
authListWidget
.
super
.
constructor
.
call
(
this
,
$container
,
{
AuthListWidget
.
__super__
.
constructor
.
call
(
this
,
$container
,
{
// eslint-disable-line no-underscore-dangle
title
:
$container
.
data
(
'display-name'
),
info
:
$container
.
data
(
'info-text'
),
labels
:
[
gettext
(
'Username'
),
gettext
(
'Email'
),
gettext
(
'Revoke access'
)],
...
...
@@ -112,13 +115,13 @@ such that the value can be defined later than this assignment (file load order).
this
.
reload_list
();
}
a
uthListWidget
.
prototype
.
re_view
=
function
()
{
A
uthListWidget
.
prototype
.
re_view
=
function
()
{
this
.
clear_errors
();
this
.
clear_input
();
return
this
.
reload_list
();
};
a
uthListWidget
.
prototype
.
add_handler
=
function
(
input
)
{
A
uthListWidget
.
prototype
.
add_handler
=
function
(
input
)
{
var
authlistwidgetaddhandler
=
this
;
if
((
input
!=
null
)
&&
input
!==
''
)
{
return
this
.
modify_member_access
(
input
,
'allow'
,
function
(
error
)
{
...
...
@@ -134,7 +137,7 @@ such that the value can be defined later than this assignment (file load order).
}
};
a
uthListWidget
.
prototype
.
reload_list
=
function
()
{
A
uthListWidget
.
prototype
.
reload_list
=
function
()
{
var
authlistwidgetreloadlist
=
this
;
return
this
.
get_member_list
(
function
(
error
,
memberList
)
{
if
(
error
!==
null
)
{
...
...
@@ -163,19 +166,19 @@ such that the value can be defined later than this assignment (file load order).
});
};
a
uthListWidget
.
prototype
.
clear_errors
=
function
()
{
A
uthListWidget
.
prototype
.
clear_errors
=
function
()
{
var
ref
,
result
;
result
=
(
this
.
$error_section
)
!=
null
?
ref
.
text
(
''
)
:
undefined
;
return
result
;
};
a
uthListWidget
.
prototype
.
show_errors
=
function
(
msg
)
{
A
uthListWidget
.
prototype
.
show_errors
=
function
(
msg
)
{
var
ref
,
result
;
result
=
(
this
.
$error_section
)
!=
null
?
ref
.
text
(
msg
)
:
undefined
;
return
result
;
};
a
uthListWidget
.
prototype
.
get_member_list
=
function
(
cb
)
{
A
uthListWidget
.
prototype
.
get_member_list
=
function
(
cb
)
{
var
authlistwidgetgetmemberlist
=
this
;
return
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -190,7 +193,7 @@ such that the value can be defined later than this assignment (file load order).
});
};
a
uthListWidget
.
prototype
.
modify_member_access
=
function
(
uniqueStudentIdentifier
,
action
,
cb
)
{
A
uthListWidget
.
prototype
.
modify_member_access
=
function
(
uniqueStudentIdentifier
,
action
,
cb
)
{
var
authlistwidgetmemberaccess
=
this
;
return
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -210,7 +213,7 @@ such that the value can be defined later than this assignment (file load order).
});
};
a
uthListWidget
.
prototype
.
member_response
=
function
(
data
)
{
A
uthListWidget
.
prototype
.
member_response
=
function
(
data
)
{
var
msg
;
this
.
clear_errors
();
this
.
clear_input
();
...
...
@@ -233,7 +236,7 @@ such that the value can be defined later than this assignment (file load order).
}
};
return
a
uthListWidget
;
return
A
uthListWidget
;
}(
MemberListWidget
));
this
.
AutoEnrollmentViaCsv
=
(
function
()
{
...
...
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