Make the acebox more static & rename it.

There's no good reason for this to be created in JS, nor for it to
be called editarea.

Change-Id: I7498a7e261479a2b61db8beedfc9d3c2c856dd5d
Fix #1461: Size the Ace box as a constant rather than a %.

This fixes the annoying scroll off the bottom issue by clamping
the acebox to the bottom of the viewport. While there's a slim
chance that this will cause issues for small window sizes, I think
that this is more likely to provide a better experience for more
people.

Change-Id: I9486908dfb2c154b7fb263feb9f762c7e51fc274
Actually remove the "Please select" option onces selected.

While it is a child of the document, it appears that this function
only looks at immeditate children.

Change-Id: I60b49fb336f578dfa4fd6572e347fc4fcef7060f
Have the team's links open in a new window.

This makes it easier to review them as the IDE page stays where it is.

Change-Id: I063de299a5981432746b793c0f563717657f691a
Store the valid value rather than looking it up again.

Minor efficiency, but allows for the value to be tweaked more easily
if needed (which will be the case for image validation shortly).

Change-Id: I4d0b93599d13e91c0b0252ea11bdae6abdb55d60
Remove the hiding of the initial commit from the log.

This was a workaround to hide the fact that the first commit had a
nasty looking user name & email. It didn't even always work..

Now that the initial commits are made using a user specified in the
config file, and which has a suitable default, there's no need to
hide this from users.

Change-Id: I21712e5644733048a65c151c132a172ca05debfb
Add gitExecuteInternal as shellish & a way to ignore it.

This should have been added when I added the function, but wasn't.
Since the callers of this are actually safe (the variables that
appear not to aren't used in a shell), add a mechanism to manually
mark them as safe. Use this marker with extreme caution!

Change-Id: I2e90117cfaaafaa59a4747d5535da02d6bbf135f
Create a general process running helper & use it.

I've been meaning to move the contents of the gitExecute functions
to a more general helper for a while now, and I'm planning to use
the new function to replace a number of the shell_exec calls that
are causing stderr dumping to the webserver log (#1445).

No expected functional changes.

Change-Id: I3d10029b7f45fe1b976c963be098b209cef897fc
Optimise call to 'find' by using options rather than grep.

Change-Id: I93be4e4f853bf78b25f6b1efe199a5df7c556801
Don't require a safe marker on 1st arg of gitExecute(Internal)?

This first argument is a path, which if escaped using escapeshellarg
or similar doesn't work properly. It's therefore rather annoying to
tell developers that they need to mark this path safe, given that
if they actually do so the code will break. I feel that this works
better than using the safe marker I introduced, as it will still
pick up on issues in the command.

Change-Id: Idbf8529bc7963fe6ea297f45cc59254d431daea0
Fix #1445: Use gitExecuteInternal over most git shell_execs.

This is preferable as we get the full advantage of a logged and
wrapped call to the underlying process, with the potential to better
handle any errors. It also means that any output to stderr gets
caught, rather than dumped to the http log.

No expected behaviour changes.

Change-Id: Ib4c744f1d1ed036bbe8590f538df9eb4e3ac1fb9
Fix #1461: Make layout of the ACE box dynamic.

This improves upon the previous static absolute sizing by adding a
listener for the window resize that adjusts the position of the top
of the ace box, taking into account the location of the previous
element. This provides a solution that is (almost) guarranteed to
show the right thing. Also call said function whenever the page is
shown so that we're sure to be correct, even if the page resize
occured while we weren't shown.

Change-Id: I5165ccf2f3262e98bd23bb21634562c602af8ee2
Fix #1461: Get the previous element by id.

This works better in more browsers, particularly IE.

Change-Id: Ie838ad1a5edd510316123d23fd01701f783c8132
Fix #1427: Make the displayed team names use team-status.

The values in LDAP haven't been relevant for quite a while, and this
is now the canonical way to do this. For the moment, the rendering
still always includes the team's TLA, but this can be removed once
ticket #1426 is resolved.

Change-Id: I1fad5ef9820139bb2800aaecf198cbb8da0f6e05
Fix #1429: Reduce the data returned during LDAP groups lookup.

This attempts to resolve the issues where not all the desired
information was being returned by reducing the amount required.
This is done in two ways - firstly by filtering the groups in LDAP,
rather than entirely in PHP, and secondly by only getting back the
cn, since this is all that's now needed.

Change-Id: I754a131c1b09d0f7dc76045ab4ea0938a625a17d
Merge changes Ib4c744f1,Idbf8529b,I93be4e4f,I3d10029b,I2e90117c,I21712e56

* changes:
  Fix #1445: Use gitExecuteInternal over most git shell_execs.
  Don't require a safe marker on 1st arg of gitExecute(Internal)?
  Optimise call to 'find' by using options rather than grep.
  Create a general process running helper & use it.
  Add gitExecuteInternal as shellish & a way to ignore it.
  Remove the hiding of the initial commit from the log.
Fix #1459: Ensure project polling always uses the right team.

It turns out that previously the project polling was using a constant
team value, which was set shortly after the user logged in. For the
teams, this worked fine, as they only had one team. For mentors,
this had the potential for weird bugs, such as this one, as we're
often in more than one team, and switch between them quite a bit.

Change-Id: I5a73e7b84e9a4182fc327fd2ab21009e652954cb
Merge changes Ie838ad1a,I5165ccf2,I9486908d,I7498a7e2

* changes:
  Fix #1461: Get the previous element by id.
  Fix #1461: Make layout of the ACE box dynamic.
  Fix #1461: Size the Ace box as a constant rather than a %.
  Make the acebox more static & rename it.
Merge changes I4d0b9359,I063de299,I60b49fb3

* changes:
  Store the valid value rather than looking it up again.
  Have the team's links open in a new window.
  Actually remove the "Please select" option onces selected.
Hide an error from PHP about a missing field.

This is a perfectly acceptable thing to happen here, and the function
being called handles it already. This commit just shuts PHP up.

Change-Id: Ia9e243a18d8a4453dae5621942dceede42756ef4