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
9296a555
Commit
9296a555
authored
Jun 16, 2017
by
Asad Azam
Committed by
AsadAzam
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Optional/Required Fields in Courses and Course Runs
parent
08eec630
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
10 deletions
+16
-10
course_discovery/apps/publisher/models.py
+4
-2
course_discovery/templates/publisher/course_detail.html
+1
-1
course_discovery/templates/publisher/course_run/edit_run_form.html
+2
-2
course_discovery/templates/publisher/course_run_detail/_all.html
+4
-2
course_discovery/templates/publisher/course_run_detail/_drupal.html
+4
-2
course_discovery/templates/publisher/course_run_detail/_salesforce.html
+1
-1
No files found.
course_discovery/apps/publisher/models.py
View file @
9296a555
...
...
@@ -537,7 +537,7 @@ class CourseState(TimeStampedModel, ChangedByMixin):
return
all
([
course
.
title
,
course
.
number
,
course
.
short_description
,
course
.
full_description
,
course
.
organizations
.
first
(),
course
.
level_type
,
course
.
expected_learnings
,
course
.
pr
erequisites
,
course
.
pr
imary_subject
,
course
.
image
,
course
.
course_team_admin
course
.
primary_subject
,
course
.
image
,
course
.
course_team_admin
])
@transition
(
field
=
name
,
source
=
'*'
,
target
=
CourseStateChoices
.
Draft
)
...
...
@@ -658,7 +658,9 @@ class CourseRunState(TimeStampedModel, ChangedByMixin):
course_run
.
course
.
course_state
.
is_approved
,
course_run
.
has_valid_seats
,
course_run
.
start
,
course_run
.
end
,
course_run
.
pacing_type
,
course_run
.
has_valid_staff
,
course_run
.
is_valid_micromasters
,
course_run
.
is_valid_professional_certificate
,
course_run
.
is_valid_xseries
,
course_run
.
language
,
course_run
.
transcript_languages
.
all
(),
course_run
.
lms_course_id
course_run
.
transcript_languages
.
all
(),
course_run
.
lms_course_id
,
course_run
.
min_effort
,
course_run
.
max_effort
,
course_run
.
video_language
])
def
__str__
(
self
):
...
...
course_discovery/templates/publisher/course_detail.html
View file @
9296a555
...
...
@@ -158,7 +158,7 @@
</div>
<div
class=
"current prerequisites"
>
{% with object.prerequisites as field %}
{% include "publisher/_render_
required
_field.html" %}
{% include "publisher/_render_
optional
_field.html" %}
{% endwith %}
</div>
<div
class=
"show-diff"
></div>
...
...
course_discovery/templates/publisher/course_run/edit_run_form.html
View file @
9296a555
...
...
@@ -219,7 +219,7 @@
</div>
</div>
<div
class=
"field-title"
>
{% trans "ESTIMATED EFFORT" %}
<span
class=
"
optional float-right"
>
Optional
</span></div>
<div
class=
"field-title"
>
{% trans "ESTIMATED EFFORT" %}
<span
class=
"
required float-right"
>
* Required for review
</span></div>
<div
class=
"row"
>
<div
class=
"col col-6"
>
{% trans "The number of hours per week the learner should expect to spend on the course. This may be a range." %}
...
...
@@ -253,7 +253,7 @@
<label
class=
"field-label "
>
{{ run_form.transcript_languages.label_tag }}
<span
class=
"required"
>
*
</span></label>
{{ run_form.transcript_languages}}
<label
class=
"field-label margin-top20"
>
{{ run_form.video_language.label_tag }}
</label>
<label
class=
"field-label margin-top20"
>
{{ run_form.video_language.label_tag }}
<span
class=
"required"
>
*
</span>
</label>
{{ run_form.video_language}}
</div>
</div>
...
...
course_discovery/templates/publisher/course_run_detail/_all.html
View file @
9296a555
...
...
@@ -95,7 +95,9 @@
{% if object.min_effort and object.max_effort %}
{{ object.min_effort }}-{{ object.max_effort }} {% trans "hours per week" %}
{% else %}
{% trans "(Optional) Not yet added" %}
{% with object.estimated_effort as field %}
{% include "publisher/_render_required_field.html" %}
{% endwith %}
{% endif %}
</div>
</div>
...
...
@@ -128,7 +130,7 @@
</div>
<div>
{% with object.video_language as field %}
{% include "publisher/_render_
optional
_field.html" %}
{% include "publisher/_render_
required
_field.html" %}
{% endwith %}
</div>
</div>
...
...
course_discovery/templates/publisher/course_run_detail/_drupal.html
View file @
9296a555
...
...
@@ -139,7 +139,9 @@
{% if object.min_effort and object.max_effort %}
{{ object.min_effort }} {% trans "to" %} {{ object.max_effort }} {% trans "hours per week" %}
{% else %}
{% trans "(Optional) Not yet added" %}
{% with object.estimated_effort as field %}
{% include "publisher/_render_required_field.html" %}
{% endwith %}
{% endif %}
</div>
</div>
...
...
@@ -222,7 +224,7 @@
</div>
<div
class=
"copy"
>
{% with object.prerequisite as field %}
{% include "publisher/_render_
required
_field.html" %}
{% include "publisher/_render_
optional
_field.html" %}
{% endwith %}
</div>
</div>
...
...
course_discovery/templates/publisher/course_run_detail/_salesforce.html
View file @
9296a555
...
...
@@ -87,7 +87,7 @@
</div>
<div
class=
"copy"
>
{% with object.video_language as field %}
{% include "publisher/_render_
optional
_field.html" %}
{% include "publisher/_render_
required
_field.html" %}
{% endwith %}
</div>
</div>
...
...
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