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

✨(frontend) add faqs to a category and get them from a course #2517

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Tiago-Salles
Copy link
Contributor

@Tiago-Salles Tiago-Salles commented Oct 16, 2024

We at NAU identified the need to provide more information according to the characteriscts of a course.

In quick words this PR includes:

  • add additional_information placeholder to category detail page
  • additional_information is a Section with NestedItemPlugin as children
  • get the additional_information placeholder from the course detail page using the category id page

This PR is related to Contextual Course FAQ by Category #2506.

Purpose

Dynamically provide information according to a category business logic.

Through additional information content the organizations using the Richie can provide more specific information according to a category. For exemple, using the category Available on edX.org we can describe how the learner will access this course on the next platform, for exemple edX.org. It would be an advantage as well in terms of payment methods, or promotional periods, as all the courses assigned to certain category will have their additional information.

An additional information can be FAQ's or any complementary information that seems important clarify for a course. The mechanism used to make these information available is a placeholder called by Addiotional Information on the category page.

Proposal

Provide a placeholder to be filled with varied information and at the same time be easy to maintain. The way of using is simple, described below.

Create the content

In a category page, use the placeholder Additional Information to create a section with nested items. According to the category needs insert the information that sounds relevant to be shown in a course that has the corresponding category. For exemple, if the course is distribuied by another platform, the Additional Information in this case could describre how this process of learning works.

Additional Information is a Section, which has a title field where can be filled according to the importance of their content, that is, for additional information about frequently asked questions, the Section plugin can be named as Course FAQ's, but in other cases where this section needs to signal high importance to these information, the Section plugin can be name as Extremely Important Information, and then reduce the possibilty of learners skipping this section. It is a open field to be used according to the needs.

drawing

On the category page it will be shown as

drawing

Set the page id

To dinamically create or edit a category Additional Information content and impact all the courses that have it, the tag
show_placeholder is used. This tag receives as parameter, the placeholder name and the page lookup, which is interpreted as reverse_id. For this logic to work, in Advanced Settings of the category page, if it not exists, use the field id to register the page unique information, so the page can be found by the show_placeholder tag.



drawing

Result

With added information, and id defined for this category page, all the courses that have this category, have also their information, as shown following in a course page.



drawing

As all the information come from category page, the maintenence of these contents is excellent, by changing the category page it changes all the courses that have it.

@Tiago-Salles Tiago-Salles changed the title ✨(frontend) add faqs to a category and get from a course ✨(frontend) add faqs to a category and them get from a course Oct 16, 2024
@Tiago-Salles Tiago-Salles changed the title ✨(frontend) add faqs to a category and them get from a course ✨(frontend) add faqs to a category and get them from a course Oct 16, 2024
@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 8 times, most recently from 56aa7eb to d8391d3 Compare October 24, 2024 10:20
@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 5 times, most recently from 2a72b3e to 04bc4e1 Compare October 24, 2024 14:46
@Tiago-Salles Tiago-Salles marked this pull request as ready for review October 24, 2024 15:07
@igobranco igobranco self-requested a review October 24, 2024 15:13
@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 4 times, most recently from 4a2e0c6 to c0459fc Compare October 31, 2024 16:13
@igobranco igobranco self-requested a review November 8, 2024 09:29
@igobranco
Copy link
Collaborator

I think we should use the same expressions on both Category page and the Course page.
We should use a more generic naming of the Placeholder, like "Additional Information".

Just run a find and replace of course_faq with additional_information.

Remove the title "Category FAQ's" on the category page: http://localhost:8070/en/categories/level/expert/
image

On the course page, remove the visible title "Additional information": http://localhost:8070/en/courses/cloned-local-array/
image

Copy link
Collaborator

@igobranco igobranco left a comment

Choose a reason for hiding this comment

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

LGTM ✔️

@jbpenrath can you or another FUN team member review this PR?

@igobranco
Copy link
Collaborator

@Tiago-Salles you have to move your CHANGELOG.md line up on the file, it must be on the Unrealeased section.

@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 2 times, most recently from d4ca40f to cbcf78e Compare November 29, 2024 16:31
@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 2 times, most recently from cd1e241 to addaef5 Compare December 2, 2024 11:48
@igobranco igobranco enabled auto-merge (rebase) December 2, 2024 11:54
@igobranco igobranco enabled auto-merge (rebase) December 2, 2024 12:07
auto-merge was automatically disabled December 2, 2024 12:17

Head branch was pushed to by a user without write access

@Tiago-Salles Tiago-Salles force-pushed the Tiago-Salles/faq-poc branch 9 times, most recently from 310ecbe to b04d2bd Compare December 2, 2024 17:26
- add course_faq placeholder to category detail page
- get the course_faq content from the category detail page
@igobranco igobranco merged commit 703848d into openfun:master Dec 3, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants