Monthly Archives: June 2017

Tsugi DB Upgrade Required Upgrade in Master (start of 0.4.x)

Attention Tsugi Production folks.

If you have been following along and doing database upgrades when I told you – my Tsugi commits this morning:

https://github.com/tsugiproject/tsugi-php/commit/cd3bfe8431a6035e4be702714ca281c36f75e832
https://github.com/tsugiproject/tsugi-php/commit/e725fe86a4a41ec85b623cb0bb5c0547daef1ba9

Will not even be noticed. These commits are the first that *depend* on the recent database upgrades being in place.

If you have been ignoring my messages and upgrade from a master a month ago to current master with a git pull, your LTI launches will break because there is now SQL in LTIX in master that depends on:

lti_user.image
lti_context.ext_memberships_id
lti_context.ext_memberships_url
lti_context.lineitems_url
lti_context.memberships_url

As well as “deleted” columns in all of the core tables.

If you upgrade and “brick” your Tsugi (which I highly doubt will happen), there are two ways to unbrick a Tsugi:

(1) Go straight to the admin UI

https://www.py4e.com/tsugi/admin/

This code specifically tries to limit how much of Tsugi is working (i.e. there are no LTI launches involved in this page) for the admin interface to work. So go to admin, enter the password and do the database upgrade and things should pop back to normal. This is the preferred unbrick trick and works almost all the time.

(2) Log in and drop back to a tag if you are checking out my Tsugi – I made a tag/release with the code that adds all the needed fields, but does not depend on those fields. It can work before or after a database upgrade:

https://github.com/tsugiproject/tsugi/releases/tag/0.3.2

A simple

git checkout 0.3.2

Should do this trick. Launches should work even with a pretty old non-upgraded DB. Log in, upgrade the database, and then re-checkout master and all should be well. You might need a tiny DB upgrade after going back to master – but it does not affect the LTIX runtime.

All my servers py4e.com, wa4e.com, tsugi.com and my Coursera auto grader are all running master solidly as of an hour ago.

If you get stuck, let me know – I will be watching my email.

Sakai 11.4 released!

This message is from Neal Caidin, Sakai Community Coordinator.

Dear Community,

I’m pleased to announce on behalf of the worldwide community of participants that Sakai 11.4 is released and available for use [1] !

Sakai 11.4 has 144 improvements, mostly bug fixes, [2] including:

18 fixes to the interface (aka Morpheus)
15 fixes for the Lessons tool
14 fixes for Samigo Test and Quiz tool
8 fixes for Assignments tool
7 fixes for the Gradebook tool
6 fixes for Accessibility issues (a11y)

Improvements (features or enhancements) added in this maintenance release include:
Support for Melete Import (LSNBLDR-311)
New property to override the system default and reset tools during navigation (off by default) (SAK-31389)
Improved display option for subset menus (SAK-31824)
Email sent by Messages tool links directly to the specific message sent in Sakai, making it easier to respond to the message (SAK-32240)
Drag and Drop upload enhanced to allow overwriting of existing files (SAK-30924)
Searching on scores improved in Samigo Tests and Quizzes (SAM-3130)

Other areas improved include (in alphabetical order):

Admin
Announcements
Calendar
Citations Helper
Delegated Access
Email
External Tools (LTI)
Forums
Internationalization
Kernel
Membership
Messages
PA System
Podcasts
Portal
Profile
Resources (Content)
Roster
Signup
Site Archive
Site Info
Sites Admin
Syllabus
Wiki

Three security issues were fixed in 11.4 (details will be sent shortly to the Sakai Security Announcements list)

[1] Downloading information available at – http://source.sakaiproject.org/release/11.4/

[2]
2a. Improvements in 11.4

2b. or look directly in the Jira filter – https://jira.sakaiproject.org/issues/?filter=16015

2c. Github issues (for GradebookNG only)

The path to Tsugi 0.4.x (Roadmap for the next month or so)

I just wanted to let you know about the roadmap for the next month or so that will finish the 0.3.x release and move master to 0.4.0. There will be non-upwards compatible changes in 0.4.0 as the first step will be to do some cleanup after the Tsugi-Koseu split. At this point certain things can be used the old Tsugi way or the new Koseu way – once we go to 0.4.x we will remove the backwards compatibility stuff. More below.

Tasks to finish 0.3.x:

– Add code to the LTIX runtime that handles new data model items (url fields for memberships and outcomes, an user image field, and others). The data fields are mostly there already (please upgrade your database).

This will wrap up and make the file 0.3.x release. Some people will want to switch from master to the 0.3.x branch to avoid or delay the 0.4.x changes.

Major 0.4.x changes:

(1) Remove the vendor folder from

https://github.com/tsugiproject/tsugi

This means that to upgrade Tsugi, you will need to do both a

git pull
composer update

And when tsugi-php or koseu-php are upgraded – you will need to do a

composer update

I know folks think that having vendor in github violates the separation of church and state

https://github.com/tsugiproject/tsugi/issues/30

I think that after the switch, you will realize it was kind of nice to *only* need to do a git pull and leave the “composer updates” to me.

(2) Make it so that the Koseu tools that organically grew in Tsugi will only exist in Koseu. As an example in my www.py4e.com web site, the following URLs all work

https://www.py4e.com/lessons
https://www.py4e.com/tsugi/lessons
https://www.py4e.com/tsugi/lessons.php

Post 0.4.x, only the first (Koseu-style) url will work – the old code will be removed from /tsugi – so the best way to smooth the transition is to switch to the Koseu-style urls. See these files for examples of how to switch:

https://github.com/csev/py4e/blob/master/.htaccess
https://github.com/csev/py4e/blob/master/koseu.php
https://github.com/csev/py4e/blob/master/nav.php

Comments / questions welcome.

Developing a Tsugi Tool (New Videos)

I use the attendance tool as my “basic” Tsugi tool. I recorded five videos showing how this tool works and showing how you can write a tsugi tool several ways:

– A single PHP file with the controller and view
– A Silex+Twig application
– A JQuery + Handlebars application
– A single page application using JSON and tmpljs

https://www.tsugi.org/lessons/devintro

The code is in github:

https://github.com/tsugitools/attend

Each of the variations is in a different permanent branch – cool to be able to switch implementations with a

git checkout handlebars