Commit 8ad8f516 by Waheed Ahmed

Auto populate existing run and seat data on new run form.

ECOM-7732
parent 4f1728f7
...@@ -54,6 +54,7 @@ class CourseRunFactory(factory.DjangoModelFactory): ...@@ -54,6 +54,7 @@ class CourseRunFactory(factory.DjangoModelFactory):
notes = "Testing notes" notes = "Testing notes"
preview_url = FuzzyText(prefix='https://example.com/') preview_url = FuzzyText(prefix='https://example.com/')
contacted_partner_manager = FuzzyChoice((True, False)) contacted_partner_manager = FuzzyChoice((True, False))
video_language = factory.Iterator(LanguageTag.objects.all())
class Meta: class Meta:
model = CourseRun model = CourseRun
......
...@@ -363,10 +363,7 @@ class CreateCourseRunViewTests(TestCase): ...@@ -363,10 +363,7 @@ class CreateCourseRunViewTests(TestCase):
self.course_run_dict.update({'is_self_paced': True}) self.course_run_dict.update({'is_self_paced': True})
self._pop_valuse_from_dict( self._pop_valuse_from_dict(
self.course_run_dict, self.course_run_dict,
[ ['end', 'enrollment_start', 'enrollment_end', 'priority', 'certificate_generation', 'id']
'end', 'enrollment_start', 'enrollment_end',
'priority', 'certificate_generation', 'video_language', 'id'
]
) )
self.course_run_dict['start'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') self.course_run_dict['start'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
self.course_run_dict['end'] = (datetime.now() + timedelta(days=60)).strftime('%Y-%m-%d %H:%M:%S') self.course_run_dict['end'] = (datetime.now() + timedelta(days=60)).strftime('%Y-%m-%d %H:%M:%S')
...@@ -493,6 +490,32 @@ class CreateCourseRunViewTests(TestCase): ...@@ -493,6 +490,32 @@ class CreateCourseRunViewTests(TestCase):
expected_subject = 'New Studio instance request for {title}'.format(title=self.course.title) expected_subject = 'New Studio instance request for {title}'.format(title=self.course.title)
self.assertEqual(str(mail.outbox[0].subject), expected_subject) self.assertEqual(str(mail.outbox[0].subject), expected_subject)
def test_existing_run_and_seat_data_auto_populated(self):
"""
Verify that existing course run and seat data auto populated on new course run form.
"""
latest_run = self.course.course_runs.latest('created')
factories.SeatFactory(course_run=latest_run, type=Seat.VERIFIED, price=550.0)
latest_seat = latest_run.seats.latest('created')
response = self.client.get(
reverse('publisher:publisher_course_runs_new', kwargs={'parent_course_id': self.course.id})
)
# Verify that existing course run and seat values auto populated on form.
expected_pacing = '<input checked="checked" class="field-input input-checkbox" '
'id="id_pacing_type_0" name="pacing_type" type="radio" value="{pacing}" />'.format(
pacing=latest_run.pacing_type
)
self.assertContains(response, expected_pacing)
expected_seat_type = '<option value="{seat_type}" selected="selected">'.format(seat_type=latest_seat.type)
self.assertContains(response, expected_seat_type)
expected_seat_price = 'id="id_price" name="price" step="0.01" type="number" value="{price}" />'.format(
price=latest_seat.price
)
self.assertContains(response, expected_seat_price)
@ddt.ddt @ddt.ddt
class CourseRunDetailTests(TestCase): class CourseRunDetailTests(TestCase):
......
...@@ -11,6 +11,7 @@ from django.contrib.sites.models import Site ...@@ -11,6 +11,7 @@ from django.contrib.sites.models import Site
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.db import transaction from django.db import transaction
from django.forms import model_to_dict
from django.http import Http404, HttpResponseRedirect, JsonResponse from django.http import Http404, HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, render from django.shortcuts import get_object_or_404, render
from django.utils import timezone from django.utils import timezone
...@@ -19,11 +20,13 @@ from django.views.generic import CreateView, DetailView, ListView, UpdateView, V ...@@ -19,11 +20,13 @@ from django.views.generic import CreateView, DetailView, ListView, UpdateView, V
from guardian.shortcuts import get_objects_for_user from guardian.shortcuts import get_objects_for_user
from course_discovery.apps.core.models import User from course_discovery.apps.core.models import User
from course_discovery.apps.course_metadata.models import Person
from course_discovery.apps.ietf_language_tags.models import LanguageTag
from course_discovery.apps.publisher import emails, mixins from course_discovery.apps.publisher import emails, mixins
from course_discovery.apps.publisher.choices import CourseRunStateChoices, CourseStateChoices, PublisherUserRole from course_discovery.apps.publisher.choices import CourseRunStateChoices, CourseStateChoices, PublisherUserRole
from course_discovery.apps.publisher.forms import CustomCourseForm, CustomCourseRunForm, CustomSeatForm from course_discovery.apps.publisher.forms import CustomCourseForm, CustomCourseRunForm, CustomSeatForm
from course_discovery.apps.publisher.models import (Course, CourseRun, CourseRunState, CourseState, CourseUserRole, from course_discovery.apps.publisher.models import (Course, CourseRun, CourseRunState, CourseState, CourseUserRole,
OrganizationExtension, UserAttributes) OrganizationExtension, Seat, UserAttributes)
from course_discovery.apps.publisher.utils import (get_internal_users, has_role_for_course, is_internal_user, from course_discovery.apps.publisher.utils import (get_internal_users, has_role_for_course, is_internal_user,
is_project_coordinator_user, is_publisher_admin, make_bread_crumbs, is_project_coordinator_user, is_publisher_admin, make_bread_crumbs,
parse_datetime_field) parse_datetime_field)
...@@ -469,6 +472,7 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView): ...@@ -469,6 +472,7 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView):
template_name = 'publisher/add_courserun_form.html' template_name = 'publisher/add_courserun_form.html'
success_url = 'publisher:publisher_course_run_detail' success_url = 'publisher:publisher_course_run_detail'
parent_course = None parent_course = None
last_run = None
fields = () fields = ()
def get_parent_course(self): def get_parent_course(self):
...@@ -477,12 +481,55 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView): ...@@ -477,12 +481,55 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView):
return self.parent_course return self.parent_course
def get_last_run(self):
if not self.last_run:
parent_course = self.get_parent_course()
self.last_run = parent_course.course_runs.latest('created')
return self.last_run
def set_last_run_data(self, new_run):
last_run = self.get_last_run()
last_run_data = model_to_dict(last_run)
# Delete all those fields which cannot be copied from previous run
del (last_run_data['id'], last_run_data['start'], last_run_data['end'], last_run_data['pacing_type'],
last_run_data['preview_url'], last_run_data['lms_course_id'], last_run_data['changed_by'],
last_run_data['course'], last_run_data['sponsor'])
staff = Person.objects.filter(id__in=last_run_data.pop('staff'))
transcript_languages = LanguageTag.objects.filter(code__in=last_run_data.pop('transcript_languages'))
language_code = last_run_data.pop('language')
if language_code:
last_run_data['language'] = LanguageTag.objects.get(code=language_code)
video_language_code = last_run_data.pop('video_language')
if video_language_code:
last_run_data['video_language'] = LanguageTag.objects.get(code=video_language_code)
for attr, value in last_run_data.items():
setattr(new_run, attr, value)
new_run.save()
new_run.staff.add(*staff)
new_run.transcript_languages.add(*transcript_languages)
def get_seat_initial_data(self):
last_run = self.get_last_run()
try:
latest_seat = last_run.seats.latest('created')
initial_seat_data = model_to_dict(latest_seat)
del initial_seat_data['id'], initial_seat_data['course_run'], initial_seat_data['changed_by']
except Seat.DoesNotExist:
initial_seat_data = {}
return initial_seat_data
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
parent_course = self.get_parent_course() parent_course = self.get_parent_course()
last_run = self.get_last_run()
context = { context = {
'parent_course': parent_course, 'parent_course': parent_course,
'run_form': self.run_form(initial={'contacted_partner_manager': False}), 'run_form': self.run_form(initial={'pacing_type': last_run.pacing_type}),
'seat_form': self.seat_form 'seat_form': self.seat_form(initial=self.get_seat_initial_data())
} }
return context return context
...@@ -493,13 +540,14 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView): ...@@ -493,13 +540,14 @@ class CreateCourseRunView(mixins.LoginRequiredMixin, CreateView):
self.request.POST['start'] = parse_datetime_field(self.request.POST.get('start')) self.request.POST['start'] = parse_datetime_field(self.request.POST.get('start'))
self.request.POST['end'] = parse_datetime_field(self.request.POST.get('end')) self.request.POST['end'] = parse_datetime_field(self.request.POST.get('end'))
run_form = self.run_form(request.POST, initial={'contacted_partner_manager': False}) run_form = self.run_form(request.POST)
seat_form = self.seat_form(request.POST) seat_form = self.seat_form(request.POST)
if run_form.is_valid() and seat_form.is_valid(): if run_form.is_valid() and seat_form.is_valid():
try: try:
with transaction.atomic(): with transaction.atomic():
course_run = run_form.save(course=parent_course, changed_by=user) course_run = run_form.save(commit=False, course=parent_course, changed_by=user)
self.set_last_run_data(course_run)
seat_form.save(course_run=course_run, changed_by=user) seat_form.save(course_run=course_run, changed_by=user)
# Initialize workflow for Course-run. # Initialize workflow for Course-run.
......
...@@ -7,14 +7,14 @@ msgid "" ...@@ -7,14 +7,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-03 17:40+0500\n" "POT-Creation-Date: 2017-05-04 13:50+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: \n"
#: apps/api/filters.py #: apps/api/filters.py
#, python-brace-format #, python-brace-format
...@@ -1432,23 +1432,17 @@ msgid "New Course Run" ...@@ -1432,23 +1432,17 @@ msgid "New Course Run"
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
#, python-format
msgid "" msgid ""
"\n" "\n"
" The information on this page applies only to this course run. To make changes to all course runs for this course, go to the %(link_start)s%(course_url)s%(link_middle)s%(course_name)s%(link_end)s page.\n" " The information on this page is based on the latest published course run, if a published course run exists.\n"
" " " "
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"The following information is required before edX can create a Studio URL for" "\n"
" this course run." " When you create a course run, Publisher immediately creates a page for the course run in Publisher, and the edX team creates a Studio URL for the course run. You will receive an email message when edX has created the Studio URL.\n"
msgstr "" " "
#: templates/publisher/add_courserun_form.html
msgid ""
"After you create this course run, you can add more information on the course"
" run page."
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
......
...@@ -7,14 +7,14 @@ msgid "" ...@@ -7,14 +7,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-03 17:40+0500\n" "POT-Creation-Date: 2017-05-04 13:50+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: \n"
#: static/js/catalogs-change-form.js #: static/js/catalogs-change-form.js
msgid "Preview" msgid "Preview"
......
...@@ -7,14 +7,14 @@ msgid "" ...@@ -7,14 +7,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-03 17:40+0500\n" "POT-Creation-Date: 2017-05-04 13:50+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/api/filters.py #: apps/api/filters.py
...@@ -1664,31 +1664,24 @@ msgid "New Course Run" ...@@ -1664,31 +1664,24 @@ msgid "New Course Run"
msgstr "Néw Çöürsé Rün Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#" msgstr "Néw Çöürsé Rün Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
#, python-format
msgid "" msgid ""
"\n" "\n"
" The information on this page applies only to this course run. To make changes to all course runs for this course, go to the %(link_start)s%(course_url)s%(link_middle)s%(course_name)s%(link_end)s page.\n" " The information on this page is based on the latest published course run, if a published course run exists.\n"
" " " "
msgstr "" msgstr ""
"\n" "\n"
" Thé ïnförmätïön ön thïs pägé äpplïés önlý tö thïs çöürsé rün. Tö mäké çhängés tö äll çöürsé rüns för thïs çöürsé, gö tö thé %(link_start)s%(course_url)s%(link_middle)s%(course_name)s%(link_end)s pägé.\n" " Thé ïnförmätïön ön thïs pägé ïs ßäséd ön thé lätést püßlïshéd çöürsé rün, ïf ä püßlïshéd çöürsé rün éxïsts.\n"
" Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє ¢ιłłυм ∂σłσяє єυ ƒυgιαт ηυłłα ραяιαтυя. єχ¢єρтєυя ѕιηт σ¢¢αє¢αт ¢υρι∂αтαт ηση ρяσι∂єηт, ѕ#" " Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє ¢ιłłυм ∂σłσяє єυ ƒυgιαт ηυłłα ραяιαтυя. єχ¢єρтєυя ѕιηт σ¢¢αє¢αт ¢υρι∂αтαт ηση ρяσι∂єηт, ѕυηт ιη ¢υłρα qυι σƒƒι¢ια ∂єѕєяυηт мσłłιт αηιм ι∂#"
#: templates/publisher/add_courserun_form.html
msgid ""
"The following information is required before edX can create a Studio URL for"
" this course run."
msgstr ""
"Thé föllöwïng ïnförmätïön ïs réqüïréd ßéföré édX çän çréäté ä Stüdïö ÛRL för"
" thïs çöürsé rün. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σ#"
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"After you create this course run, you can add more information on the course" "\n"
" run page." " When you create a course run, Publisher immediately creates a page for the course run in Publisher, and the edX team creates a Studio URL for the course run. You will receive an email message when edX has created the Studio URL.\n"
" "
msgstr "" msgstr ""
"Àftér ýöü çréäté thïs çöürsé rün, ýöü çän ädd möré ïnförmätïön ön thé çöürsé" "\n"
" rün pägé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢#" " Whén ýöü çréäté ä çöürsé rün, Püßlïshér ïmmédïätélý çréätés ä pägé för thé çöürsé rün ïn Püßlïshér, änd thé édX téäm çréätés ä Stüdïö ÛRL för thé çöürsé rün. Ýöü wïll réçéïvé än émäïl méssägé whén édX häs çréätéd thé Stüdïö ÛRL.\n"
" Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє#"
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "PACING TYPE" msgid "PACING TYPE"
......
...@@ -7,14 +7,14 @@ msgid "" ...@@ -7,14 +7,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-03 17:40+0500\n" "POT-Creation-Date: 2017-05-04 13:50+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/js/catalogs-change-form.js #: static/js/catalogs-change-form.js
......
...@@ -7,16 +7,19 @@ ...@@ -7,16 +7,19 @@
{% endblock title %} {% endblock title %}
{% block page_content %} {% block page_content %}
<div> <div xmlns="http://www.w3.org/1999/html">
<h1 class="hd-1 emphasized">{% trans "New Course Run" %}</h1> <h1 class="hd-1 emphasized">{% trans "New Course Run" %}</h1>
<div class="copy-base"> <div class="copy-base">
<span class="required">* Required</span>
<p> <p>
{% url 'publisher:publisher_course_detail' parent_course.id as course_url %} {% blocktrans %}
{% with link_start='<a href="' link_middle='">' link_end='</a>' %} The information on this page is based on the latest published course run, if a published course run exists.
{% blocktrans with course_name=parent_course.title %} {% endblocktrans %}
The information on this page applies only to this course run. To make changes to all course runs for this course, go to the {{ link_start }}{{ course_url }}{{ link_middle }}{{ course_name }}{{ link_end }} page. </p>
<p>
{% blocktrans %}
When you create a course run, Publisher immediately creates a page for the course run in Publisher, and the edX team creates a Studio URL for the course run. You will receive an email message when edX has created the Studio URL.
{% endblocktrans %} {% endblocktrans %}
{% endwith %}
</p> </p>
</div> </div>
...@@ -26,10 +29,6 @@ ...@@ -26,10 +29,6 @@
<div class="layout-full layout"> <div class="layout-full layout">
<div class="course-form"> <div class="course-form">
<div class="course-information"> <div class="course-information">
<div class="copy-base">
<p>{% trans "The following information is required before edX can create a Studio URL for this course run." %} </p>
<p>{% trans "After you create this course run, you can add more information on the course run page." %}</p>
</div>
<fieldset class="form-group grid-container grid-manual"> <fieldset class="form-group grid-container grid-manual">
<div class="field-title">{% trans "COURSE START DATE" %}</div> <div class="field-title">{% trans "COURSE START DATE" %}</div>
<div class="row"> <div class="row">
...@@ -116,6 +115,7 @@ ...@@ -116,6 +115,7 @@
</div> </div>
<div class="course-form"> <div class="course-form">
<div class="course-information action-buttons"> <div class="course-information action-buttons">
{% url 'publisher:publisher_course_detail' parent_course.id as course_url %}
<a href="{{ course_url }}">{% trans "Cancel" %}</a> <a href="{{ course_url }}">{% trans "Cancel" %}</a>
<button class="btn-brand btn-base btn-save" type="submit"> <button class="btn-brand btn-base btn-save" type="submit">
{% trans "Create New Course Run" %} {% trans "Create New Course Run" %}
......
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