Posts Tagged ‘moodle’

Condensing the “News” Feature of My Moodle Using a Show/Hide Javascript

May 19, 2010 at 2:19 pm, Jared Stein

The My Moodle feature in Moodle 1.9x displays a list of registered courses to a user after logging in. The nice thing about the list is that each course link is followed by a listing of any recent news or events in the course. Unfortunately in highly active courses this list becomes quite lengthy, and ultimately obnoxious as the length obstructs quick access to other courses in one’s view.

To remedy this I have, for quite some time, maintained a custom bit of very basic Javascript and CSS that sets the default view of news items to hidden, with a clickable link to show the entire list from the My Moodle page:

hidden news in My Moodle

Clicking “There is news in this course” expands the news.

hidden news in My Moodle

The default for news for each course is “hidden”.

Nothing fancy, and even as I look at it now I can think of improvements…

We just upgraded to 1.9.8 this semester, and because this snippet modifies Moodle core I had my developer Kevin re-test the snippet before I asked our server admin Paul to replace the existing function as follows:

file Location:            '/course/lib.php'
file line:                    "800"
function to replace: "function print_overview($courses)"

Here’s the actual replacement function:

// Begin My Moodle Show-Hide News modification

// Replaces function in “course/lib.php” to hide course news by default.
// Hidden news is viewable via Javascript by clicking “There is news in this course” link.
// Link does not exist if there is no news in the course.
function print_overview($courses) {

   global $CFG, $USER;

   $htmlarray = array();

   if ($modules = get_records(‘modules’)) {

      foreach ($modules as $mod) {

         if (file_exists(dirname(dirname(__FILE__)).’/mod/’.$mod->name.’/lib.php’)) {

            include_once(dirname(dirname(__FILE__)).’/mod/’.$mod->name.’/lib.php’);

            $fname = $mod->name.’_print_overview’;

            if (function_exists($fname)) {

               $fname($courses,$htmlarray);

            }

         }

      }

   }

   foreach ($courses as $course) {

    print “<ul style=\”margin: 0; padding: 0; list-style: none; width: 96%; \”>”;

      $linkcss = ”;

      if (empty($course->visible)) {

         $linkcss = ‘class=”dimmed”‘;

      }

      print’<li class=”coursebox” style=”padding: .5em 1em 1em”><h3 style=”font-size: 120%; font-weight: normal; margin: 0 0 .2em 0″><a title=”‘. format_string($course->fullname).’” ‘.$linkcss.’ href=”‘.$CFG->wwwroot.’/course/view.php?id=’.$course->id.’”>’. format_string($course->fullname).’</a></h3>’;

      if (array_key_exists($course->id,$htmlarray)) {

print ‘<a href=”#” id=”toggler_’.$course->id.’” onclick=”document.getElementById(\’coursenews_’.$course->id.’\').style.display=(document.getElementById(\’coursenews_’.$course->id.’\').style.display==\’block\’?\’none\’:\’block\’); document.getElementById(\’toggler_’.$course->id.’\').innerHTML=(document.getElementById(\’toggler_’.$course->id.’\').innerHTML == \’There is news in this course…\’?\’Hide course news…\’:\’There is news in this course…\’);”>There is news in this course…</a><div id=”coursenews_’.$course->id.’” style=”display: none”>’;

         foreach ($htmlarray[$course->id] as $modname => $html) {

            echo $html;

         }

print “</div><!–end contents–></li>”;

      }

      print “</ul>”;

   }

}
//End My Moodle Show-Hide News modification

Moodle 2 Dev Video Overviews

Apr 21, 2010 at 4:29 pm, Jared Stein

Mary Cooch has posted a number of videos on YouTube about Moodle, the latest showcasing new features found in the upcoming Moodle 2.0, now push back to Summer 11. Despite the delay, I’m still excited to see Moodle 2.0, as a number of features really help move it outside the traditional pigeonhole of the LMS.

A Brief Tour of Moodle 2.0

2.0 includes an entire rewrite of my favorite Moodle tool, the collaborative Workshops activity:

Moodle Workshops 2.0

Because we’ve been anticipating its release since early 2008 my co-worker Ken jokes that Moodle 2.0 is vaporware, the Duke Nukem Forever of LMS. I joked that we should call it Twoodle. But seriously, I’m still hoping we’ll see an official, stable release by Fall 2010.

Video: Moodle 1.9.5 Overview for UEN

Jan 21, 2010 at 5:22 pm, Jared Stein

I conducted a 1hr demonstration of the open source learning management system Moodle 1.9.5 for higher ed folks in Utah and the Utah Education Network. The demo went well enough, and I hope some of my colleagues from around the State got a little taste of Moodle, especially as it compares to Blackboard/WebCT Vista (more…)

Dropping Lowest 2 (or More) Scores in Blackboard or Moodle

Dec 16, 2008 at 6:06 pm, Jared Stein

WebCT was infamous for it’s calculated column formula textarea that you couldn’t type in. When John Krutsch developed a clever Javascript hack for it (just one of several cool IE-only hacks packaged as WebCT PowerTools), crafting unusual formulas was suddenly more viable, and we began dropping not just the lowest score, but several low scores (more…)

Video: Intro to OpenShare for Moodle

Oct 23, 2008 at 3:31 pm, Jared Stein

Mike Caufield asked that I put up a screencast on the OpenShare mod for Moodle. Here’s one that comes in just under 8 minutes–shorter even than my hatcheted and curtailed preso at MoodleMoot ‘08 SFO (more…)

OpenShare (v0.5) for Moodle Released

Oct 1, 2008 at 9:09 pm, Jared Stein
the OpenShare blockThe OpenShare block in Moodle

Tonight I’ve released the first all-new version of the OpenShare modification for Moodle 1.9, which I demonstrated last week at OpenEd 2008.

You may view OpenShare documentation or simply download the OpenShare mod now.

(more…)

Re. Blackboard Customers Consider Alternatives

Sep 9, 2008 at 11:28 am, Jared Stein

Our Chief Information Office, Ray Walker sent me an article in The Chronicle: Blackboard Customers Consider Alternatives. It’s a great read to gauge the current state of the corporate LMS leviathan.

One passage in particular percolated my sense of irony. In addressing the idea that institutions may have more flexibility to innovate with open source solutions, Michael Chasen… (more…)

Moodle Demo for LMS Showcase

Aug 13, 2008 at 10:03 pm, Jared Stein

UEN and USHE are hosting a showcase of current learning management systems tomorrow, August 14th, at the Marriott library in Salt Lake City. I get to present Moodle at 9:30am, so here’s a quick link to my Moodle Demo presentation page, which includes an overview document and a backchannel for chat.

MoodleMoot Presentation: OER, OCW, & the Open Mod

Jun 11, 2008 at 10:14 am, Jared Stein

Today I am presenting at the SFo MoodleMoot on how Moodle can be used to deliver Open Educational Resources, especially through our modification of Moodle, the Open Meta Mod.

Presentation slides are now available and you are welcome to participate in the backchannel through the chat window provided below.

Presentation Slides

openmod.ppt

Web Sites Referenced

P.S. After my presentation was over, I came back to my hotel to find this bus in the parking lot. It’s nothing less than a sign for a questioning open education convert.

get on the ocw bus

Presenting OER Mod at MoodleMoot San Francisco

May 15, 2008 at 12:06 pm, Jared Stein

It looks like I’ll be presenting at the 2008 MoodleMoot San Francisco, June 9 – 11, 2008 South San Francisco Conference Center on our Open Mod for sharing open educational resources. I’ll be dragging Kenneth Woodward along to explain the technical facets of the mod, and to delve into the community of Moodle developers.

Of course, prior to the conference Ken and I will have to work pretty aggressively with Clark Nielsen and John Krutsch to ensure that the mod’s features and functionalities are stable and presentable.