Difference between revisions of "Features/Optional activity updates"
(→Scope and implementation)
|Line 1:||Line 1:|
[[Category:|Optional activity updates]]
Latest revision as of 14:40, 20 April 2015
Extend microformat updater to be able to mark activities as optional for automatic updates.
- Martin Abente Lahaye
- Targeted release: 0.104
- Last updated: 05/08/2014
- Percentage of completion: 90%
This proposal is based around the needs of the OLPC project in Australia, but reflects a common need (current or future) of other OLPC implementations as well.
The problem: Previously, Daniel Drake implemented a mechanism for automatic activities updates. This was of great help for OLPC deployments such as Australia. However, the current mechanism will update (or install) ALL the activities in the updates list. This becomes a problem when not all the activities are intended for automatic updates, ie., when the bundle size is too big for massive automatic installation. In the practice deployments do not enable automatic updates because this kind of concerns.
The proposed solution is to provide a way to mark activities in the microformat file as optional. Activities marked as optional will:
- Not be updated or installed during automatic updates.
- Not be selected by default in the activities updater UI.
Benefit to Sugar
The flexibility added by this feature will allow many deployments to enable the automatic updater, therefore users will benefit from receiving newer activities automatically.
Scope and implementation
A initial implementation can be found in here. The changes are:
- extend microformat parser to extract a new olpc-activity-optional field.
- extend BundleUpdate class to support this field so other updater components can access to this information.
- filter activities that are marked as optional when running in automatic mode.
- do not select activities marked as optional in the updater UI list.
This implementation is backwards compatible. Deployment that don't need to use this feature can simply ignore it. This field is used only on entries that need to be marked as optional.
How to test
Modify your microformat file (ie., wiki or bundletools) and only mark optional activities entries as follows:
<tr> <td class="olpc-activity-info"> <span class="olpc-activity-id">net.flossmanuals.LevelActivity</span> <span class="olpc-activity-version">1</span> <span class="olpc-activity-url"><a href="http://localhost:8000/some/deeper/path/bundles/level-1.xo">download</a></span> <span class="olpc-activity-optional">1</span> </td> </tr>
User experienced is untouched.