Commit b3cdda94 by Waheed Ahmed

Added FAQ, Video link and learner testimonial fields in course edit form.

ECOM-7618
parent 4d682590
......@@ -141,6 +141,7 @@ class CustomCourseForm(CourseForm):
'expected_learnings', 'primary_subject', 'secondary_subject',
'tertiary_subject', 'prerequisites', 'image', 'team_admin',
'level_type', 'organization', 'is_seo_review', 'syllabus',
'learner_testimonial', 'faq', 'video_link',
)
def __init__(self, *args, **kwargs):
......
......@@ -2101,6 +2101,21 @@ class CourseEditViewTests(TestCase):
self.assertEqual(course_state.name, CourseStateChoices.Review)
self.assertEqual(course_state.owner_role, PublisherUserRole.CourseTeam)
def test_video_link_field(self):
"""
Verify that only internal user can see video link field on course edit page.
"""
self.user.groups.add(Group.objects.get(name=INTERNAL_USER_GROUP_NAME))
response = self.client.get(self.edit_page_url)
self.assertContains(response, 'VIDEO LINK')
# Verify that course team user cannot see video link field.
self.user.groups.remove(Group.objects.get(name=INTERNAL_USER_GROUP_NAME))
self.user.groups.add(self.organization_extension.group)
assign_perm(OrganizationExtension.EDIT_COURSE, self.organization_extension.group, self.organization_extension)
response = self.client.get(self.edit_page_url)
self.assertNotContains(response, 'VIDEO LINK')
@ddt.ddt
class CourseRunEditViewTests(TestCase):
......
......@@ -341,6 +341,14 @@ class CourseEditView(mixins.PublisherPermissionMixin, UpdateView):
return kwargs
def get_context_data(self, **kwargs):
context = super(CourseEditView, self).get_context_data(**kwargs)
context.update(
{'is_internal_user': is_internal_user(self.request.user)}
)
return context
def form_valid(self, form):
"""
If the form is valid, update organization and team_admin.
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-03 16:28+0500\n"
"POT-Creation-Date: 2017-04-05 12:07+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -1981,6 +1981,118 @@ msgid ""
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"Please provide any frequently asked questions and corresponding answers to "
"those questions."
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"The About Video should excite and entice potential students to take your "
"course. Think of it as a movie trailer or TV show promotion. The video "
"should be compelling, and exhibit the instructor’s personality."
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"Length: ideal length is 30-90 seconds (learners typically only watch an "
"average of 30 seconds)"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"Should be produced and edited, using elements such as graphics, stock "
"footage"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "The About video should answer these key questions:"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Why should a learner register?"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "What topics and concepts are covered?"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Who is teaching the course?"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "What institution is delivering the course?"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Naming Specifications:"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Name: InstitutionX_CourseNumber_About.mov"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Post to:"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Technical specifications:"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Codec: H.264"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Container: .mp4"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Resolution: 1920x1080"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Frame Rate: 29.97 fps"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Aspect: 1.0"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Bitrate: 5Mbps VBR"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Audio Codec: AAC 44.1KHz/192 Kbps"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"Visit edX’s Youtube channel for inspiration and examples of other About "
"Videos:"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"A quote from a learner in the course, demonstrating the value of taking the "
"course."
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "Should be no more than 25-50 words in length."
msgstr ""
#: templates/publisher/course_edit_form.html
msgid ""
"“Brilliant course! It's definitely the best introduction to electronics in "
"the world! Interesting material, clean explanations, well prepared quizzes, "
"challenging homeworks and fun labs.” – Previous Student"
msgstr ""
#: templates/publisher/course_edit_form.html
msgid "UPDATE COURSE"
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-03 16:28+0500\n"
"POT-Creation-Date: 2017-04-05 12:07+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-03 16:28+0500\n"
"POT-Creation-Date: 2017-04-05 12:07+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -2360,6 +2360,155 @@ msgstr ""
"çöürsé rün. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢#"
#: templates/publisher/course_edit_form.html
msgid ""
"Please provide any frequently asked questions and corresponding answers to "
"those questions."
msgstr ""
"Pléäsé prövïdé äný fréqüéntlý äskéd qüéstïöns änd çörréspöndïng änswérs tö "
"thösé qüéstïöns. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢ση#"
#: templates/publisher/course_edit_form.html
msgid ""
"The About Video should excite and entice potential students to take your "
"course. Think of it as a movie trailer or TV show promotion. The video "
"should be compelling, and exhibit the instructor’s personality."
msgstr ""
"Thé Àßöüt Vïdéö shöüld éxçïté änd éntïçé pöténtïäl stüdénts tö täké ýöür "
"çöürsé. Thïnk öf ït äs ä mövïé träïlér ör TV shöw prömötïön. Thé vïdéö "
"shöüld ßé çömpéllïng, änd éxhïßït thé ïnstrüçtör’s pérsönälïtý. Ⱡ'σяєм ιρѕυм"
" ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя "
"ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ "
"ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ "
"¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє "
"¢ιłłυм ∂σłσяє єυ ƒυgιαт ηυłłα ραяιαтυя. єχ¢єρтєυя ѕι#"
#: templates/publisher/course_edit_form.html
msgid ""
"Length: ideal length is 30-90 seconds (learners typically only watch an "
"average of 30 seconds)"
msgstr ""
"Léngth: ïdéäl léngth ïs 30-90 séçönds (léärnérs týpïçällý önlý wätçh än "
"ävérägé öf 30 séçönds) Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢#"
#: templates/publisher/course_edit_form.html
msgid ""
"Should be produced and edited, using elements such as graphics, stock "
"footage"
msgstr ""
"Shöüld ßé prödüçéd änd édïtéd, üsïng éléménts süçh äs gräphïçs, stöçk "
"föötägé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєт#"
#: templates/publisher/course_edit_form.html
msgid "The About video should answer these key questions:"
msgstr ""
"Thé Àßöüt vïdéö shöüld änswér thésé kéý qüéstïöns: Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт "
"αмєт, ¢σηѕє¢тєтυя α#"
#: templates/publisher/course_edit_form.html
msgid "Why should a learner register?"
msgstr "Whý shöüld ä léärnér régïstér? Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#"
#: templates/publisher/course_edit_form.html
msgid "What topics and concepts are covered?"
msgstr ""
"Whät töpïçs änd çönçépts äré çövéréd? Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυ#"
#: templates/publisher/course_edit_form.html
msgid "Who is teaching the course?"
msgstr "Whö ïs téäçhïng thé çöürsé? Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє#"
#: templates/publisher/course_edit_form.html
msgid "What institution is delivering the course?"
msgstr ""
"Whät ïnstïtütïön ïs délïvérïng thé çöürsé? Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυя #"
#: templates/publisher/course_edit_form.html
msgid "Naming Specifications:"
msgstr "Nämïng Spéçïfïçätïöns: Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢#"
#: templates/publisher/course_edit_form.html
msgid "Name: InstitutionX_CourseNumber_About.mov"
msgstr ""
"Nämé: ÌnstïtütïönX_ÇöürséNümßér_Àßöüt.möv Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυя #"
#: templates/publisher/course_edit_form.html
msgid "Post to:"
msgstr "Pöst tö: Ⱡ'σяєм ιρѕυм ∂#"
#: templates/publisher/course_edit_form.html
msgid "Technical specifications:"
msgstr "Téçhnïçäl spéçïfïçätïöns: Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕ#"
#: templates/publisher/course_edit_form.html
msgid "Codec: H.264"
msgstr "Çödéç: H.264 Ⱡ'σяєм ιρѕυм ∂σłσя ѕ#"
#: templates/publisher/course_edit_form.html
msgid "Container: .mp4"
msgstr "Çöntäïnér: .mp4 Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт α#"
#: templates/publisher/course_edit_form.html
msgid "Resolution: 1920x1080"
msgstr "Résölütïön: 1920x1080 Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"
#: templates/publisher/course_edit_form.html
msgid "Frame Rate: 29.97 fps"
msgstr "Främé Räté: 29.97 fps Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"
#: templates/publisher/course_edit_form.html
msgid "Aspect: 1.0"
msgstr "Àspéçt: 1.0 Ⱡ'σяєм ιρѕυм ∂σłσя #"
#: templates/publisher/course_edit_form.html
msgid "Bitrate: 5Mbps VBR"
msgstr "Bïträté: 5Mßps VBR Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт#"
#: templates/publisher/course_edit_form.html
msgid "Audio Codec: AAC 44.1KHz/192 Kbps"
msgstr ""
"Àüdïö Çödéç: ÀÀÇ 44.1KHz/192 Kßps Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#"
#: templates/publisher/course_edit_form.html
msgid ""
"Visit edX’s Youtube channel for inspiration and examples of other About "
"Videos:"
msgstr ""
"Vïsït édX’s Ýöütüßé çhännél för ïnspïrätïön änd éxämplés öf öthér Àßöüt "
"Vïdéös: Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєт#"
#: templates/publisher/course_edit_form.html
msgid ""
"A quote from a learner in the course, demonstrating the value of taking the "
"course."
msgstr ""
"À qüöté fröm ä léärnér ïn thé çöürsé, démönsträtïng thé välüé öf täkïng thé "
"çöürsé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#"
#: templates/publisher/course_edit_form.html
msgid "Should be no more than 25-50 words in length."
msgstr ""
"Shöüld ßé nö möré thän 25-50 wörds ïn léngth. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυя #"
#: templates/publisher/course_edit_form.html
msgid ""
"“Brilliant course! It's definitely the best introduction to electronics in "
"the world! Interesting material, clean explanations, well prepared quizzes, "
"challenging homeworks and fun labs.” – Previous Student"
msgstr ""
"“Brïllïänt çöürsé! Ìt's défïnïtélý thé ßést ïntrödüçtïön tö éléçtrönïçs ïn "
"thé wörld! Ìntéréstïng mätérïäl, çléän éxplänätïöns, wéll prépäréd qüïzzés, "
"çhälléngïng höméwörks änd fün läßs.” – Prévïöüs Stüdént Ⱡ'σяєм ιρѕυм ∂σłσя "
"ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт "
"łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ "
"єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ "
"αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє ¢ιłłυм ∂σłσяє єυ "
"ƒυgιαт ηυłłα ραяιαтυя. єχ¢єρтєυя ѕιηт#"
#: templates/publisher/course_edit_form.html
msgid "UPDATE COURSE"
msgstr "ÛPDÀTÉ ÇÖÛRSÉ Ⱡ'σяєм ιρѕυм ∂σłσя ѕι#"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-03 16:28+0500\n"
"POT-Creation-Date: 2017-04-05 12:07+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -381,6 +381,104 @@
{{ form.level_type }}
</div>
</div>
<div class="field-title">{{ form.faq.label }}</div>
<div class="row">
<div class="col col-6 help-text">
<p>{% trans "Please provide any frequently asked questions and corresponding answers to those questions." %}</p>
</div>
<div class="col col-6 help-text">
<label class="field-label ">{{ form.faq.label }}</label>
{{ form.faq }}
</div>
</div>
{% if is_internal_user %}
<div class="field-title">{{ form.video_link.label|upper }}</div>
<div class="row">
<div class="col col-6 help-text">
<div class="row">
<ul class="tabs">
<li class="course-tabs active" data-tab="tab-practices">
{% trans "Best Practices" %}
</li>
<li class="course-tabs" data-tab="tab-example">
{% trans "Examples" %}
</li>
</ul>
</div>
<div id="tab-practices" class="content active">
<p>
{%trans "The About Video should excite and entice potential students to take your course. Think of it as a movie trailer or TV show promotion. The video should be compelling, and exhibit the instructor’s personality." %}<br>
{%trans "Length: ideal length is 30-90 seconds (learners typically only watch an average of 30 seconds)" %}<br>
{%trans "Should be produced and edited, using elements such as graphics, stock footage" %}
</p>
<p>{% trans "The About video should answer these key questions:" %}</p>
<ul>
<li>{% trans "Why should a learner register?" %}</li>
<li>{% trans "What topics and concepts are covered?" %}</li>
<li>{% trans "Who is teaching the course?" %}</li>
<li>{% trans "What institution is delivering the course?" %}</li>
</ul>
<p>{% trans "Naming Specifications:" %}</p>
<ul>
<li>{% trans "Name: InstitutionX_CourseNumber_About.mov" %}</li>
<li>{% trans "Post to:" %} <a href="http://veda.edx.org/upload" target="_blank">http://veda.edx.org/upload</a></li>
</ul>
<p>{% trans "Technical specifications:" %}</p>
<ul>
<li>{% trans "Codec: H.264" %}</li>
<li>{% trans "Container: .mp4" %}</li>
<li>{% trans "Resolution: 1920x1080" %}</li>
<li>{% trans "Frame Rate: 29.97 fps" %}</li>
<li>{% trans "Aspect: 1.0" %}</li>
<li>{% trans "Bitrate: 5Mbps VBR" %}</li>
<li>{% trans "Audio Codec: AAC 44.1KHz/192 Kbps" %}</li>
</ul>
</div>
<div id="tab-example" class="content">
<p>
{%trans "Visit edX’s Youtube channel for inspiration and examples of other About Videos:" %}
<a href="www.youtube.com/user/EdXOnline" target="_blank">www.youtube.com/user/EdXOnline</a>
</p>
</div>
</div>
<div class="col col-6 help-text">
<label class="field-label ">{{ form.video_link.label }}</label>
{{ form.video_link }}
</div>
</div>
{% endif %}
<div class="field-title">{{ form.learner_testimonial.label|upper }}</div>
<div class="row">
<div class="col col-6 help-text">
<div class="row">
<ul class="tabs">
<li class="course-tabs active" data-tab="tab-practices">
{% trans "Best Practices" %}
</li>
<li class="course-tabs" data-tab="tab-example">
{% trans "Examples" %}
</li>
</ul>
</div>
<div id="tab-practices" class="content active">
<ul>
<li>{% trans "A quote from a learner in the course, demonstrating the value of taking the course." %}</li>
<li>{% trans "Should be no more than 25-50 words in length." %}</li>
</ul>
</div>
<div id="tab-example" class="content">
<p>
{%trans "“Brilliant course! It's definitely the best introduction to electronics in the world! Interesting material, clean explanations, well prepared quizzes, challenging homeworks and fun labs.” – Previous Student" %}
</p>
</div>
</div>
<div class="col col-6 help-text">
<label class="field-label ">{{ form.learner_testimonial.label }}</label>
{{ form.learner_testimonial }}
</div>
</div>
</fieldset>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment