Moodle

Side bar block - inclusion in core Moodle

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Blocks
  • Labels:
    None
  • Environment:
    any
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE

Description

This block provides similar functionality to the Main Menu block, with the additional option to rename the block. The side bar block can be deployed in courses and is very useful in reducing the amount of items which would typically be located in the course header section, thus providing a useful addition to course design.

Of secondary interest, but still useful is the opportunity to create a CMS-like effect using web page resources when showing the course blocks.

The latest code for the block is at: contrib/plugins/blocks/side_bar

Activity

Hide
Martin Dougiamas added a comment -

OK, let's get this into 1.9 (assuming the code passes review).

Show
Martin Dougiamas added a comment - OK, let's get this into 1.9 (assuming the code passes review).
Hide
Petr Škoda (skodak) added a comment -

There is a problem with isteacher(), it is obsoleted now by capabilities. I guess isediting() has the checks in it.

The section ID > 1000 should not cause problems, but I am not 100% sure - I will have to look more at the code tomorrow...

Show
Petr Škoda (skodak) added a comment - There is a problem with isteacher(), it is obsoleted now by capabilities. I guess isediting() has the checks in it. The section ID > 1000 should not cause problems, but I am not 100% sure - I will have to look more at the code tomorrow...
Hide
Ray Lawrence added a comment -

This is great. If you need anything test in let me know.

Show
Ray Lawrence added a comment - This is great. If you need anything test in let me know.
Hide
Petr Škoda (skodak) added a comment -

Maybe we could use some other name for this block, "Side bar" does not IMO imply that the activities are not visible on course page.

Show
Petr Škoda (skodak) added a comment - Maybe we could use some other name for this block, "Side bar" does not IMO imply that the activities are not visible on course page.
Hide
Ray Lawrence added a comment -

Here's my initial thought....

Why not call it "Main Menu"? This will keep things consistent with the site page where there is a block with similiar functionality. (There is already a non-standard "Course Menu" block.

Side bar block can be renamed and I thinik it's important to keep this flexibility as this block could be used in a variety of ways. If the block was called "Main Menu" and the current (site page) Main Menu block was updated to include the renaming functionality the whole thing would be just about perfect.

Show
Ray Lawrence added a comment - Here's my initial thought.... Why not call it "Main Menu"? This will keep things consistent with the site page where there is a block with similiar functionality. (There is already a non-standard "Course Menu" block. Side bar block can be renamed and I thinik it's important to keep this flexibility as this block could be used in a variety of ways. If the block was called "Main Menu" and the current (site page) Main Menu block was updated to include the renaming functionality the whole thing would be just about perfect.
Hide
Petr Škoda (skodak) added a comment -

Main menu? I always thought it is a bit confusing

Maybe something like Section in block, Block section ?

Show
Petr Škoda (skodak) added a comment - Main menu? I always thought it is a bit confusing Maybe something like Section in block, Block section ?
Hide
Ray Lawrence added a comment - - edited

IMO Main Menu is a fairly standard description of this type of functionality.

My feeling is that your suggestions are too close to WHAT it actually does in Moodle-speak and will not be relevant or generic enough to make sense with HOW it will be used. (The fact that the activities are actually in a hidden section will be of no or little interest to the majority of users).

Show
Ray Lawrence added a comment - - edited IMO Main Menu is a fairly standard description of this type of functionality. My feeling is that your suggestions are too close to WHAT it actually does in Moodle-speak and will not be relevant or generic enough to make sense with HOW it will be used. (The fact that the activities are actually in a hidden section will be of no or little interest to the majority of users).
Hide
Petr Škoda (skodak) added a comment -

As I said Main Menu is IMHO confusing for at least new users, I would expect full access to all activities from it and also Main Menu IMO indicates that it is the main entry point of given course - it may be true for site course, but definitely not for normal courses.

I am glad I do not have to decide this
Thanks for any suggestions and ideas!

Show
Petr Škoda (skodak) added a comment - As I said Main Menu is IMHO confusing for at least new users, I would expect full access to all activities from it and also Main Menu IMO indicates that it is the main entry point of given course - it may be true for site course, but definitely not for normal courses. I am glad I do not have to decide this Thanks for any suggestions and ideas!
Hide
Ray Lawrence added a comment -

That's a good point. It depends, though, on who we are considering as users here.... admins, teachers, students.

For admins & students it make sense for the block to be called the same at sit and course level. If the standard same is causing real difficulties on a particular site then it can be renamed in the uusl way in the Lang editng area.

For students, they will see this block presented in courses in a number of way be the course designer and, as you mention above, it may not be the main entry point of the course. Retaining the ability for teachers to rename the block should provide ample flexibility here.

Also it occurs to me we've not touched upon whether this should be a single or multiple instance block. Not thought this through in detail but my initial thought is multiple if technically feasible.

Show
Ray Lawrence added a comment - That's a good point. It depends, though, on who we are considering as users here.... admins, teachers, students. For admins & students it make sense for the block to be called the same at sit and course level. If the standard same is causing real difficulties on a particular site then it can be renamed in the uusl way in the Lang editng area. For students, they will see this block presented in courses in a number of way be the course designer and, as you mention above, it may not be the main entry point of the course. Retaining the ability for teachers to rename the block should provide ample flexibility here. Also it occurs to me we've not touched upon whether this should be a single or multiple instance block. Not thought this through in detail but my initial thought is multiple if technically feasible.
Hide
Stuart Anderson added a comment -

I initially had concerns that the "section 1000" might show up in the section links block or the course menu block. However, I've just tested that use case out and it doesn't which is good news. I think that the fact that it displays "Week 1000" when creating an object is confusing. If that could some how be prevented it would be a good thing.

--Stuart.

Show
Stuart Anderson added a comment - I initially had concerns that the "section 1000" might show up in the section links block or the course menu block. However, I've just tested that use case out and it doesn't which is good news. I think that the fact that it displays "Week 1000" when creating an object is confusing. If that could some how be prevented it would be a good thing. --Stuart.
Hide
Martin Dougiamas added a comment -

This really needs a programming champion ... I need to push this to 2.0 (will go in head right after 1.9 branch and MIGHT be backported to 1.9.1)

Show
Martin Dougiamas added a comment - This really needs a programming champion ... I need to push this to 2.0 (will go in head right after 1.9 branch and MIGHT be backported to 1.9.1)
Hide
Ray Lawrence added a comment -

OK. I was thinking about this recently. Is there any reason why a clone of the Social Activities block couldn't be made to work with all course formats? This would cover most of the functionality with tried and tested code. The downside would be the fixed block name (so it would need t be generic (why not Main Menu, this could be altered by a site wide Lang pack alteration) and a different section would need to be specified for the "hidden" items. Ta Da! Or is that too simplistic?

Show
Ray Lawrence added a comment - OK. I was thinking about this recently. Is there any reason why a clone of the Social Activities block couldn't be made to work with all course formats? This would cover most of the functionality with tried and tested code. The downside would be the fixed block name (so it would need t be generic (why not Main Menu, this could be altered by a site wide Lang pack alteration) and a different section would need to be specified for the "hidden" items. Ta Da! Or is that too simplistic?
Hide
Petr Škoda (skodak) added a comment -

I still see this code as a potentially problematic hack, but I agree this would a very useful addition in some cases.

Anybody wants to work on this in HEAD to make this an integral part of course format? It might be better to start a bit later, it was still not decided how much will change in course format related code yet

At the same time this should ideally solve problem with changing number of topic/weeks - activities outside of visible topics should be automatically hidden, but still visible for teacher.

Show
Petr Škoda (skodak) added a comment - I still see this code as a potentially problematic hack, but I agree this would a very useful addition in some cases. Anybody wants to work on this in HEAD to make this an integral part of course format? It might be better to start a bit later, it was still not decided how much will change in course format related code yet At the same time this should ideally solve problem with changing number of topic/weeks - activities outside of visible topics should be automatically hidden, but still visible for teacher.
Hide
Ray Lawrence added a comment -

Another issue is what is displayed in the index pages section 1000 (for example) doesn't look that great.

Petr, would adapting the Social Activities block be a better starting point than the Side Bar block code?

Show
Ray Lawrence added a comment - Another issue is what is displayed in the index pages section 1000 (for example) doesn't look that great. Petr, would adapting the Social Activities block be a better starting point than the Side Bar block code?
Hide
Petr Škoda (skodak) added a comment -

I guess it would require changes in get_fast_modinfo() function, the modinfo now plays much bigger role - now used for activity listings and also fast access control checks.

The coding is not the problem here, it would be nice if somebody researched other methods to make something excluded from course page, but otherwise accessible. The 1000 section hack is just one options (which I do not like - but who knows,. it might be the best way in the end).

I think that the UI should be part of the course page when course page, some extra section visible for teachers, but hidden for students.
The block could be a bit more general too - maybe a general links block (links to activities but also external www resources), but is it worth it if you can do that with general html box? I guess for some audience yes.

Show
Petr Škoda (skodak) added a comment - I guess it would require changes in get_fast_modinfo() function, the modinfo now plays much bigger role - now used for activity listings and also fast access control checks. The coding is not the problem here, it would be nice if somebody researched other methods to make something excluded from course page, but otherwise accessible. The 1000 section hack is just one options (which I do not like - but who knows,. it might be the best way in the end). I think that the UI should be part of the course page when course page, some extra section visible for teachers, but hidden for students. The block could be a bit more general too - maybe a general links block (links to activities but also external www resources), but is it worth it if you can do that with general html box? I guess for some audience yes.
Hide
Aaron Barnes added a comment -

Patch against latest contrib version

Show
Aaron Barnes added a comment - Patch against latest contrib version
Hide
Aaron Barnes added a comment -

Please ignore that patch, have created it's own tracker item CONTRIB-1346

Show
Aaron Barnes added a comment - Please ignore that patch, have created it's own tracker item CONTRIB-1346

People

Dates

  • Created:
    Updated:
    Resolved: