Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions openedx/core/djangoapps/content/course_overviews/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

LOG = logging.getLogger(__name__)


COURSE_START_DATE_CHANGED = Signal(providing_args=["updated_course_overview", "previous_start_date"])
COURSE_PACING_CHANGED = Signal(providing_args=["updated_course_overview", "previous_self_paced"])
# providing_args=["updated_course_overview", "previous_start_date"]
COURSE_START_DATE_CHANGED = Signal()
# providing_args=["updated_course_overview", "previous_self_paced"]
COURSE_PACING_CHANGED = Signal()


@receiver(SignalHandler.course_published)
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content/learning_sequences/apps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# lint-amnesty, pylint: disable=missing-module-docstring
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from edx_proctoring.runtime import set_runtime_service


Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content_libraries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
from django.core.exceptions import PermissionDenied
from django.core.validators import validate_unicode_slug
from django.db import IntegrityError
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from elasticsearch.exceptions import ConnectionError as ElasticConnectionError
from lxml import etree
from opaque_keys.edx.keys import LearningContextKey, UsageKey
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content_libraries/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Constants used for the content libraries. """
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

# ./api.py and ./views.py are only used in Studio, so we always work with this draft of any
# content library bundle:
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content_libraries/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from django.core.exceptions import ValidationError
from django.db import models
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from opaque_keys.edx.django.models import CourseKeyField
from opaque_keys.edx.locator import LibraryLocatorV2
Expand Down
17 changes: 11 additions & 6 deletions openedx/core/djangoapps/content_libraries/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@

from django.dispatch import Signal

CONTENT_LIBRARY_CREATED = Signal(providing_args=['library_key'])
CONTENT_LIBRARY_UPDATED = Signal(providing_args=['library_key', 'update_blocks'])
CONTENT_LIBRARY_DELETED = Signal(providing_args=['library_key'])
LIBRARY_BLOCK_CREATED = Signal(providing_args=['library_key', 'usage_key'])
LIBRARY_BLOCK_DELETED = Signal(providing_args=['library_key', 'usage_key'])
LIBRARY_BLOCK_UPDATED = Signal(providing_args=['library_key', 'usage_key'])
# providing_args=['library_key']
CONTENT_LIBRARY_CREATED = Signal()
# providing_args=['library_key', 'update_blocks']
CONTENT_LIBRARY_UPDATED = Signal()
# providing_args=['library_key']
CONTENT_LIBRARY_DELETED = Signal()

# Same providing_args=['library_key', 'usage_key'] for next 3 signals.
LIBRARY_BLOCK_CREATED = Signal()
LIBRARY_BLOCK_DELETED = Signal()
LIBRARY_BLOCK_UPDATED = Signal()
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/discussions/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from django.conf import settings
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_noop as _
from django.utils.translation import gettext_noop as _
from opaque_keys.edx.keys import CourseKey

from openedx.core.djangoapps.course_apps.plugins import CourseApp
Expand Down
12 changes: 6 additions & 6 deletions openedx/core/djangoapps/django_comment_common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.db.models.signals import post_save
from django.dispatch import receiver

from django.utils.translation import ugettext_noop
from django.utils.translation import gettext_noop
from jsonfield.fields import JSONField
from opaque_keys.edx.django.models import CourseKeyField

Expand All @@ -22,11 +22,11 @@
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError

FORUM_ROLE_ADMINISTRATOR = ugettext_noop('Administrator')
FORUM_ROLE_MODERATOR = ugettext_noop('Moderator')
FORUM_ROLE_GROUP_MODERATOR = ugettext_noop('Group Moderator')
FORUM_ROLE_COMMUNITY_TA = ugettext_noop('Community TA')
FORUM_ROLE_STUDENT = ugettext_noop('Student')
FORUM_ROLE_ADMINISTRATOR = gettext_noop('Administrator')
FORUM_ROLE_MODERATOR = gettext_noop('Moderator')
FORUM_ROLE_GROUP_MODERATOR = gettext_noop('Group Moderator')
FORUM_ROLE_COMMUNITY_TA = gettext_noop('Community TA')
FORUM_ROLE_STUDENT = gettext_noop('Student')


@receiver(post_save, sender=CourseEnrollment)
Expand Down
23 changes: 12 additions & 11 deletions openedx/core/djangoapps/django_comment_common/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

from django.dispatch import Signal

thread_created = Signal(providing_args=['user', 'post'])
thread_edited = Signal(providing_args=['user', 'post'])
thread_voted = Signal(providing_args=['user', 'post'])
thread_deleted = Signal(providing_args=['user', 'post'])
thread_followed = Signal(providing_args=['user', 'post'])
thread_unfollowed = Signal(providing_args=['user', 'post'])
comment_created = Signal(providing_args=['user', 'post'])
comment_edited = Signal(providing_args=['user', 'post'])
comment_voted = Signal(providing_args=['user', 'post'])
comment_deleted = Signal(providing_args=['user', 'post'])
comment_endorsed = Signal(providing_args=['user', 'post'])
# Same providing_args=['user', 'post'] for all following signals.
thread_created = Signal()
thread_edited = Signal()
thread_voted = Signal()
thread_deleted = Signal()
thread_followed = Signal()
thread_unfollowed = Signal()
comment_created = Signal()
comment_edited = Signal()
comment_voted = Signal()
comment_deleted = Signal()
comment_endorsed = Signal()
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/embargo/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import ipaddress
from django import forms
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey

Expand Down
20 changes: 10 additions & 10 deletions openedx/core/djangoapps/embargo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from django.db import models
from django.db.models.signals import post_delete, post_save
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
from django_countries import countries
from django_countries.fields import CountryField
from opaque_keys.edx.django.models import CourseKeyField
Expand Down Expand Up @@ -132,26 +132,26 @@ class RestrictedCourse(models.Model):

course_key = CourseKeyField(
max_length=255, db_index=True, unique=True,
help_text=ugettext_lazy("The course key for the restricted course.")
help_text=gettext_lazy("The course key for the restricted course.")
)

enroll_msg_key = models.CharField(
max_length=255,
choices=ENROLL_MSG_KEY_CHOICES,
default='default',
help_text=ugettext_lazy("The message to show when a user is blocked from enrollment.")
help_text=gettext_lazy("The message to show when a user is blocked from enrollment.")
)

access_msg_key = models.CharField(
max_length=255,
choices=COURSEWARE_MSG_KEY_CHOICES,
default='default',
help_text=ugettext_lazy("The message to show when a user is blocked from accessing a course.")
help_text=gettext_lazy("The message to show when a user is blocked from accessing a course.")
)

disable_access_check = models.BooleanField(
default=False,
help_text=ugettext_lazy(
help_text=gettext_lazy(
"Allow users who enrolled in an allowed country "
"to access restricted courses from excluded countries."
)
Expand Down Expand Up @@ -380,7 +380,7 @@ class Country(models.Model):
"""
country = CountryField(
db_index=True, unique=True,
help_text=ugettext_lazy("Two character ISO country code.")
help_text=gettext_lazy("Two character ISO country code.")
)

def __str__(self):
Expand Down Expand Up @@ -425,7 +425,7 @@ class CountryAccessRule(models.Model):
max_length=255,
choices=RULE_TYPE_CHOICES,
default=BLACKLIST_RULE,
help_text=ugettext_lazy(
help_text=gettext_lazy(
"Whether to include or exclude the given course. "
"If whitelist countries are specified, then ONLY users from whitelisted countries "
"will be able to access the course. If blacklist countries are specified, then "
Expand All @@ -435,13 +435,13 @@ class CountryAccessRule(models.Model):

restricted_course = models.ForeignKey(
"RestrictedCourse",
help_text=ugettext_lazy("The course to which this rule applies."),
help_text=gettext_lazy("The course to which this rule applies."),
on_delete=models.CASCADE,
)

country = models.ForeignKey(
"Country",
help_text=ugettext_lazy("The country to which this rule applies."),
help_text=gettext_lazy("The country to which this rule applies."),
on_delete=models.CASCADE,
)

Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/lang_pref/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import namedtuple

from django.conf import settings
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from openedx.core.djangoapps.dark_lang.models import DarkLangConfig
from openedx.core.djangoapps.site_configuration.helpers import get_value

Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/oauth_dispatch/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from django.db import models

from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django_mysql.models import ListCharField
from oauth2_provider.settings import oauth2_settings
from organizations.models import Organization
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/password_policy/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dateutil.parser import parse as parse_date
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from edx_django_utils.plugins import PluginSettings

from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/password_policy/compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytz
from django.conf import settings
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from openedx.core.djangolib.markup import HTML
from common.djangoapps.util.date_utils import DEFAULT_SHORT_DATE_FORMAT, strftime_localized
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/profile_images/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import piexif
from django.conf import settings
from django.core.files.base import ContentFile
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from PIL import Image

from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_image_storage
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/profile_images/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
from contextlib import closing

from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from pytz import UTC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Migration(migrations.Migration):
('internal_service_url', models.URLField(verbose_name='Internal Service URL')),
('public_service_url', models.URLField(verbose_name='Public Service URL')),
('api_version_number', models.IntegerField(verbose_name='API Version')),
('enable_student_dashboard', models.NullBooleanField(verbose_name='Enable Student Dashboard Displays')),
('enable_student_dashboard', models.BooleanField(verbose_name='Enable Student Dashboard Displays', null=True)),
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
],
options={
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/programs/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Models providing Programs support for the LMS and Studio."""
from config_models.models import ConfigurationModel
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


class ProgramsApiConfig(ConfigurationModel):
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/safe_sessions/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create(cls, session_id, user_id):
safe_cookie_data = SafeCookieData(
cls.CURRENT_VERSION,
session_id,
key_salt=get_random_string(),
key_salt=get_random_string(12),
signature=None,
)
safe_cookie_data.sign(user_id)
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/schedules/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.db.models import F
from django.urls import reverse
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from opaque_keys.edx.keys import CourseKey

from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/schedules/apps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# lint-amnesty, pylint: disable=missing-module-docstring

from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from edx_django_utils.plugins import PluginSignals # lint-amnesty, pylint: disable=unused-import

from openedx.core.djangoapps.plugins.constants import ProjectType # lint-amnesty, pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/schedules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from config_models.models import ConfigurationModel
from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from model_utils import Choices
from model_utils.models import TimeStampedModel
from simple_history.models import HistoricalRecords
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/self_paced/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from config_models.models import ConfigurationModel
from django.db.models import BooleanField
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


class SelfPacedConfiguration(ConfigurationModel):
Expand Down
Loading