Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inherit option to Course Outline block and increase max number of… #2508

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

seothemes
Copy link
Contributor

Description

  • Adds Inherit from current course option to Course Outline block when editing Single Course template.
  • Increase maximum number of courses shown in drop down select (for all blocks using component)

How has this been tested?

Manually

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code passes all existing automated tests.
  • My code follows the LifterLMS Coding & Documentation Standards.

Copy link
Collaborator

@eri-trabiccolo eri-trabiccolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I'm not gonna merge this in the upcoming release.
We have the same issue with the Course Information block (not inheriting).
Would be great if for all the blocks that require a course to be specified - or they inherit it from the context (e.g. what if you're in a lesson template?) - we display kind of a placeholder, that mimics the block aspect.
About:
// Show the first course when in Editor if none selected.

What if the first course has no sections?

Copy link
Collaborator

@eri-trabiccolo eri-trabiccolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Lee, you must have missed my last review's comment:

Looks good but I'm not gonna merge this in the upcoming release.
We have the same issue with the Course Information block (not inheriting).
Would be great if for all the blocks that require a course to be specified - or they inherit it from the context (e.g. what if you're in a lesson template?) - we display kind of a placeholder, that mimics the block aspect.
About:
		// Show the first course when in Editor if none selected.

What if the first course has no sections?

Comment on lines +92 to +95
if ( ! $current_id && llms_is_editor_block_rendering() ) {
$current_id = LLMS_Shortcodes_Blocks::get_placeholder_course_id();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of mixing concepts, can't we have filters so that FROM the blocks shortcode we alter the placeholder course id from there?...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

None yet

2 participants