Discussions started by Itamar Tzadok

Could someone (Patrick?) please remove the 'Topic/weekly outline' heading (h2.outline) from the base theme core code? This heading is an absolutely redundant information and at any rate anyone who thinks otherwise may add a label with that information. This may save many (as forum threads indicate) the trouble of hiding this heading in so many creative ways (local css, theme css, theme php/html hacks, etc.) smile
Average of ratings: -
There is a discussion thread on a certain contrib (or to be contrib) for Collapsed Weeks Format down this forum. If you're not the master of your Moodle domain hacks or non-standard themes may be out of your reach. But you may still achieve a similar effect, albeit slightly limited, by adding a few lines of simple css in a label on your course main page (provided of course that the master of your Moodle domain "trust your content").

<style type="text/css">#middle-column h2.outline{display:none;}#middle-column td.content ul{display:none;}#middle-column td.content:hover ul{display:block;}#section-0 td.content ul{display:block;}body.editing td.content ul{display:block;}</style>

=== Hides the 'Topic/Weekly outline' label. (Personal preference)
=== Hides content (activity/resource items) of all the topic/week sections.
=== Shows dynamically content of a particular topic/week section upon hovering.
=== Shows statically content of section 0. (Overrides the hide/show)
===
Shows statically content of of all sections in editing mode (Overrides the hide/show)

Of course this may work only on browsers which support whatever:hover but most recent versions of the main browsers should be there.

Also, this styling assumes a standard theme or a very close relative.

Applying:
  • Copy the style code above.
  • Create a label in section 0 (top section) on your course page.
  • Toggle HTML source (toggle).
  • Paste code.
  • Save.
  • With a bit of luck it will work.
Removing:
  • Delete the label.
smile
Average of ratings: -
This time I'd like to introduce a simple bar-graph poll. The database has one radio field with the choices. It is set to required entries: 1, Entries required before viewing:1, Maximum entries:1, so that the user/student has to vote before viewing the results. The single view is effectively disabled by redirecting the page to the list view. The list view displays a bar-graph of the results. I'd like to make the code just a little bit more generic and then I'll add the preset to Moodle Exchange. In the meantime see image below and comments and suggestions are welcome. smile

Other things you can do with a database if you only find a good enough reason to do them:
Attachment data-bargraphpoll-listview.png
Average of ratings: -
This one is a "progress report". In this particular case each entry is a module under development and each module has three components. Each component may be assigned the following statuses: Not_Started, In_Progress, Completed, Maintenance. The main point here is the visual effect in the list view. The effect is produced by adding to the css template css classes with the statuses as class names and background-color definitions (e.g. .Not_Started {background-color:#ff6666;}), and adding to the td element in the table of the list view the class property with the fields value (e.g. <td class="||item1Status||">||item1Status||</td> (|| stands for square brackets))

smile


Attachment data-progressreport1.png
Average of ratings: Useful (2)