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
be3dd7e4
Commit
be3dd7e4
authored
6 years ago
by
Gabe Mulley
Committed by
Matthew Piatetsky
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
REV-655: Fix upgrade deadline bug
parent
5479dbf5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/features/course_duration_limits/access.py
+3
-4
3 additions, 4 deletions
openedx/features/course_duration_limits/access.py
with
3 additions
and
4 deletions
openedx/features/course_duration_limits/access.py
+
3
−
4
View file @
be3dd7e4
...
...
@@ -140,7 +140,7 @@ def register_course_expired_message(request, course):
upgrade_deadline
=
enrollment
.
upgrade_deadline
now
=
timezone
.
now
()
course_upgrade_deadline
=
enrollment
.
course_upgrade_deadline
if
upgrade_deadline
and
now
>
upgrade_deadline
:
if
(
not
upgrade_deadline
)
or
(
now
>
upgrade_deadline
)
:
upgrade_deadline
=
course_upgrade_deadline
expiration_message
=
_
(
'
{strong_open}Audit Access Expires {expiration_date}{strong_close}
'
...
...
@@ -150,7 +150,7 @@ def register_course_expired_message(request, course):
'
as long as it exists on the site. {a_open}Upgrade now{sronly_span_open} to
'
'
retain access past {expiration_date}{span_close}{a_close}
'
)
full_message
=
expiration_message
if
course_
upgrade_deadline
and
now
<
course_
upgrade_deadline
:
if
upgrade_deadline
and
now
<
upgrade_deadline
:
full_message
+=
upgrade_deadline_message
using_upgrade_messaging
=
True
else
:
...
...
@@ -163,13 +163,12 @@ def register_course_expired_message(request, course):
else
:
formatted_expiration_date
=
strftime_localized
(
expiration_date
,
'
%b. %-d, %Y
'
)
if
upgrade_
deadl
in
e
:
if
using_
upgrade_
messag
in
g
:
if
language_is_es
:
formatted_upgrade_deadline
=
strftime_localized
(
upgrade_deadline
,
'
%-d de %b. de %Y
'
).
lower
()
else
:
formatted_upgrade_deadline
=
strftime_localized
(
upgrade_deadline
,
'
%b. %-d, %Y
'
)
if
using_upgrade_messaging
:
PageLevelMessages
.
register_info_message
(
request
,
Text
(
full_message
).
format
(
...
...
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