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

Course index using cards, resolves #558 #555

Open
wants to merge 1 commit into
base: MOODLE_403_STABLE
Choose a base branch
from

Conversation

danielneis
Copy link

This displays the courses on /course using cards like the ones in the dashboard.
This code was copied and adapted from the Moove theme.
It was tested on Moodle 4.3

@christianwolters
Copy link
Member

christianwolters commented Feb 8, 2024

Hi @danielneis,

thank you for contributing and your work on this PR.

Our process is centered around the project board under:
https://github.com/orgs/moodle-an-hochschulen/projects/4/views/1 which needs an issue for every PR.

Please create a Github issue using one of the provided templates.

As you have already done the coding work, feel free to provide some screenshots.

Cheers
Christian

@danielneis danielneis force-pushed the course-index-cards branch 2 times, most recently from a500977 to 6d77b26 Compare February 8, 2024 13:28
@danielneis
Copy link
Author

Hello,
I've created #558 for this

@christianwolters christianwolters changed the title Course index using cards - adapted from Moove theme Course index using cards - adapted from Moove theme, resolves #558 Feb 8, 2024
@kaaermes
Copy link
Collaborator

Hi @danielneis

thank for your work on this pr but we have some additional questions/tasks for you

Could you offer this feature as an add on, that means we need an on/off switch so that initially nothing changes when installing this feature, but if the admin wants to he/she could turn it on.

Some additional settings would be also nice: shorten the length of the text e.g.

And please note that the overall design should match the bootsrap standard (no shadows and so on).

Cheers,
Kathleen

@snack753
Copy link

snack753 commented Feb 23, 2024

If this feature get a switch to be able to turn it on or off, I would still recommend an improvement for the "off" state:
The courses in the category overview get listed without separators.
This little CSS addon shows every coursebox a bit separated from each other, making it easier to distinguish the courses from each other:

.coursebox {
border: #eeeeee !important;
border-style: solid !important;
border-radius: 10px;
margin-bottom: 10px;
}

The code was tested in the RAW SCSS area of my moodle installation and makes a bit improvement for my site.
The color code shall ideally be taken from the predefined colors.

@christianwolters
Copy link
Member

Hi @snack753,

thank you for your suggestion.

As you mentioned yourself, your suggestion does not cover the feature of this PR but the default state of Boost Union which has to be discussed separately.

Please open a new issue for your suggestion: https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/issues/new/choose so we can move the discussion there.

Cheers
Christian

@lucaboesch
Copy link
Collaborator

Also, a picture is worth a thousand words.
I would have appreciated a screenshot.
Or maybe two, one 'before', one 'after'.

@kaaermes
Copy link
Collaborator

kaaermes commented Feb 26, 2024

Also, a picture is worth a thousand words. I would have appreciated a screenshot. Or maybe two, one 'before', one 'after'.

Hi @lucaboesch, hi all > I can provide a screenshot "courses as cards"

Bildschirmfoto 2024-02-26 um 09 37 59

@snack753
Copy link

snack753 commented Feb 26, 2024

Hi Christian,

no problem. I created the feature request #573 including screenshots.

Cheers,
Kai

@lucaboesch lucaboesch force-pushed the master branch 2 times, most recently from d021aab to 4c0832b Compare March 1, 2024 10:32
@kaaermes
Copy link
Collaborator

Hi @danielneis

quick reminder: did you noticed my comment three weeks ago?

Can you give us an answer to our questions and comments?

thanks,
Kathleen

@danielneis
Copy link
Author

Hi @kaaermes ,
Yes, I'll work on this issue this wednesday and update the pull request.
Best,
Daniel

@danielneis danielneis changed the base branch from master to MOODLE_403_STABLE March 13, 2024 18:26
@danielneis
Copy link
Author

Hi!
I've made it an optional setting, disabled by default.

Default page:
image

Page with cards and teachers pictures:
image

Page with cards and without teachers pictures:
image

To shorten the summary I would need to change the get_course_formatted_summary method from coursecat_helper.

Please, let me know if you need anything else from my side.

Best,
Daniel

@danielneis danielneis changed the title Course index using cards - adapted from Moove theme, resolves #558 Course index using cards, resolves #558 Mar 13, 2024
@danielneis danielneis force-pushed the course-index-cards branch 2 times, most recently from adbd447 to bcf18b7 Compare March 20, 2024 20:15
@danielneis
Copy link
Author

I've removed the use of theme->settings

@kaaermes
Copy link
Collaborator

Hi @danielneis

thank you for your work but we have still some issue:

the presentation of text is not quite good yet – long texts don't look good

We have some ideas – maybe you can think about them:

  1. you integrate a hard limitation of character lenght
  2. you use a max height for the cards and the use can scroll through the text
  3. texts will be shorten and you integrate a collapse element

Please let us know if it's possible for you to adapt one of these. :-)

Bildschirmfoto 2024-03-21 um 13 17 26

Kathleen

@danielneis
Copy link
Author

Hello,

I've opted for the maximum height with scroll on overflow because it's the simplest code and yet allows the user to read the full summary if he/she/they want to.

Please, let me know if you need me to change the maximum height or anything else.

image

Best,
Daniel

@luiggisanso
Copy link

Hi team and @danielneis

Have you considered also a course field zone ?
image
image

It could be great too ;-)

@danielneis
Copy link
Author

Yes, course custom fields are displayed before the course summary:
Screenshot from 2024-04-03 09-24-37

@kaaermes
Copy link
Collaborator

Hi @danielneis

we want to invite you to a team session via matrix/elements. Could you please check your matrix chat for that?

thx,
Kathleen

@danielneis
Copy link
Author

danielneis commented Apr 10, 2024 via email

@kaaermes
Copy link
Collaborator

Hi @danielneis

yes – you are welcome to accept both :-)

@danielneis danielneis force-pushed the course-index-cards branch from bc48f80 to 1eab49d Compare May 10, 2024 18:08
@HsH-Wolf
Copy link
Collaborator

This PR ist now ready for review with special attention for the following topics:

  • placement of the admin settings in a fitting category/tab
  • spacing (before and after course category and teachers names)
  • breakpoints for responsive view

@danielneis
Copy link
Author

Hello!
If there is anything I could do to help this being merged, please, let me know.
Best,
Daniel

@danielneis danielneis force-pushed the course-index-cards branch from 1eab49d to 385f081 Compare July 8, 2024 17:17
@danielneis
Copy link
Author

I've rebased the branch on top of current MOODLE_403_STABLE

@danielneis
Copy link
Author

@dbnschools
Copy link

Is this planned on being merged? This is a very desirable feature.

@Mairex
Copy link

Mairex commented Nov 4, 2024

A long-awaited and very powerful feature. Thank you very much for that.

It would be desirable to have a global and individual assignment. The option to activate or deactivate globally but to be able to override locally. In this context, it would also be fantastic if this function were available not only for course lists, but also for course category lists.

The function would therefore have to be able to be activated in the course categories, but can be deactivated in each level for the level and below. This would allow this really wonderful function to be controlled as required.

If the components (heading/title, image, description, lecturer, etc.) could then be selected as an option to be displayed, it would be almost perfect. Perhaps the number of columns, etc. ... then it would even be perfect ;)

@danielneis
Copy link
Author

Hello,
I've created a branch for Moodle 4.5:
https://github.com/danielneis/moodle-theme_boost_union/tree/MOODLE_405_CARDS

In this branch I fixed the height of the elements: course name, custom fields, summary and course contacts. They all have fixed widths with overflow-y: scroll now, so all cards remains same height according to the settings selected.

The new version users card-grid to it displays just like the block myoverview.

image
image
Screenshot 2024-11-22 at 15-47-09 Course categories MDL Main
image
image

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.

Display courses as cards on category listing and frontapage available courses component
9 participants