Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
863343a8
Commit
863343a8
authored
Nov 22, 2017
by
Asad Azam
Committed by
AsadAzam
Nov 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix server error on edit run
parent
2d669183
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
course_discovery/apps/publisher/templates/publisher/_personFieldLabel.html
+4
-6
course_discovery/static/js/publisher/instructors.js
+6
-1
No files found.
course_discovery/apps/publisher/templates/publisher/_personFieldLabel.html
View file @
863343a8
...
@@ -2,14 +2,12 @@
...
@@ -2,14 +2,12 @@
<input
type=
"hidden"
id=
"staff_{{ staff.id }}"
name=
"staff"
value=
"{{ staff.id }}"
>
<input
type=
"hidden"
id=
"staff_{{ staff.id }}"
name=
"staff"
value=
"{{ staff.id }}"
>
<div><img
src=
"{{ staff.get_profile_image_url }}"
></div>
<div><img
src=
"{{ staff.get_profile_image_url }}"
></div>
<div><a
class=
"delete"
id=
"{{ staff.id }}"
href=
"#"
><i
class=
"fa fa-trash-o fa-fw"
></i></a>
<div><a
class=
"delete"
id=
"{{ staff.id }}"
href=
"#"
><i
class=
"fa fa-trash-o fa-fw"
></i></a>
{% if (course_user_role == 'course_team' and (staff.position and staff.uuid and
{% if course_user_role == 'course_team' %}
staff.position.organization_id in organizations_ids or staff.position.organization_id is None)) or is_internal_user %}
{% if staff.position and staff.uuid and staff.position.organization_id in organizations_ids or staff.position.organization_id is None %}
<a
class=
"edit"
id=
"{{ staff.uuid }}"
href=
"#"
><i
class=
"fa fa-pencil-square-o fa-fw"
></i></a>
{% endif %}
{% else %}
{% if not staff.profile_image_url %}
<a
class=
"edit"
id=
"{{ staff.uuid }}"
href=
"#"
><i
class=
"fa fa-pencil-square-o fa-fw"
></i></a>
<a
class=
"edit"
id=
"{{ staff.uuid }}"
href=
"#"
><i
class=
"fa fa-pencil-square-o fa-fw"
></i></a>
{% endif %}
{% endif %}
{% elif not staff.profile_image_url %}
<a
class=
"edit"
id=
"{{ staff.uuid }}"
href=
"#"
><i
class=
"fa fa-pencil-square-o fa-fw"
></i></a>
{% endif %}
{% endif %}
<b>
{{ staff.full_name }}
</b>
<b>
{{ staff.full_name }}
</b>
</div>
</div>
...
...
course_discovery/static/js/publisher/instructors.js
View file @
863343a8
...
@@ -178,7 +178,12 @@ function renderSelectedInstructor(id, name, image, uuid, organization_id, edit_i
...
@@ -178,7 +178,12 @@ function renderSelectedInstructor(id, name, image, uuid, organization_id, edit_i
var
user_is_course_team
=
course_user_role
===
"course_team"
;
var
user_is_course_team
=
course_user_role
===
"course_team"
;
var
user_is_in_similar_org_as_instructor
=
$
.
inArray
(
parseInt
(
organization_id
),
JSON
.
parse
(
user_organizations_ids
))
>
-
1
;
if
(
organization_id
!=
"None"
&&
user_organizations_ids
!=
"[]"
){
var
user_is_in_similar_org_as_instructor
=
$
.
inArray
(
parseInt
(
organization_id
),
JSON
.
parse
(
user_organizations_ids
))
>
-
1
;
}
else
{
var
user_is_in_similar_org_as_instructor
=
false
;
}
var
org_is_none
=
organization_id
===
"None"
;
var
org_is_none
=
organization_id
===
"None"
;
if
((
user_is_course_team
&&
(
user_is_in_similar_org_as_instructor
&&
uuid
||
org_is_none
))
||
is_internal_user
||
edit_instructor
)
{
if
((
user_is_course_team
&&
(
user_is_in_similar_org_as_instructor
&&
uuid
||
org_is_none
))
||
is_internal_user
||
edit_instructor
)
{
...
...
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