Moodle

Display of block-related activity in MyMoodle

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Other
  • Labels:
    None
  • Environment:
    Any
  • Database:
    Any
  • Affected Branches:
    MOODLE_20_STABLE

Description

For each block that is used by the course, MyMoodle will call a print_overview function, if the block has one, similar to the call to a module's print_overview function, in order to generate a similar activity message. This is something we support with our custom-built blocks on our site and which is not supported, at present by many core blocks. However, we feel that it may be worth considering modifying some of the core blocks to do this in future.

  1. mdl13586.diff
    15/Apr/08 6:05 PM
    2 kB
    Jenny Gray
  2. mdl13586.diff
    15/Apr/08 12:03 AM
    2 kB
    Jenny Gray

Activity

Hide
Jenny Gray added a comment -

I'm not sure if any-one's that bothered about this one, except perhaps me! The attached patch adds a print_overview to the block class, and then calls it in the course/lib.php print_overview.

The only thing I guess is objectionable is that the call to print_overview is inside the foreach($courses) loop rather than beign at the start like the call for modules. This is because you'd need to pass multiple arguements to the function and have the $htmlarray returned by reference, and I can't get it to work - it just keeps telling me the 2nd arguement hasn't been received.

Rather than struggle further with something that'll have minimal use, I thought I'd offer this as is, and see what you think?

Show
Jenny Gray added a comment - I'm not sure if any-one's that bothered about this one, except perhaps me! The attached patch adds a print_overview to the block class, and then calls it in the course/lib.php print_overview. The only thing I guess is objectionable is that the call to print_overview is inside the foreach($courses) loop rather than beign at the start like the call for modules. This is because you'd need to pass multiple arguements to the function and have the $htmlarray returned by reference, and I can't get it to work - it just keeps telling me the 2nd arguement hasn't been received. Rather than struggle further with something that'll have minimal use, I thought I'd offer this as is, and see what you think?
Hide
Jenny Gray added a comment -

OK, so I thought about it over night and decided that I wanted to have one more go at the single call rather than inside a loop. Attached patch overwrites the first one (sorry I don't have permission to remove that), and should be more efficient.

Show
Jenny Gray added a comment - OK, so I thought about it over night and decided that I wanted to have one more go at the single call rather than inside a loop. Attached patch overwrites the first one (sorry I don't have permission to remove that), and should be more efficient.
Hide
Jenny Gray added a comment -
Show
Jenny Gray added a comment - updated patch attached to http://tracker.moodle.org/browse/MDL-13583

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: