Skip to content

Commit

Permalink
Merge pull request #297 from ucsd-ets/release-candidate
Browse files Browse the repository at this point in the history
Release - 12/02/2020
  • Loading branch information
imhassantariq authored Feb 12, 2020
2 parents adff13c + 99e3cb5 commit 3c3f2ae
Show file tree
Hide file tree
Showing 30 changed files with 347 additions and 299 deletions.
1 change: 1 addition & 0 deletions cms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,3 +635,4 @@
########################## Derive Any Derived Settings #######################

derive_settings(__name__)
INSTALLED_APPS.append('openedx.features.ucsd_features')
5 changes: 2 additions & 3 deletions common/djangoapps/student/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def student_dashboard(request):
valid_verification_statuses = ['approved', 'must_reverify', 'pending', 'expired']
display_sidebar_on_dashboard = (len(order_history_list) or
(verification_status['status'] in valid_verification_statuses and
verification_status['should_display']))
verification_status['should_display']))

# Filter out any course enrollment course cards that are associated with fulfilled entitlements
for entitlement in [e for e in course_entitlements if e.enrollment_course_run is not None]:
Expand Down Expand Up @@ -871,14 +871,13 @@ def student_dashboard(request):
# course_id for which AuthorizeNet transaction has been perfromed but notification is yet to be received.
transaction_hash = request.COOKIES.get(ECOMMERCE_TRANSACTION_COOKIE_NAME)
if transaction_hash:
decoded_course_id = base64.b64decode(transaction_hash)
decoded_course_id = base64.b64decode(transaction_hash)
transaction_course_id = CourseKey.from_string(decoded_course_id)
pending_transaction_course_name = CourseOverview.get_from_id(transaction_course_id).display_name
context.update({
'pending_upgrade_course_name': pending_transaction_course_name,
})


if ecommerce_service.is_enabled(request.user):
context.update({
'use_ecommerce_payment_flow': True,
Expand Down
4 changes: 3 additions & 1 deletion lms/djangoapps/commerce/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def is_account_activation_requirement_disabled():

class EcommerceService(object):
""" Helper class for ecommerce service integration. """

def __init__(self):
self.config = CommerceConfiguration.current()

Expand Down Expand Up @@ -312,7 +313,8 @@ def _process_refund(refund_ids, api_client, mode, user, always_notify=False):
# the "Refund Failure" emails from ecommerce and thus no need to send that notification
# from here.
if settings.FEATURES.get('DISABLE_REFUND_FAILURE_NOTIFICATION'):
log.info('Skipping refund failure support notification')
log.info('Skipping support notification for refund failure from edx-platform.'
'The email will be sent from the ecommerce service')
return True
return _send_refund_notification(user, refunds_requiring_approval)
except: # pylint: disable=bare-except
Expand Down
12 changes: 6 additions & 6 deletions lms/djangoapps/courseware/date_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class VerifiedUpgradeDeadlineDate(DateSummary):
Verified track.
"""
css_class = 'verified-upgrade-deadline'
link_text = ugettext_lazy('Upgrade to Verified Certificate')
link_text = ugettext_lazy('Update Enrollment to Earn Statement of Accomplishment')

@property
def link(self):
Expand Down Expand Up @@ -470,9 +470,9 @@ def date(self):
def title(self):
dynamic_deadline = self._dynamic_deadline()
if dynamic_deadline is not None:
return _('Upgrade to Verified Certificate')
return _('Update Enrollment to Earn Statement of Accomplishment')

return _('Verification Upgrade Deadline')
return _('Statement of Accomplishment Enrollment Deadline')

def _dynamic_deadline(self):
if not self.enrollment:
Expand All @@ -484,10 +484,10 @@ def _dynamic_deadline(self):
def description(self):
dynamic_deadline = self._dynamic_deadline()
if dynamic_deadline is not None:
return _('Don\'t miss the opportunity to highlight your new knowledge and skills by earning a verified'
' certificate.')
return _('Don\'t miss the opportunity to highlight your new knowledge and skills by'
' earning a Statement of Accomplishment')

return _('You are still eligible to upgrade to a Verified Certificate! '
return _('You are still eligible to update your enrollment and earn a Statement of Accomplishment! '
'Pursue it to highlight the knowledge and skills you gain in this course.')

@property
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/tests/test_date_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def test_date_with_self_paced_with_enrollment_before_course_start(self):
self._check_text(block)

def _check_text(self, upgrade_date_summary):
self.assertEqual(upgrade_date_summary.title, 'Upgrade to Verified Certificate')
self.assertEqual(upgrade_date_summary.title, 'Update Enrollment to Earn Statement of Accomplishment')
self.assertEqual(
upgrade_date_summary.description,
'Don\'t miss the opportunity to highlight your new knowledge and skills by earning a verified'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class StudentAccountDeletion extends React.Component {
render() {
const { deletionModalOpen, socialAuthConnected, isActive } = this.state;
const loseAccessText = StringUtils.interpolate(
gettext('You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion, follow the instructions for {htmlStart}printing or downloading a certificate{htmlEnd}.'),
gettext('You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion, follow the instructions for {htmlStart}printing or downloading a statement of accomplishment{htmlEnd}.'),
{
htmlStart: '<a href="https://edx.readthedocs.io/projects/edx-guide-for-students/en/latest/SFD_certificates.html#printing-a-certificate" target="_blank">',
htmlEnd: '</a>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class StudentAccountDeletionConfirmationModal extends React.Component {
} = this.state;
const { onClose } = this.props;
const loseAccessText = StringUtils.interpolate(
gettext('You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion, follow the instructions for {htmlStart}printing or downloading a certificate{htmlEnd}.'),
gettext('You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion, follow the instructions for {htmlStart}printing or downloading a statement of accomplishment{htmlEnd}.'),
{
htmlStart: '<a href="https://edx.readthedocs.io/projects/edx-guide-for-students/en/latest/SFD_certificates.html#printing-a-certificate" target="_blank">',
htmlEnd: '</a>',
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/user_api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ class LocalizedJSONEncoder(DjangoJSONEncoder):
JSON handler that evaluates ugettext_lazy promises.
"""
# pylint: disable=method-hidden

def default(self, obj):
"""
Forces evaluation of ugettext_lazy promises.
Expand Down Expand Up @@ -516,7 +517,6 @@ def _inner(request): # pylint: disable=missing-docstring
else:
response.content = msg


# Return the response, preserving the original headers.
# This is really important, since the student views set cookies
# that are used elsewhere in the system (such as the marketing site).
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/zendesk_proxy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

log = logging.getLogger(__name__)


def create_zendesk_ticket(requester_name, requester_email, subject, body, custom_fields=None, uploads=None, tags=None):
"""
Create a Zendesk ticket via API or send an email to support team.
Expand Down
9 changes: 7 additions & 2 deletions openedx/core/lib/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from xmodule.assetstore.assetmgr import AssetManager
from xmodule.contentstore.content import StaticContent
from xmodule.contentstore.django import contentstore
from xmodule.exceptions import NotFoundError
from xmodule.modulestore.django import modulestore


Expand All @@ -32,8 +33,12 @@ def course_image_url(course, image_key='course_image'):
url = settings.STATIC_URL + settings.DEFAULT_COURSE_ABOUT_IMAGE_URL
else:
loc = StaticContent.compute_location(course.id, getattr(course, image_key))
url = StaticContent.serialize_asset_key_with_slash(loc)

try:
AssetManager.find(loc)
except NotFoundError:
url = '/static/' + settings.DEFAULT_COURSE_ABOUT_IMAGE_URL
else:
url = StaticContent.serialize_asset_key_with_slash(loc)
return url


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h3 class="hd-6 section-title">${_("Course Tools")}</h3>
% endif
% if upgrade_url and upgrade_price:
<div class="section section-upgrade course-home-sidebar-upgrade">
<h3 class="hd hd-6">${_("Pursue a verified certificate")}</h3>
<h3 class="hd hd-6">${_("Pursue a Statement of Accomplishment")}</h3>
<img src="https://courses.edx.org/static/images/edx-verified-mini-cert.png" alt="">
<div class="upgrade-container">
<p>
Expand Down
12 changes: 11 additions & 1 deletion openedx/features/ucsd_features/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from django.conf import settings
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.db.models.signals import post_save, pre_save

from lms.djangoapps.verify_student.models import ManualVerification
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from student.models import UserProfile


Expand All @@ -29,3 +30,12 @@ def generate_manual_verification_for_user(sender, instance, created, **kwargs):
)
except Exception: # pylint: disable=broad-except
logger.error('Error while generating ManualVerification for user: %s', instance.user.email, exc_info=True)


@receiver(pre_save, sender=CourseOverview)
def course_image_change(sender, instance, **kwargs):
"""
Change the default course image whenever new course is created
"""
if instance.course_image_url.endswith('images_course_image.jpg'):
instance.course_image_url = "/static/" + settings.DEFAULT_COURSE_ABOUT_IMAGE_URL
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<tr>
<td>
<p>Hello,</p>
<p>LearnX was not able to process a user request, and we need to take action.</p>
<p>UC San Diego Online was not able to process a user request, and we need to take action.</p>
<p>Here are the details:</p>
<p>Learner: {{name}} ({{email}})</p>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content %}
Hello,
LearnX was not able to process a user request, and we need to take action.
UC San Diego Online was not able to process a user request, and we need to take action.
Here are the details:
Learner: {{name}} ({{email}})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% load i18n %}

{% blocktrans %}[LearnX] Administrative Action Needed {{name}} {% endblocktrans %}{% if course %}{% blocktrans %}/ {{course}}{% endblocktrans %}{% endif %}
{% blocktrans %}[online.ucsd.edu] Open edX Administrative Action Needed for {{name}} {% endblocktrans %}{% if course %}{% blocktrans %}/ {{course}}{% endblocktrans %}{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<tr>
<td>
<p>Hello,</p>
<p>We were contacted by a user on LearnX @ UC San Diego. Please take a moment to review and respond.</p>
<p>We were contacted by a user on UC San Diego Online. Please take a moment to review and respond.</p>
<p>Learner: {{name}} ({{email}})</p>
<p>
{% if course %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content %}
Hello,
We were contacted by a user on LearnX @ UC San Diego. Please take a moment to review and respond.
We were contacted by a user on UC San Diego Online. Please take a moment to review and respond.
Learner: {{name}} ({{email}})
{% if course %}
Course: {{course}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% load i18n %}

{% blocktrans %}[LearnX] Support / Information Request {{name}}{% endblocktrans %} {% if course %}{% blocktrans %}/ {{course}}{% endblocktrans %}{% endif %}
{% blocktrans %}[UC San Diego Online] Support / Information Request {{name}}{% endblocktrans %} {% if course %}{% blocktrans %}/ {{course}}{% endblocktrans %}{% endif %}
6 changes: 3 additions & 3 deletions pavelib/paver_tests/test_paver_pytest_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def _expected_command(self, root, test_id, pytestSubclass, run_under_coverage=Tr
else:
django_env_var_cmd = "export DJANGO_SETTINGS_MODULE='openedx.tests.settings'"

xdist_string = '--tx {}*ssh="ubuntu@{} -o StrictHostKeyChecking=no"' \
'//python="source /edx/app/edxapp/edxapp_env; {}; python"' \
'//chdir="/edx/app/edxapp/edx-platform"' \
xdist_string = '--tx {}*ssh="jenkins@{} -o StrictHostKeyChecking=no"' \
'//python="source edx-venv/bin/activate; {}; python"' \
'//chdir="edx-platform"' \
.format(processes, ip, django_env_var_cmd)
expected_statement.append(xdist_string)
for rsync_dir in Env.rsync_dirs():
Expand Down
12 changes: 6 additions & 6 deletions pavelib/utils/test/suites/pytest_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ def cmd(self):
# The django settings runtime command does not propagate to xdist remote workers
django_env_var_cmd = 'export DJANGO_SETTINGS_MODULE={}' \
.format('{}.envs.{}'.format(self.root, self.settings))
xdist_string = '--tx {}*ssh="ubuntu@{} -o StrictHostKeyChecking=no"' \
'//python="source /edx/app/edxapp/edxapp_env; {}; python"' \
'//chdir="/edx/app/edxapp/edx-platform"' \
xdist_string = '--tx {}*ssh="jenkins@{} -o StrictHostKeyChecking=no"' \
'//python="source edx-venv/bin/activate; {}; python"' \
'//chdir="edx-platform"' \
.format(xdist_remote_processes, ip, django_env_var_cmd)
cmd.append(xdist_string)
for rsync_dir in Env.rsync_dirs():
Expand Down Expand Up @@ -284,9 +284,9 @@ def cmd(self):
django_env_var_cmd = "export DJANGO_SETTINGS_MODULE='lms.envs.test'"
else:
django_env_var_cmd = "export DJANGO_SETTINGS_MODULE='openedx.tests.settings'"
xdist_string = '--tx {}*ssh="ubuntu@{} -o StrictHostKeyChecking=no"' \
'//python="source /edx/app/edxapp/edxapp_env; {}; python"' \
'//chdir="/edx/app/edxapp/edx-platform"' \
xdist_string = '--tx {}*ssh="jenkins@{} -o StrictHostKeyChecking=no"' \
'//python="source edx-venv/bin/activate; {}; python"' \
'//chdir="edx-platform"' \
.format(xdist_remote_processes, ip, django_env_var_cmd)
cmd.append(xdist_string)
for rsync_dir in Env.rsync_dirs():
Expand Down
10 changes: 5 additions & 5 deletions scripts/Jenkinsfiles/bokchoy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def runBokchoyTests() {
checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: git_branch]],
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', honorRefspec: true,
noTags: true, shallow: true]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins-worker',
refspec: git_refspec, url: "[email protected]:edx/${REPO_NAME}.git"]]]
refspec: git_refspec, url: "[email protected]:ucsd-ets/${REPO_NAME}.git"]]]
console_output = sh(returnStdout: true, script: 'bash scripts/all-tests.sh').trim()
dir('stdout') {
writeFile file: "${TEST_SUITE}-${SHARD}-stdout.log", text: console_output
Expand Down Expand Up @@ -43,7 +43,7 @@ pipeline {
build job: 'github-build-status',
parameters: [
string(name: 'GIT_SHA', value: commit_sha),
string(name: 'GITHUB_ORG', value: 'edx'),
string(name: 'GITHUB_ORG', value: 'ucsd-ets'),
string(name: 'GITHUB_REPO', value: "${REPO_NAME}"),
string(name: 'TARGET_URL', value: "${BUILD_URL}"),
string(name: 'DESCRIPTION', value: 'Pending'),
Expand Down Expand Up @@ -103,7 +103,7 @@ pipeline {
build job: 'github-build-status',
parameters: [
string(name: 'GIT_SHA', value: commit_sha),
string(name: 'GITHUB_ORG', value: 'edx'),
string(name: 'GITHUB_ORG', value: 'ucsd-ets'),
string(name: 'GITHUB_REPO', value: "${REPO_NAME}"),
string(name: 'TARGET_URL', value: "${BUILD_URL}"),
string(name: 'DESCRIPTION', value: build_description),
Expand All @@ -127,12 +127,12 @@ pipeline {
}
}
emailext body: email_body,
subject: "Build failed in Jenkins: ${JOB_NAME} #${BUILD_NUMBER}", to: '[email protected]'
subject: "Build failed in Jenkins: ${JOB_NAME} #${BUILD_NUMBER}", to: '[email protected]'
} else if (currentBuild.currentResult == "SUCCESS" && currentBuild.previousBuild.currentResult != "SUCCESS") {
slackSend botUser: true,
message: "`${JOB_NAME}` #${BUILD_NUMBER}: Back to normal after ${currentBuild.durationString.replace(' and counting', '')}\\n${BUILD_URL}"
emailext body: "See <${BUILD_URL}>",
subject: "Jenkins Build is back to normal: ${JOB_NAME} #${BUILD_NUMBER}", to: '[email protected]'
subject: "Jenkins Build is back to normal: ${JOB_NAME} #${BUILD_NUMBER}", to: '[email protected]'
}
}
}
Expand Down
Loading

0 comments on commit 3c3f2ae

Please sign in to comment.