Archive for October 2016

Student Programmer Position: Working on Sakai – Open Source

I would like to fill a student programmer position (at the University of Michigan) to help me work on the Sakai open source Learning Management System. Sakai is the most popular open source learning management system for top-level research schools around the world like NYU, Oxford, University of Capetown, Notre Dame, Duke, University of North Carolina and many others. There are well over 200 schools that use Sakai as their primary learning management system and there are millions of daily users of the product.

I am currently working on defining and building the next generation of interoperability standards that allow learning systems to share and exchange data via standard, open protocols. I am also working on making Sakai certified against standards for accessibility like WCAG.

Skills Required

In the position you will make direct contributions to the open source Sakai project in your own name as well as work with me as I develop new and expanded functionality for Sakai.

This will require a pretty significant set of solid programming skills:

– Java
– Java Servlets
– Structured Query Language (SQL)
– HTML / CSS
– Accessibility
– JavaScript
– Git / github

This is not a position where you will learn those skills – you must already have them. Sakai is a million lines of code – much of which is a decade old. Working with real, mature, production code that was developed over time by a team of >100 programmers is both a technical challenge and very gratifying at the same time.

https://github.com/sakaiproject/sakai

In addition to your skills, you will need solid hardware to do Sakai development. My own laptop is a quad-core-i7 macintosh, 16GB RAM, and 500GB SSD. When you are building and testing a million lines of code – it takes some resources.

Benefits

You will work with a highly talented and deeply committed team of software designers, end-users, and software developers to tackle the most advanced issues in building software for teaching and learning. I would work as your mentor to bring you into this community. The community is very active. We have several teleconferences per week that are attended by people around the world where we work on topics like development, accessibility, marketing, and teaching and learning with Sakai. I will encourage you to attend these teleconferences to make sure that your work fits well into the community and product. I am not the expert in all things Sakai – much of what you learn about Sakai will come from many others in the Sakai community.

There may be travel to Sakai meetings and/or standards meetings where you will met engineers from all of the major learning management systems like Moodle, Blackboard, Canvas, Desire2Learn, Schoology and others. If you have an interest in working in the educational technology space there is potential to make many good contacts that might lead to an internship or a job. My goal is to be your mentor rather than your boss and in time for you to be a respected contributor in your own right.

When you have mastered the Sakai code base – you will know what it takes to understand a million lines of code and develop in a professional manner. You also will know that your contributions have advanced the cause of teaching and learning with technology worldwide.

This is a student programming position – not a full time professional position but the work you do will be at a professional level.

Getting Started

The best way for you to figure out if you have the skills and development environment to handle Sakai is to download it and get it up and running in your development environment. You can follow the official installation instructions at:

https://www.sakaiproject.org/download-sakai

(Start with the git repository)

I have built a set of scripts that allow me to check out and set up an instance of Sakai with a few scripts. They work on Mac or Linux and make things easier:

https://github.com/csev/sakai-scripts

Please feel free to send me a resume or ask a clarifying question.

What is static, double colon (::), $this, and arrow(->) in PHP OO

I wrote this code to answer some PHP Object Oriented questions during office hours.

function plus($x, $y) {
    return $x + $y;
}

class Thing {
    public $value;
    private $a;
    protected $b;

    function __construct($start=0) {
        echo("Construct\n");
        var_dump($this->value);
        $this->value = $start;
        $value = 12345;
        var_dump($this->value);
        echo("Done\n");
    }

    public static function add($x, $y) {
        // Cannot use $this
        echo("Adding $x $y \n");
        return $x + $y;
    }

    public function increment($x) {
        $this->value += $x;
        echo("New:" . $this->value . "\n");
    }

    public function inc2($x, $y) {
        $this->increment($x);
        $this->increment($y);
    }

    public function add10() {
        $this->value = self::add($this->value, 10);
        $this->value = $this->add($this->value, 10);
        $this->inc2();
    }

    function __destruct() {
        echo("AAAAAAAAAAAAAARGH!!\n");
    }

}

$y = plus(3,4);

$y = Thing::add(3,4);

$z = new Thing(7);
$a = new Thing(10);

$z->increment(4);

$a->increment(5);

$y = $z->add(5,6);

unset($z);
echo("The last line\n");

Fixing when a jQuery UI Modal Shows Behind Fixed Bootstrap Navigation

I am blogging this because I searched stack overflow and Google and no one had the answer. Too bad I can’t just state something in StackOverflow after hours of research and a bunch of “close” questions and answers. But ah well – here it is.

I am working on my Tsugi OER site www.pr4e.com.

What I am trying to do is use the modal capabilities of jQueryUI modal dialogs (mostly because I do not like the overblown markup of BootStrap modals) while the rest of the site is styled with BootStrap. All goes well until the modal is larger than the overall window vertically and the modal slides under the BootStrap fixed navigation bar.

Here are some images:

Navigation with enough vertical space (good): good_nav

Not enough vertical space, modal slides below the navigation (bad):bad_nav

Not enough vertical space, modal atop the navigation (good): better_nav

Solution

The key is to set the z-index of the *generated* markup created by the jQuery UI dialog call after the dialog was created:

function showModal(title, modalId) {
    console.log("showModal "+modalId);
    $("#"+modalId).dialog({
        title: title,
        width: modalDialogWidth(),
        position: { my: "center top+30px", at: "center top+30px", of: window },
        modal: true,
        draggable: false
    });

    // In order to float above the BootStrap navigation
    $('.ui-dialog').css('z-index',9999);

    $(window).resize(function() {
        $("#"+modalId).dialog("option", "width", modalDialogWidth());
    });
}

I figured out the generated elements and changed their z-index.

Working code: www.py4e.com (Log in and go to “Use this service”, and press “Using Your Key”).

Code in github: tsugiscripts.js