Template markers on frontpage (Bug#883377)

Made the template markers bold so that they stand out more.

Change-Id: Iccfe9305ce5a68223f7ba321ea9cd12e90408e94
Signed-off-by: Christopher Tombleson <christopher@catalyst.net.nz>
Use consistent ordering in plans, blog blocks

If there are multiple blog posts or tasks with exactly the same
creation or completion time, the same blog post can appear on two
different pages of results, because the the order by part of the query
is not restrictive enough to produce an unambiguous order.

Change-Id: I59a7110b49e92af1a05dba37379707ea9fc225ef
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
User search link to user profile (Bug #981987)

Profile image, first name and last name now link to that users profile page.

Change-Id: Id1f8ae6ff4167e8a9be28b0dae60a190378f4fd8
Signed-off-by: Christopher Tombleson <christopher@catalyst.net.nz>
Don't recursively notify admins about notification exceptions (bug #1009301)

Avoid stupid attempts to notify admins about failed notifications when
we're in the middle of notifying the admins about failed
notifications.

Change-Id: I50037d93e3caf32e8de116cbd638fe5563957ce1
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Cut down on similar failed notification notifications (bug #1009301)

When trying to notify the site admins about notification failures,
drop similar notifications during a single cron run.

Change-Id: Idcaecd01fcbfd035d57e967d4e9ac10efeb75180
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Fix noisy log message from local_header_top_content and productionmode

See commit b453aa6c8f - when productionmode is true and
local_header_top_content is defined, php complains about $sitetop
being undefined.

Change-Id: I85d7c549e3dff8a3a4d01037e45e0d49fc0d36ec
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Remove join_institution call on browserid user creation (bug #1011355)

After the call to create_user, the browserid user creation function
contains a call to join_institution when usersuniquebyusername is on.

It's unnecessary, because create_user should already have added the
user to the institution, and also results in a fatal error, because
$user is a Stdclass object rather than a User.

Change-Id: I94dc1c9c272cd844dd3f018d420c3caa4c7d4f57
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Fixed undefined properties (Bug #1011888)

Fixed undefined properties when submitting more than one page for
assessment in a group.

Change-Id: Id01eaff899a86a8363c6c3916f23e6c51035e886
Signed-off-by: Christopher Tombleson <christopher@catalyst.net.nz>
Change warning/error messages to one div

Adds other error/warning messages to be grouped
- masquerading
- production mode
- site closed
- local customizations

Change-Id: I2be578fdb73357a7a699757eaed0f623b6625f66
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
Add clean URL "User subdomain" option (bug #1006634)

This generates profile urls as subdomains of the site wwwroot.  For
example, http://bob.example.com rather than the default clean profile
URL http://example.com/user/bob

This option will not work without the appropriate rewrite rules,
documented at

https://wiki.mahara.org/index.php/System_Administrator%27s_Guide/Clean_URL_Configuration

Change-Id: I9e1cb479abf3b9535bd15efca7382f8352d6d893
Always use wwwroot to generate the cookie domain (bug #1006634)

When user subdomain urls are enabled, parts of the site are at
subdomains under wwwroot, and we need to ensure that cookies are set
with the main site domain to ensure users stay logged in when they go
to profile pages.

Change-Id: I8c8ac4e01078ff926ade7d28ff8d15566d3391e1
Add a function to get the servername from the request

When a ServerAlias is enabled, it may be useful to get the requested
server name rather than the wwwroot.  Unlike get_full_script_path(),
this function will return the server name from the request in
preference to the wwwroot.

Change-Id: I9c1817d2722489814301ef805092c1036b920415
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Allow login redirect to subdomains (bug #1006634)

When a page at a user subdomain such as http://bob.example.com/my-page
is requested by a logged out user, ensure that the user is redirected
to a login page that works, rather than to http://example.com/my-page.

Because the existing get_full_script_path() function is currently
unused, this function is modified to call get_requested_host_name(),
and then used in the AccessDeniedException for the login form
redirect.

Change-Id: I182adeb1a83363512dfde638f2aad23b1d69bcb4
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Allow html to appear directly after an element in pieforms

In some cases, it's useful to put explanatory text or html after a
pieform element, but before the help button.  A 'posthtml' field is
added to the pieform renderers to achieve this.

This will be useful, for example, when the user is able to edit a
portion of a url, but not the full url.  See commit cf4e2daa15.

Change-Id: I2ea95fdfcd654d2aa80738813013404bc362d29b
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Use subdomain URLs on Settings and Edit view pages (bug #1006634)

When user subdomains are enabled, display the Profile url field on the
Settings page where it belongs: between the scheme part of the url and
the rest of the wwwroot.

On Edit Title & Description for profile pages, ensure the correct form
of the clean url is used by calling the appropriate function instead
of building the url.

Change-Id: Id4924165e7bf803fce46cf877a980d0c235176eb
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Avoid cross-domain ajax requests from user subdomains (bug #1006634)

When cleanurlusersubdomains is on, ajax requests might come from
somewhere other than the wwwroot.  To avoid cross-domain requests,
this patch will set a javascript variable whenever a page is on a
subdomain.  The ajax wrapper function sendjsonrequest rewrites its url
using the variable if necessary.

Change-Id: If8a625268895fe1b239f76d515dbd17debe0035e
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Fix active topics query with multiple forum ids (bug #1014924)

Comma-separated forum ids were insterted to the query inside a single
placeholder variable, causing an "invalid input syntax for integer"
error in postgres.  This causes sitemap generation to fail when a
public group has more than one forum.

Change-Id: I024cb5ef3fd26b22420dda553e9728691dc75135
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
Move strftimenotspecified string to langconfig

Bug #1014962

Change-Id: I74df25603d988436f17ff70fea048cb0eb362697
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
Display plans in alphabetical order (Bug #1011796)

Change-Id: I8fb49f466d70a4852c9552cf073d1c83d476647a
Signed-off-by: Christopher Tombleson <christopher@catalyst.net.nz>
Add submission fields to collection table (bug #786389)

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