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
68890dab
Unverified
Commit
68890dab
authored
Nov 15, 2017
by
Waheed Ahmed
Committed by
GitHub
Nov 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16559 from edx/waheed/LEARNER-2862-tag-enterprise-tickets
Added tag enterprise tickets functionality.
parents
787df105
a119d5b9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
6 deletions
+26
-6
lms/djangoapps/support/static/support/jsx/errors_list.jsx
+3
-1
lms/djangoapps/support/static/support/jsx/single_support_form.jsx
+1
-0
lms/djangoapps/support/views/contact_us.py
+18
-2
lms/templates/support/contact_us.html
+4
-3
No files found.
lms/djangoapps/support/static/support/jsx/errors_list.jsx
View file @
68890dab
...
...
@@ -6,7 +6,9 @@ import PropTypes from 'prop-types';
class
ShowErrors
extends
React
.
Component
{
render
()
{
window
.
scrollTo
(
0
,
0
);
if
(
this
.
props
.
errorList
.
length
>
0
)
{
window
.
scrollTo
(
0
,
0
);
}
return
this
.
props
.
errorList
.
length
>
0
&&
<
div
className=
"col-sm-12"
>
<
div
className=
"alert alert-danger"
role=
"alert"
>
...
...
lms/djangoapps/support/static/support/jsx/single_support_form.jsx
View file @
68890dab
...
...
@@ -42,6 +42,7 @@ class RenderForm extends React.Component {
body
:
$
(
'#message'
).
val
(),
uploads
:
$
.
map
(
$
(
'.uploaded-files button'
),
n
=>
n
.
id
),
},
tags
:
this
.
props
.
context
.
zendeskTags
,
};
let
course
;
...
...
lms/djangoapps/support/views/contact_us.py
View file @
68890dab
...
...
@@ -6,7 +6,8 @@ from django.views.generic import View
from
edxmako.shortcuts
import
render_to_response
from
student.models
import
CourseEnrollment
from
openedx.core.djangoapps.site_configuration
import
helpers
from
openedx.core.djangoapps.site_configuration
import
helpers
as
configuration_helpers
from
openedx.features.enterprise_support
import
api
as
enterprise_api
class
ContactUsView
(
View
):
...
...
@@ -16,12 +17,27 @@ class ContactUsView(View):
def
get
(
self
,
request
):
context
=
{
'platform_name'
:
helpers
.
get_value
(
'platform_name'
,
settings
.
PLATFORM_NAME
),
'platform_name'
:
configuration_
helpers
.
get_value
(
'platform_name'
,
settings
.
PLATFORM_NAME
),
'zendesk_api_host'
:
settings
.
ZENDESK_URL
,
'access_token'
:
settings
.
ZENDESK_OAUTH_ACCESS_TOKEN
,
'custom_fields'
:
settings
.
ZENDESK_CUSTOM_FIELDS
}
# Tag all issues with LMS to distinguish channel in Zendesk; requested by student support team
zendesk_tags
=
[
'LMS'
]
# Per edX support, we would like to be able to route feedback items by site via tagging
current_site_name
=
configuration_helpers
.
get_value
(
"SITE_NAME"
)
if
current_site_name
:
current_site_name
=
current_site_name
.
replace
(
"."
,
"_"
)
zendesk_tags
.
append
(
"site_name_{site}"
.
format
(
site
=
current_site_name
))
if
request
.
user
.
is_authenticated
():
context
[
'user_enrollments'
]
=
CourseEnrollment
.
enrollments_for_user
(
request
.
user
)
enterprise_learner_data
=
enterprise_api
.
get_enterprise_learner_data
(
site
=
request
.
site
,
user
=
request
.
user
)
if
enterprise_learner_data
:
zendesk_tags
.
append
(
'enterprise_learner'
)
context
[
'zendesk_tags'
]
=
zendesk_tags
return
render_to_response
(
"support/contact_us.html"
,
context
)
lms/templates/support/contact_us.html
View file @
68890dab
...
...
@@ -4,7 +4,7 @@
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
utils
.
translation
import
ugettext
as
_
from
openedx
.
core
.
djangolib
.
js_utils
import
js_escaped_string
from
openedx
.
core
.
djangolib
.
js_utils
import
js_escaped_string
,
dump_js_escaped_json
%
>
<
%
inherit
file=
"../main.html"
/>
...
...
@@ -33,9 +33,10 @@ from openedx.core.djangolib.js_utils import js_escaped_string
'loginQuery': "/login${login_query() | n, js_escaped_string}",
'dashboardUrl': "${reverse('dashboard') | n, js_escaped_string}",
'homepageUrl': "${marketing_link('ROOT') | n, js_escaped_string}",
'zendeskApiHost': "${zendesk
ApiH
ost | n, js_escaped_string}",
'zendeskApiHost': "${zendesk
_api_h
ost | n, js_escaped_string}",
'accessToken': "${access_token | n, js_escaped_string}",
'customFields': "${custom_fields | n, js_escaped_string}",
'customFields': ${custom_fields | n, dump_js_escaped_json},
'zendeskTags': ${zendesk_tags | n, dump_js_escaped_json},
}
% if user.is_authenticated():
...
...
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