Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
269a5744
Unverified
Commit
269a5744
authored
5 years ago
by
Feanil Patel
Browse files
Options
Downloads
Patches
Plain Diff
Fix a few issues we run into when running the discussion tests.
parent
4c07dddc
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/course_goals/handlers.py
+2
-1
2 additions, 1 deletion
lms/djangoapps/course_goals/handlers.py
openedx/core/lib/course_tabs.py
+3
-1
3 additions, 1 deletion
openedx/core/lib/course_tabs.py
with
5 additions
and
2 deletions
lms/djangoapps/course_goals/handlers.py
+
2
−
1
View file @
269a5744
...
...
@@ -6,6 +6,7 @@ from __future__ import absolute_import
from
django.db
import
models
from
django.dispatch
import
receiver
import
six
from
course_modes.models
import
CourseMode
from
student.models
import
CourseEnrollment
...
...
@@ -20,7 +21,7 @@ def update_course_goal_on_enroll_change(sender, instance, **kwargs): # pylint:
1) Set the course goal to
'
certify
'
when the user enrolls as a verified user.
2) Remove the course goal when the user
'
s enrollment is no longer active.
"""
course_id
=
s
tr
(
instance
.
course_id
)
.
decode
(
'
utf8
'
,
'
ignore
'
)
course_id
=
s
ix
.
text_type
(
instance
.
course_id
)
if
not
instance
.
is_active
:
remove_course_goal
(
instance
.
user
,
course_id
)
elif
instance
.
mode
==
CourseMode
.
VERIFIED
:
...
...
This diff is collapsed.
Click to expand it.
openedx/core/lib/course_tabs.py
+
3
−
1
View file @
269a5744
...
...
@@ -4,6 +4,8 @@ Tabs for courseware.
from
__future__
import
absolute_import
from
openedx.core.lib.plugins
import
PluginManager
from
functools
import
cmp_to_key
# Stevedore extension point namespaces
COURSE_TAB_NAMESPACE
=
'
openedx.course_tab
'
...
...
@@ -41,5 +43,5 @@ class CourseTabPluginManager(PluginManager):
else
:
return
1
tab_types
=
list
(
cls
.
get_available_plugins
().
values
())
tab_types
.
sort
(
cmp
=
compare_tabs
)
tab_types
.
sort
(
key
=
cmp_to_key
(
compare_tabs
)
)
return
tab_types
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment