Grouping by "Unit" field in List View

Grouping by "Unit" field in List View

by Heather McMorrow -
Number of replies: 4

Hi all,

I am trying to group resources in list view by the Unit in which they appear in the online learning course. I am assuming this is a Java Script operation, but I don't know Java Script. Anyone have any idea how to do this?

 

example:

Unit 1

  • Resource #1 Title
  • Resource #2 Title

Unit 2

  • Resource #1 Title
  • Resource #2 Title

 

Average of ratings: -
In reply to Heather McMorrow

Re: Grouping by "Unit" field in List View

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Heather,

Are you using the database activity? If so, could you tell me what fields you are using? Or even include a preset of the activity? Really kind of need to know if the resources 1, 2, etc., are part of the Unit 1, 2, etc. records, or if they are separate records in the database.

In reply to AL Rachels

Re: Grouping by "Unit" field in List View

by Heather McMorrow -

Thanks Al,

They are part of the record. This is just a database of resources that I have put in. The students will not be editing it.

 

This is my list view

File Resource Author/Organization more info>> ##more##       ##edit##  ##delete## 

 

This is the single view. The Unit where the resources appears is a field in that record.

Resource Image

Resource Title  
 File

Publishing Organization
Resource Author/Organization

Resource Description

Resource Website

Resource appears in
 Units

##edit## ##delete##

 

 

 

In reply to Heather McMorrow

Re: Grouping by "Unit" field in List View

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Heather,

Okay, it looks like all you need to do is click on the Search tab, and set the Sort By to the Units field, then click Save settings. It will then give you a list view which is grouped by Units.

It appears that you did not include Units in your list view, so if you want or need it in the list view, you can go back and edit the list template and add it.

In reply to Heather McMorrow

Re: Grouping by "Unit" field in List View

by Itamar Tzadok -

Back in 2011 I posted this illustration in Displaying entries categorised:

 

You simply add a certain pattern of the Dataform select (menu) field and it displays the value only once. And you can have sub-categories with further select fields.

Per chance, I'm revisiting this feature for the new version of the Dataoform.

May not be useful for you as this is, or rather was, a feature of the Dataform select (menu) field. But for what it's worth ... smile