Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
f80152cb
Commit
f80152cb
authored
May 31, 2017
by
Asad Azam
Committed by
AsadAzam
Jun 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed start date cannot be in the past validation on course run
parent
e35c51d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
17 deletions
+0
-17
course_discovery/apps/publisher/forms.py
+0
-3
course_discovery/apps/publisher/tests/test_forms.py
+0
-5
course_discovery/conf/locale/en/LC_MESSAGES/django.po
+0
-4
course_discovery/conf/locale/eo/LC_MESSAGES/django.po
+0
-5
No files found.
course_discovery/apps/publisher/forms.py
View file @
f80152cb
...
@@ -6,7 +6,6 @@ from django import forms
...
@@ -6,7 +6,6 @@ from django import forms
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
from
django.db.models.functions
import
Lower
from
django.db.models.functions
import
Lower
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.utils
import
timezone
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
from
opaque_keys
import
InvalidKeyError
from
opaque_keys
import
InvalidKeyError
from
opaque_keys.edx.keys
import
CourseKey
from
opaque_keys.edx.keys
import
CourseKey
...
@@ -324,8 +323,6 @@ class CustomCourseRunForm(CourseRunForm):
...
@@ -324,8 +323,6 @@ class CustomCourseRunForm(CourseRunForm):
max_effort
=
cleaned_data
.
get
(
"max_effort"
)
max_effort
=
cleaned_data
.
get
(
"max_effort"
)
start
=
cleaned_data
.
get
(
"start"
)
start
=
cleaned_data
.
get
(
"start"
)
end
=
cleaned_data
.
get
(
"end"
)
end
=
cleaned_data
.
get
(
"end"
)
if
start
and
start
<
timezone
.
now
():
raise
ValidationError
({
'start'
:
_
(
'Start date cannot be in the Past'
)})
if
start
and
end
and
start
>
end
:
if
start
and
end
and
start
>
end
:
raise
ValidationError
({
'start'
:
_
(
'Start date cannot be after the End date'
)})
raise
ValidationError
({
'start'
:
_
(
'Start date cannot be after the End date'
)})
if
min_effort
and
max_effort
and
min_effort
>
max_effort
:
if
min_effort
and
max_effort
and
min_effort
>
max_effort
:
...
...
course_discovery/apps/publisher/tests/test_forms.py
View file @
f80152cb
...
@@ -111,11 +111,6 @@ class PublisherCourseRunEditFormTests(TestCase):
...
@@ -111,11 +111,6 @@ class PublisherCourseRunEditFormTests(TestCase):
with
self
.
assertRaises
(
ValidationError
):
with
self
.
assertRaises
(
ValidationError
):
run_form
.
clean
()
run_form
.
clean
()
run_form
.
cleaned_data
=
{
'start'
:
current_datetime
-
timedelta
(
days
=
3
),
'end'
:
current_datetime
+
timedelta
(
days
=
3
)}
with
self
.
assertRaises
(
ValidationError
):
run_form
.
clean
()
run_form
.
cleaned_data
[
'start'
]
=
current_datetime
+
timedelta
(
days
=
1
)
run_form
.
cleaned_data
[
'start'
]
=
current_datetime
+
timedelta
(
days
=
1
)
run_form
.
cleaned_data
[
'end'
]
=
current_datetime
+
timedelta
(
days
=
3
)
run_form
.
cleaned_data
[
'end'
]
=
current_datetime
+
timedelta
(
days
=
3
)
self
.
assertEqual
(
run_form
.
clean
(),
run_form
.
cleaned_data
)
self
.
assertEqual
(
run_form
.
clean
(),
run_form
.
cleaned_data
)
course_discovery/conf/locale/en/LC_MESSAGES/django.po
View file @
f80152cb
...
@@ -675,10 +675,6 @@ msgid "Video Language"
...
@@ -675,10 +675,6 @@ msgid "Video Language"
msgstr ""
msgstr ""
#: apps/publisher/forms.py
#: apps/publisher/forms.py
msgid "Start date cannot be in the Past"
msgstr ""
#: apps/publisher/forms.py
msgid "Start date cannot be after the End date"
msgid "Start date cannot be after the End date"
msgstr ""
msgstr ""
...
...
course_discovery/conf/locale/eo/LC_MESSAGES/django.po
View file @
f80152cb
...
@@ -800,11 +800,6 @@ msgid "Video Language"
...
@@ -800,11 +800,6 @@ msgid "Video Language"
msgstr "Vïdéö Längüägé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
msgstr "Vïdéö Längüägé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: apps/publisher/forms.py
#: apps/publisher/forms.py
msgid "Start date cannot be in the Past"
msgstr ""
"Stärt däté çännöt ßé ïn thé Päst Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#"
#: apps/publisher/forms.py
msgid "Start date cannot be after the End date"
msgid "Start date cannot be after the End date"
msgstr ""
msgstr ""
"Stärt däté çännöt ßé äftér thé Énd däté Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"Stärt däté çännöt ßé äftér thé Énd däté Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
...
...
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