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
42de1b02
Commit
42de1b02
authored
Nov 08, 2017
by
attiyaishaque
Committed by
Attiya Ishaque
Nov 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDUCATOR-1705 Fix when profile_image is not available.
parent
58776f7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
course_discovery/apps/publisher/templates/publisher/_personFieldLabel.html
+1
-1
course_discovery/static/js/publisher/instructors.js
+1
-6
No files found.
course_discovery/apps/publisher/templates/publisher/_personFieldLabel.html
View file @
42de1b02
<div
class=
"instructor"
id=
"instructor_{{ staff.id }}"
>
<input
type=
"hidden"
id=
"staff_{{ staff.id }}"
name=
"staff"
value=
"{{ staff.id }}"
>
<div><img
src=
"{
% if staff.profile_image_url %}{{ staff.profile_image_url }}{% else %}{{ staff.profile_image.url }}{% endif %
}"
></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>
{% if course_user_role == 'course_team' %}
{% if staff.position %}
...
...
course_discovery/static/js/publisher/instructors.js
View file @
42de1b02
...
...
@@ -247,12 +247,7 @@ $(document).on('click', '.selected-instructor a.edit', function (e) {
$
.
getJSON
({
url
:
btnInstructor
.
data
(
'url'
)
+
uuid
,
success
:
function
(
data
)
{
if
(
$
.
isEmptyObject
(
data
[
'profile_image'
]))
{
$
(
'.select-image'
).
attr
(
'src'
,
data
[
'profile_image_url'
]);
}
else
{
$
(
'.select-image'
).
attr
(
'src'
,
data
[
'profile_image'
][
'medium'
][
'url'
]);
}
$
(
'.select-image'
).
attr
(
'src'
,
data
[
'profile_image'
]);
$
(
'#given-name'
).
val
(
data
[
'given_name'
]);
$
(
'#family-name'
).
val
(
data
[
'family_name'
]);
$
(
'#title'
).
val
(
data
[
'position'
][
'title'
]);
...
...
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