Allow editing of pages with misconfigured navigation block (bug #813204)

When rendering pages, only ArtefactNotFound exceptions are caught, but
navigation blocks can throw CollectionNotFound instead.  This change
catches all NotFound exceptions thrown when rendering block content and
block titles.

Change-Id: Ia52f2a8184e607dcb9868893a4acd6094d0dc35b
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
(cherry picked from commit e29f0a133e2e7c27ccce021d87e3b9d40d1e5778)
Call to table_exists() uses an XMLDBTable instance

not a string

Change-Id: I593e64790365781f879cfe7ac00a8a0f41d833a7
Signed-off-by: Brian King <brian@liip.ch>
Json-encode strings included in viewacl javascript (bug #817342)

Adds a new dwoo function to json-encode strings for inclusion in
template javascript, and uses the function in the viewacl template.

Change-Id: I47e22883c494d0c90fa7075231a840e11d5b6531
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Check for existence of tinymce translations (bug #817836)

If Mahara doesn't have a tinymce translation for the current
language, it doesn't load tinymce at all, so check that a file
exists before setting the tinymce language.

Change-Id: I14e225b24e591ae51467ee0e4ecdee1257fb7a26
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
(cherry picked from commit 528f53ddf34f3ea7d26e4926dc3cf4101e1acebb)
Merge "Json-encode strings included in viewacl javascript (bug #817342)" into 1.4_STABLE
Merge "Check for existence of tinymce translations (bug #817836)" into 1.4_STABLE
Merge "Allow editing of pages with misconfigured navigation block (bug #813204)" into 1.4_STABLE
Respect changepassword setting for newly created users

Fixes bug #832374

Change-Id: Ia08ce46861e185c316a9355b8cadc8c45255ce23
Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
Add new docs filter for different spreadsheet url (bug #843588)

It seems that the google spreadsheets published url changed and was
not being caught by the existing regexs. This adds a new regex that
catches the new format.

Cherry-picked from 8fd516c100f3b470cacfbee3f4d5cf1505b7adc9

Change-Id: Ic51ae17a789f2f97647796d9a4daa5d13d2d0108
Signed-off-by: Melissa Draper <melissa@catalyst.net.nz>
Fix group view blocktype copy page feature.

This was introduced in commit dd9395a450cef9789147125833247b9499fde047

The original code presumed that the the data was an object, but was infact
an array. This patch changes it to array access's instead of object deref's.

Bug #800373

Change-Id: I4a70eef6c5fec9c1cf8174f78a96e31df29bfd4f
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
Update flowplayer code to fix the mp3 player in ie7/8 (Bug #804129)

The flowplayer code was out of date for ie7 and ie8 causing the object
to not load. Additionally, the eolas_fix script was now causing a js
error and has been removed as it was no longer needed.

Change-Id: I67a23f223954276520b6c9da1ae1f7b291e84b47
Signed-off-by: Melissa Draper <melissa@catalyst.net.nz>
Fix the spreadsheet filter again (bug #843588)

This adds a new regex that catches the new format. Addendum
to 8c1316f372146535cbc242ce1f205ff0274f3378 in which "id=" changed
to "key=", this patch covers spreadsheets where google has now
changed the url from "/pub." to "/ccc."

Change-Id: Id2c013257ae801e251b8b8cd9fb1fcc10a7c933b
Signed-off-by: Melissa Draper <melissa@catalyst.net.nz>
Merge "Update flowplayer code to fix the mp3 player in ie7/8 (Bug #804129)" into 1.4_STABLE
Fix maildisbled preference in activity_get_users (bug #860090)

Commit a8102e9129 tried to fetch all users' maildisabled preferences
in the activity_get_users function, but failed because it used the
wrong table alias, so maildisabled is not being respected by the
email_user function whenever email_user is called by an activity
notification (most of the time).

Change-Id: I2a9cf1afa3f8661ff8a52f1ce5aed5d15adaa9da
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Add another new google doc url formats (bug #856130)

Google keeps spitting out different urls to their users. Our users
aren't going to understand how to massage these to the correct
format, so we have to try keep up. Bad google, bad.

Cherry picked from 908a2341ab95bd7e7a33413655b75481101f6411

Change-Id: I06901c142da5db179ef5361d9939ae9a03ead14e
Signed-off-by: Melissa Draper <melissa@catalyst.net.nz>
Update the GoogleApps help file for new interface

Change-Id: If92e663362233099db71f4ab41a10b0daf454c22
Signed-off-by: Kristina D.C. Hoeppner <kristina@catalyst.net.nz>
Fix fatal error in gallery on public profiles (bug #872672)

Change-Id: Iea11ad161946a8aa0cac1c696fc2b08c75b776e7
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Fix group shortnames in share with group buttons (bug #881681)

When running through the list of a user's groups for display in the
Share with my groups buttons, a group with a long name can cause
another group's button to have the long-named group's short name
displayed.  The php array pointer is not moved when items are added
to the array.

Change-Id: If90b63ec721bfbee2b2c1ad2c7d29d855c9ce1f2
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Use function to process get_instance_config_javascript js (bug #845534)

Moving this code into its own function will allow it to be used for
block instance rendering javascript as well as the configuration form.

Change-Id: I42dba8425a8455aaa9faae19d50414e33c5988db
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Eval js to rewrite task titles after block configuration (bug #845534)

When a plans block is first added to the page, the javascript overlay of
the task titles was not evaluated.  This is fixed by moving javascript
functions for the plans block into a new javascript file and pulling the
script onto the page with the same method used by the configuration form
javascript. It also:

- Rewrites the task title links after the callback from getScript
- Sets the block's artefactplugin so the js file is found correctly
- Removes any onclick from task titles before rewriting (in case
  there are two plans blocks on a page)
- Hides the pagination on first load, as the paginator object is not
  present at that point.

Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Change-Id: I913d8a6fa1f9f2f159dc8076bbdf86bd50b4b588