Conditional activities: Course Program block-date/time hide/show for sections/activities

Conditional activities: Course Program block-date/time hide/show for sections/activities

by Michael Penney -
Number of replies: 16

This block was requested by several faculty here at HSU who wanted to be able to show/hide course sections (topics or weeks) or activities within sections automatically, based on the date and time. (see screenshot)

It installs as a block, though you do have to add our format.php to your topics and weeks course formats (or 3 lines of code to your existing custom course format--details in the ReadMe). It uses the 'eye' to hide/show, so for courses where the block is added, that won't work. Only courses with the block added will be affected, in other courses the 'eye' will work normally.

More information here and zip here:

http://learn.humboldt.edu/course/view.php?id=21&topic=5

This is beta code, use at your own risk, it seems to work fine here, but only time will tell...big grin

Mark Neilson, Programmer
Michael Penney, Instigator and "Lets put that there" guy.

Attachment cdc_cp.gif
Average of ratings: -
In reply to Michael Penney

Updated date/time restrictions files

by Michael Penney -

I updated the files with new formats that work with Moodle 1.3.

We also put a text limit on the summary information, so now the Course Program just shows the first 30 chars of the course summary or the chars before the first line break, like our Navigation block.

Let us know if you have any comments changes, etc.

Thanks!
Michael

In reply to Michael Penney

Re: Updated date/time restrictions files

by Sean S -
Oooh this is very interesting. Does it work with 1.4.3? also will it work with 1.5 or be fully integrated into 1.5 or future versions of moodle?

Will add to my installation if compatible with 1.4.3, but am just waiting to here good news.
In reply to Sean S

Re: Updated date/time restrictions files

by Michael Penney -
We're using it with 1.4.2+ now, it should work fine with 1.4.4.

It will have to be updated to work with 1.5's new block classes, I'll get to that soon.

In reply to Michael Penney

Re: Updated date/time restrictions files

by Marcus Schubert -
Hi,

i think your new block is very impressive but i got two little problems:
  1. If you want to change anything and then commit this you get the error that the ID of the course was incorrect. I found out, that after commiting something the course id is no longer a number but an array. Why this?
  2. I finally got that array-bug out of the code, but now the commited settings are not saved.
Do you have any suggestions to this?

Im running on moodle 1.4.3 , Apache 2, PHP4.

Thanks

Marcus
In reply to Marcus Schubert

Re: Updated date/time restrictions files

by Michael Penney -
Hmm, never had any problems here. Did you load the course format files or just the block code? Are you using weekly or topics course format?
In reply to Michael Penney

Re: Updated date/time restrictions files

by nadia Ridley -

hi,

where can I get this plugin?

Thanks

In reply to nadia Ridley

Re: Updated date/time restrictions files

by Jane Erlandson -

Nadia,

Which plugin are you referring to?

Thanks, Jane


In reply to Jane Erlandson

Re: Updated date/time restrictions files

by nadia Ridley -

Hi, thanks for your reply.

It's called block_course_program for making possible to show/hide course sections (topics or weeks) or activities within sections automatically.


Thanks

In reply to Michael Penney

Re: Conditional activities: Course Program block-date/time hide/show for sections/activities

by Manjunath Mattam -
Ok guys worked...after soo many editings
In reply to Manjunath Mattam

Re: Conditional activities: Course Program block-date/time hide/show for sections/activities

by Michael Penney -
What editings did you do? Can you post a zip of them here?
In reply to Michael Penney

Re: Conditional activities: Course Program block-date/time hide/show for sections/activities

by Manjunath Mattam -
All the modifications are regarding an "_" underscore. Directory name and the block name are different. I had to change all the underscores in the format.php and in the block.
In reply to Michael Penney

Course Program for Moodle 1.6?

by Eduardo Hernandez -
Hello,

Is there a version of Course Program block-date/time hide/show for 1.6 out there?.

Best regards,
Eduardo
In reply to Eduardo Hernandez

Re: Course Program for Moodle 1.6?

by SA SA -
Is there a version for 1.6?

has anyone tried the 1.5 version with 1.6 and got it working?

I want to release resources at specific times - this seems an obvious feature for moodle to have but I can't find any definitive information about it with moodle.

Is it possible to control when things become available - if so how?

Cheers,

Sa
In reply to SA SA

Re: Course Program for Moodle 1.6?

by Sjaak Kamerling -

At my school we are also interested in this feature within Moodle 1.6.

Sjaak

In reply to Sjaak Kamerling

Re: Course Program for Moodle 1.6?

by Eduardo Hernandez -
Yes; We are using it for 1.6 and works OK. If you look at the code for 1.5 and chages that must be made to the code, and you will realize that if you look with care at the 1.6 code, and search for the right place to insert the Course Program you will have it working smoothly. We are using it in our production server... so far, so good.
In reply to Michael Penney

Re: Conditional activities: Course Program block-date/time hide/show for sections/activities

by Jose Antonio CM -

Anybody knows how to installa de couurse program block in Moodle 1.7?

Thanks