diff --git a/src/components/EditCoursePage/EditCourseForm.jsx b/src/components/EditCoursePage/EditCourseForm.jsx
index f442ac5bf..1038f7dee 100644
--- a/src/components/EditCoursePage/EditCourseForm.jsx
+++ b/src/components/EditCoursePage/EditCourseForm.jsx
@@ -283,8 +283,16 @@ export class BaseEditCourseForm extends React.Component {
runTypeModes,
} = parsedTypeOptions;
const disabled = courseInReview || !editable;
- const showMarketingFields = !currentFormValues.type || !courseTypes[currentFormValues.type]
- || courseTypes[currentFormValues.type].course_run_types.some((crt) => crt.is_marketable);
+
+ function isMarketingFieldsVisible(currentFormValuesType, courseTypesDict) {
+ /**
+ * Check if the course type is defined in the courseTypes object and if any of the course run types are marketable
+ */
+ return (currentFormValuesType && courseTypesDict[currentFormValuesType]) === undefined ? false
+ : courseTypesDict[currentFormValuesType].course_run_types.some((crt) => crt.is_marketable);
+ }
+
+ const showMarketingFields = isMarketingFieldsVisible(currentFormValues.type, courseTypes);
const courseIsPristine = isPristine(initialValues, currentFormValues);
const publishedContentChanged = initialValues.course_runs
diff --git a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap
index 3d40fe359..9fe29d9c4 100644
--- a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap
+++ b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap
@@ -8055,59 +8055,61 @@ exports[`BaseEditCourseForm renders html correctly with minimal data 1`] = `
"onInvalid": [Function],
}
}
- id="sdesc"
label={
- An effective short description:
-
-
- Learn more.
-
-
-
- Example:
-
-
- The first MOOC to teach positive psychology. Learn science-based principles and practices for a happy, meaningful life.
-
- An effective long description:
+ The subject of the course.
- The first four lines are visible when the About page opens. Learners can select “See More” to view the full description.
+ You can select up to two subjects in addition to the primary subject. Only the primary subject appears on the About page.
@@ -8158,13 +8142,37 @@ exports[`BaseEditCourseForm renders html correctly with minimal data 1`] = `
- The skills and knowledge learners will acquire in this course.
-
- Format each item as a bullet with four to ten words.
-
-
- Example:
-
-
-
- Learn more.
-
-
- A review of content covered in your course, organized by week or module.
-
-
- Learn more.
-
-
-
- Example:
-
-
- Week 1: From Calculator to Computer
-
- Introduction to basic programming concepts, such as values and expressions, as well as making decisions when implementing algorithms and developing programs.
-
- Week 2: State Transformation
-
- Introduction to state transformation, including representation of data and programs as well as conditional repetition.
-
- Specific knowledge learners must have to be successful in the course. If the course has no prerequisites, enter “None”.
-
-
- Learn more.
-
-
-
- Examples:
-
-
- A quote from a learner in the course, demonstrating the value of taking the course.
-
- Should be no more than 25–50 words in length.
-
-
- Learn more.
-
-
-
- Example:
-
-
- “Brilliant course! It’s definitely the best introduction to electronics in the world! Interesting material, clean explanations, well prepared quizzes, challenging homework, and fun labs.” – Previous Student
-
- Any frequently asked questions and the answers to those questions.
-
-
- Learn more.
-
-
-
- Example:
-
-
- No, this course is designed for beginners.
-
- Swift version 4.
-
- The subject of the course.
-
- You can select up to two subjects in addition to the primary subject. Only the primary subject appears on the About page.
-
-
- Learn more.
-
-
- Maximum 70 characters. Recommended 50 or fewer characters.
-
- An effective course title:
-
-
- Learn more.
-
-
-
- Example:
-
-
- English Grammar and Essay Writing
-
-
- Note: Course editors cannot edit the URL slug. Please reach out to your project coordinator or edX support to edit this field.
-
-
- This field is optional. If left blank, edX will automatically create a URL slug based on the course title.
-
- If you find that a given URL slug is already in use, we recommend adding your school or institution name to the slug to ensure uniqueness.
-
- This URL slug can be changed, and learners who visit an older URL will be redirected to the current URL.
-
-
- What is a URL slug?
-
-
- In the example URL www.edx.org/course/math-101, the URL slug is “math-101.” Using URL slugs that are short and easily understandable helps learners find and remember course pages, and also drives higher rankings in search engine results.
-
- The Product source is a key that identifies where the course originates.
-
-
- Example:
-
-
- If the course originates from the edX platform, the Product source is edX.
-
- The Course enrollment track determines what enrollment tracks are eligible for the course runs.
-
-
- Example:
-
-
- The Verified and Audit selection will allow course runs to either be Verified and Audit or Audit only.
-
- Course teams are responsible for securing any necessary permissions for use of third-party logos.
-
- To elaborate on the support, please include additional information in the “About this course” section. Please avoid including statements that the course is jointly offered or that the 3rd party is collaborating or partnering with edX.
-
- An eye-catching, colorful image that captures the essence of your course.
-
-
- Learn more.
-
-
-
-
+
}
- id="sdesc.label"
+ id="level.label"
optional={false}
- text="Short description"
+ text="Course level"
/>
}
- maxChars={500}
- name="short_description"
+ name="level_type"
+ options={
+ Array [
+ Object {
+ "label": "--",
+ "value": "",
+ },
+ Object {
+ "label": "Beginner",
+ "value": "beginner",
+ },
+ Object {
+ "label": "Intermediate",
+ "value": "intermediate",
+ },
+ Object {
+ "label": "Advanced",
+ "value": "advanced",
+ },
+ ]
+ }
+ required={false}
/>
-
-
-
-
-
-
-
- }
- id="syllabus.label"
+ helpText=""
+ id={null}
optional={true}
- text="Syllabus"
+ text="Tertiary subject"
/>
}
- maxChars={500}
- name="syllabus_raw"
- />
-
-
-
- }
- id="prereq.label"
- optional={true}
- text="Prerequisites"
- />
+ name="subjectTertiary"
+ optional={true}
+ options={
+ Array [
+ Object {
+ "label": "--",
+ "value": "",
+ },
+ Object {
+ "label": "Business",
+ "value": "business",
+ },
+ Object {
+ "label": "Chemistry",
+ "value": "chemistry",
+ },
+ Object {
+ "label": "English",
+ "value": "english",
+ },
+ Object {
+ "label": "Security",
+ "value": "security",
+ },
+ ]
}
- maxChars={1000}
- name="prerequisites_raw"
/>
-
-
-
- }
- id="level.label"
- optional={false}
- text="Course level"
- />
- }
- name="level_type"
- options={
- Array [
- Object {
- "label": "--",
- "value": "",
- },
- Object {
- "label": "Beginner",
- "value": "beginner",
- },
- Object {
- "label": "Intermediate",
- "value": "intermediate",
- },
- Object {
- "label": "Advanced",
- "value": "advanced",
- },
- ]
- }
- required={false}
- />
-
-
-
-
-
- An effective short description: + Maximum 70 characters. Recommended 50 or fewer characters. +
++ An effective course title:
- The first MOOC to teach positive psychology. Learn science-based principles and practices for a happy, meaningful life. -
- - } - id="sdesc.label" - optional={false} - text="Short description" - /> - } - maxChars={500} - name="short_description" - /> -- An effective long description: -
-- The first four lines are visible when the About page opens. Learners can select “See More” to view the full description. -
-- - Learn more. - + English Grammar and Essay Writing
} - id="ldesc.label" + id="title.label" optional={false} - text="Long description" + text="Title" /> } - maxChars={2500} - name="full_description" + name="title" + required={true} + type="text" />- The skills and knowledge learners will acquire in this course. -
-- Format each item as a bullet with four to ten words. -
- Example: + Note: Course editors cannot edit the URL slug. Please reach out to your project coordinator or edX support to edit this field.
-- - Learn more. - + This field is optional. If left blank, edX will automatically create a URL slug based on the course title.
- - } - id="outcome.label" - optional={false} - text="What you will learn" - /> - } - maxChars={2500} - name="outcome" - /> -- A review of content covered in your course, organized by week or module. + If you find that a given URL slug is already in use, we recommend adding your school or institution name to the slug to ensure uniqueness.
-- - Learn more. - + This URL slug can be changed, and learners who visit an older URL will be redirected to the current URL.
- Example: + What is a URL slug?
-- Week 1: From Calculator to Computer -
-- Introduction to basic programming concepts, such as values and expressions, as well as making decisions when implementing algorithms and developing programs. -
-- Week 2: State Transformation -
-- Introduction to state transformation, including representation of data and programs as well as conditional repetition. -
-+ In the example URL www.edx.org/course/math-101, the URL slug is “math-101.” Using URL slugs that are short and easily understandable helps learners find and remember course pages, and also drives higher rankings in search engine results. +
} - id="syllabus.label" + id="slug.label" optional={true} - text="Syllabus" + text="URL slug" /> } - maxChars={500} - name="syllabus_raw" + name="url_slug" + optional={true} + type="text" /> ++ The Product source is a key that identifies where the course originates. +
++ + Example: + +
++ If the course originates from the edX platform, the Product source is edX. +
+- Specific knowledge learners must have to be successful in the course. If the course has no prerequisites, enter “None”. -
-- - Learn more. - + The Course enrollment track determines what enrollment tracks are eligible for the course runs.
- Examples: + Example:
-+ The Verified and Audit selection will allow course runs to either be Verified and Audit or Audit only. +
} - id="prereq.label" - optional={true} - text="Prerequisites" + id="type.label" + optional={false} + text="Course enrollment track" /> } - maxChars={1000} - name="prerequisites_raw" + name="type" + options={ + Array [ + Object { + "label": "Select enrollment track", + "value": "", + }, + Object { + "label": "Credit", + "value": "9521aa7d-801b-4a67-92c3-716ea30f5086", + }, + Object { + "label": "Masters Only", + "value": "7b41992e-f268-4331-8ba9-72acb0880454", + }, + Object { + "label": "Verified and Audit", + "value": "8a8f30e1-23ce-4ed3-a361-1325c656b67b", + }, + Object { + "label": "Professional Only", + "value": "fdde7d04-7ce0-4ff7-ac90-7f518e90ac1e", + }, + Object { + "label": "Audit Only", + "value": "03e09c15-4127-4031-bc02-e20fcbdf09f0", + }, + ] + } + /> ++ Course teams are responsible for securing any necessary permissions for use of third-party logos. +
++ To elaborate on the support, please include additional information in the “About this course” section. Please avoid including statements that the course is jointly offered or that the 3rd party is collaborating or partnering with edX. +
+ + } + id="collaborators.label" + optional={true} + text="Collaborators" + /> +- A quote from a learner in the course, demonstrating the value of taking the course. -
-- Should be no more than 25–50 words in length. + An eye-catching, colorful image that captures the essence of your course.
+- - Example: - -
-- “Brilliant course! It’s definitely the best introduction to electronics in the world! Interesting material, clean explanations, well prepared quizzes, challenging homework, and fun labs.” – Previous Student -
} - id="testimonials.label" - optional={true} - text="Learner testimonials" + id="image.label" + optional={false} + text="Image" /> } - maxChars={500} - name="learner_testimonials" + maxImageSizeKilo={1000} + name="imageSrc" + requiredHeight={675} + requiredWidth={1134} />- Any frequently asked questions and the answers to those questions. -
-- - Learn more. - -
-- - Example: - -
- - Do I need to know any programming languages before I start? - -- No, this course is designed for beginners. -
- - What version of Swift will I be learning? - -- Swift version 4. -
- ++ You can add tags in the format mba-no-gmat,mba,mba_4_modules,mba_NY +
} - id="faq.label" + id="tags.label" optional={true} - text="Frequently asked questions" + text="Topics" /> } - maxChars={2500} - name="faq" + loadOptions={[Function]} + name="tags" + optional={true} />