[Server-devel] Browsing school server

Martin Langhoff martin.langhoff at gmail.com
Fri Jan 16 12:21:22 EST 2009

On Tue, Jan 13, 2009 at 2:00 AM, David Leeming
<leeming at pipolfastaem.gov.sb> wrote:
> With version 0.4 and 0.5.0 I was able to browse the server html folders,
> i.e. the default for the link on the XO browser to "Local School Server"
> with 0.4 took you to
> /var/www/html
> With version 0.5, the default page is
> /var/www/moodle/web/auth/olpcxs/who.php

That's because it's taking you to Moodle, and you're getting
authenticated there. The actual "default page" is
/var/www/moodle/web/index.php ... which re-directs you to the
authentication facility. Once we have the single-sign-on stuff sorted,
it will be transparent, and you won't see the 'who.php' page.

> With version 0.5-0 I was able to add this link to the who.php page:
> href="/var/www/html/content/index.html"
> and get to the folders of browse-able content as before.

hmm - there is a better place to put the link - that 'who.php' page is
not really the right place...

> With 0.5-1 it does not seem to work; unless I have made some stupid mistake,
> I have reinstalled it twice but it reports on the XO browser:
> Not found: The requested URL /var/www/html/content/index.html was not found
> on this server.

That is very weird. Maybe moodle didn't get installed correctly? Which
0.5.1 candidate did you install?

> I suppose one could create up a "course" on Moodle for each of those folders
> but it's not always the most convenient way to do it.

There is an moodle-based way to do it... it will be easy once Moodle
is better configured, for now it's a bit awkward...

1 - Log in as the 'admin' user to moodle - you will find the password
in /etc/moodle/ . The actions you need to do should be doable by any
account with "course creator" rights but I haven't set this correctly
up yet. So using the 'admin' account is a workaround during the 0.5
series :-/

2 - We are going to put the files under the 'site files' -- that is,
they will be managed just like files belonging to a course, but they
are available to any user because they belong to the "site course", a
magical "course" within moodle. In simple terms, evertything you see
in Moodle's homepage 'belongs to a course'... this special 'site

3 - If you have lots of files, you get the unenviable task of
uploading them all - not fun. If you can use SSH / SCP or put the CD
on the actual school server, you can use the commandline to put them
in /var/lib/moodle/ , in the directory that belongs to the site course
- usually named "1". Again, this is a temporary - and ugly -
workaround. Moodle *can* do WebDAV, which makes life _so_ much

So that's the workflow. Ugly and kludgy.

There is an alternative you can also use - less moodle-centric, and
may be unsupported going forward

1 - create a new directory: /var/www/mylocalcontent , put your files there

2 - add a new apache config file in /etc/httpd/conf.d - in that file,
you need an Alias line, and a <Directory> section. I think it needsto
be something like

   Alias /mylocalcontent /var/www/mylocalcontent
   <Directory /var/www/mylocalcontent>
   order allow,deny
   allow all

3 - Edit the moodle header include to add a link to that content -
look in /var/www/moodle/web/themes/xo/header.html

4 - Optional: enable the apache-based webdav extension, so you can
manage this content via WebDAV. This will require quite a bit of
configuration... but if you add/remove/edit content frequently, can be


 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

More information about the Server-devel mailing list