Course Settings Block

Course Settings Block

by Bob Puffer -
Number of replies: 14
Thought I would throw this up here in case its of use to anyone -- at least my teachers were pleased to have this functionality available to them more quickly than digging around:

Course Settings Block
Average of ratings: -
In reply to Bob Puffer

Re: Course Settings Block

by Larry Elchuck -
Nice block, Bob

Very handy when using the patch that allows one to copy activities in a course. The latter patch only works with AJAX turned off. This provides an easy toggle to turn AJAX back on ..... making movement of the cloned activity (to where it is /they are tended to go) much more efficient.

Thanks
L
In reply to Larry Elchuck

Re: Course Settings Block

by Bob Puffer -
My instructors have found it very useful to toggle AJAX as it works great with some things and poorly with others (i.e., moving blocks up and down).
In reply to Bob Puffer

Re: Course Settings Block

by Larry Elchuck -
Hi Bob

First time I ran into an error with the Course Settings Block .. and I used it a lot over the past 2-3 weeks

When trying to change the number of visible topics, I get a coursenotupdated error.

I can make the change to the number of topics the old-fashioned way (Settings menu).


In reply to Larry Elchuck

Re: Course Settings Block

by Bob Puffer -
I'm sorry Larry, I didn't catch your post in my digest. I've got an update I'm posting to Modules and Plugins... by request the users wanted a single form with radio buttons. I've renamed it "Quickset" because there are so many blocks out there starting with "Course". If you have to reinstall, you can just rename the mdl_blocks record to "Quickset". Lang file is self-contained. Alternate link is here.
Quickset_block.png
In reply to Larry Elchuck

Re: Course Settings Block

by Barbara Lawrence -

Hi Bob

This block is very useful for us - thanks very much for developing it.

I noticed a couple of things:

1. there are error messages in the log:

[09-Dec-2010 10:25:48] PHP Notice:  Undefined variable: courseid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\moodle\blocks\quickset\processform.php on line 16
[09-Dec-2010 10:25:48] PHP Notice:  ERROR:  syntax error at or near "AND"
LINE 5:                     WHERE c.id= AND c.id !=479 LIMIT 100
^<br /><br />SELECT ctx.path, ctx.depth
FROM m_context           ctx
JOIN m_course            c
ON (c.category=ctx.instanceid AND ctx.contextlevel=40)
WHERE c.id= AND c.id !=479<ul style="text-align: left"><li>line 686 of lib\dmllib.php: call to debugging()</li><li>line 481 of lib\dmllib.php: call to get_recordset_sql()</li><li>line 2129 of lib\accesslib.php: call to get_record_sql()</li><li>line 2535 of lib\accesslib.php: call to create_context()</li><li>line 16 of blocks\quickset\processform.php: call to get_context_instance()</li></ul> in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\moodle\lib\weblib.php on line 6991
[09-Dec-2010 10:25:48] PHP Notice:  Error: could not insert new context level "50", instance "".<ul style="text-align: left"><li>line 2220 of lib\accesslib.php: call to debugging()</li><li>line 2535 of lib\accesslib.php: call to create_context()</li><li>line 16 of blocks\quickset\processform.php: call to get_context_instance()</li></ul> in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\moodle\lib\weblib.php on line 6991
[09-Dec-2010 10:25:48] PHP Notice:  Undefined variable: courseid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\moodle\blocks\quickset\processform.php on line 18

Despite the error messages, the course settings are being updated correctly.

2. I had an apostrophe in the name of my town (Bishop's Stortford) in my user profile, and this caused a usernotupdated error to appear on the screen.  When I removed the apostrophe the error disappeared.   The apostrophe doesn't cause any problems when I edit my user profile in the normal way.

Many thanks

In reply to Barbara Lawrence

Re: Course Settings Block

by Bob Puffer -

Thank you Barbara for pointing this out.  I've corrected the code to remove the notice and have attached here (and will also attach at the Contrib and Plugins).  Will investigate the other issue of "those dang apostraphes".

In reply to Bob Puffer

Re: Course Settings Block

by Barbara Lawrence -

Fantastic! Thanks Bob.

In reply to Barbara Lawrence

Re: Course Settings Block

by Balasubramanian R -

Hi,

I have installed your Quick Setting block. But I can not view this block. Here I have enclosed my site. Please solve my problem

In reply to Balasubramanian R

Re: Course Settings Block

by Bob Puffer -

Assuming version 1.9, check permissions on the folder and contained files.

In reply to Bob Puffer

Re: Course Settings Block

by Bob Puffer -

The "Course settings" block (heretofore named, "Quickset") has changed dramatically.  Here's the 2.4 - 2.5 look (can be downloaded here):

NOTES:

  1. "Update settings" is the default focus button so <ENTER> will cause that button to be submitted with any changes to:
    • Students see course?
    • Grades visible?
    • Visible sections
  2. "Edit sections" displays this screen:

Studying this screen you will discover it does everything it appears to do:

    • Delete course sections from anywhere in the sequence (if resources exist in that section they will be moved to the "Zero" section -- a warning pops-up to remind you)
    • Add sections in the middle or anywhere else
    • Quickly reorder sections with no clicks and no reliance on how AJAX is feeling today.
    • Edit the names for any of the sections which is particularly handy when first setting up a course (think of the "click savings"

SPECIAL THANKS TO TIM HUNT from whose question reordering code I stole generously