OU blog

Personal Blogs

Christopher Douce

Understanding Moodle Themes

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 21 July 2010, 18:27

A section of a Moodle screen showing three icons: forums, lessons and resources

This post is about the journey that I followed trying to understand Moodle Themes.  Moodle Themes are pieces of programming magic that change the visual appearance of your Moodle installation.

If you download Moodle and play around with it, you might eventually arrive at a decision that it might be useful within your institution.  You might hold a meeting with senior management where you may say, 'I think it's a good idea if we try to use this thing call Moodle to host some of our courses'.  After answering some difficult questions about maintenance and development costs, your managers might say, 'okay, you've convinced us... let's give it a go, I'll give you a budget'

Other than figuring out which operating system and database to use and where (and how) your instance of Moodle is to be hosted, one of the first development activities you will have to do is make sure that your Moodle system is 'on brand', i.e. it's visual appearance should reflect the institution that you work for.

This is pretty much what I have to do.  I have to try and make my 'vanilla' (unmodified) version of Moodle blend in with a set of existing web pages that have been built as a part of a research project I'm working on.  Other development teams within my university have already done something similar with their production version of Moodle, but I need to tackle this problem myself.

I start with a couple of questions: what makes up a theme and how might you go about changing one or maybe even making a new one?

Resources galore

Before I can answer these questions I needed to find something to read, and it didn't take a lot of browsing to find a number of potentially useful resources.

The first page that I discovered was a link to over one hundred different themes thanks to the Database of Moodle Themes.  Perhaps I shouldn't be so surprised given the number of Moodle installations that are out there in the world.

I soon discovered the Themes documentation pages and a number of other related links, including a set of themes related FAQs and dedicated discussion forum.

The Themes documentation link (for a Themes novice) seems to be the most useful.  One of the sections says that themes can be delivered in zip files.  You download them, unzip them and place the contents in the /moodle/theme directory, and then click on some admin tools to activate it.  This sounds almost too easy!

Towards Code

Being someone who likes to view code I thought it might be useful to look at some of the magic that makes Moodle themes work.  To do this, I chose a random theme from the themes database and unzipped a folder to my desktop.  To begin to make sense of it properly, I felt that it might be a good idea to compare this random theme against one that already existed.  This made me answer, 'which theme is used by default?'

To answer this question, I logged onto my local instance of Moodle (which was running on my local machine, localhost) as an administrator.  After struggling to remember my username and password, I clicked on the Administration link, followed Appearance, Themes and then on the Theme Selector link (because I couldn't really make sense of the Theme Settings options).

I quite like the Theme Selector page.  It presents all the different themes that have been installed.  The current theme that is selected is highlighted by a black square.  The one that was selected by default (in the case of my installation - I cannot remember whether I changed it) was named standardwhite.

I delve into the Moodle code area, take a copy of standardwhite and placed it alongside the one I have randomly downloaded and started poking around.

Looking at code

I noticed similarities and differences.  The similarities are that some of the filenames are the same.  I see two PHP files, styles and config, followed by two html files, header and footer.  There seems to be a CSS file (Wikipedia) in both themes (but the downloaded theme contains a few more than the default theme).  I also notice a graphics file called gradient in the default theme (which is a jpg), and a png graphics file in the other one.  A big difference lies was that the theme I have downloaded contains a directory which seems to contain a bunch of graphic files.

Before deciding I'm terribly confused, I decide to do one more thing: open up both of the PHP files to see what they contain.

In a config script, I see assignments to a variable called $THEME.  Different attributes appear to do different kinds of magic.  Looking in the styles script, a comment tells me that 'there should be no need to modify this file'.  It seems to do something that relates to the presentation of a CSS file.  That is good enough for me!

I have a quick peek into the header and the footer html files.  It looks like these are templates (of some kind) that are filled out using the contents of some PHP variables.  Obviously the pages that the Moodle code creates have a pretty well defined structure, and presumably this structure is documented somewhere.  This is perhaps something I might need to remember later.

Return to the documentation

At this point, I roughly (think) I know what a Theme comprises: some magic scripts which define some variables (and some other stuff), some header and footer scripts which look at bit like templates, a CSS file of some kind, perhaps a graphic (which could be used by the CSS file?) and maybe a bunch of graphics that replace those that are used in Moodle by default.

If this is my current understanding, can I now find the documentation easier to understand?

I soon uncover two further pages: Make your own Theme and Creating a Custom Theme (the first link seems to be easier to understand).  A couple of clicks takes me to a documentation page called Theme config file which goes some way to explaining the variables that I have touched upon above.

The final comment in the Creating a Custom Theme page was instructive.  Other than saying that you can't change everything, if you want to make your site look like an existing site, it might be a good idea to make use of a tool called Firebug which is a plug in for your Firefox browser.

With Firebug, you can browse to a web page of your choice and uncover what CSS definitions have been used to build its visual appearance.  I've used Firebug before, and mentioning that it is a good tool is certainly a good piece of advice.  The Moodle developers have also been kind enough to prepare a CSS FAQ which is certainly worth a look.

Although I could have tried to create a new theme from scratch, I'm in a lucky position since one of my colleagues has already created a customised theme for a custom instance of Moodle.

Towards testing things out

To test things out, I copy of my customised theme into my local 'themes' directory and hit refresh on my browser.  I then select my newly installed theme and everything starts to go wrong.  The action of selecting a theme seemed to have rendered my local copy of Moodle useless since only a tiny fraction of a HTML page is created (which I see by viewing the code the browser receives).

A problem seems to have been created since the version of Moodle that I am using and the structure of the theme that I have transferred are not completely compatible with each other.  I need to go back to my default theme! But how do I do this? Where are the theme settings held?

My first guess is in the database.  I open up a front end to the MySQL database that is running on my PC, using a tool called SqlYog.  I eyeball the contents of the database to see if there's anything I can use.  I discover a 'config' table, but this doesn't tell me much.  I did, however, discover that there is a theme setting within individual courses as well as individual users.

I turn my attention towards the code by first looking at the code within the themes directory and I soon find myself fruitlessly searching through different libraries.  Finding a simple answer may necessitate spending quite a bit of time.

To get things working again, you sometimes have to cheat.  I renamed my theme to something totally different and refreshed my Moodle page.  Moodle then had no choice but to return to its default setting (which was, again, 'standardwhite').

Incrementally merging

I have two themes: one theme that I want to use but doesn't work (because it has been modified for a customised version of Moodle), and another theme that does work which I don't want to use.  When I'm faced with this situation, I try to get 'code to speak to me' by incrementally taking the one that works and making it look like the one that doesn't work.  I find I can really understand stuff when things stop working!

I begin by looking at the files and then the contents of the files.  The first thing that strikes me is that the header and footer files are quite different.  There seems to be quite a bit more happening in the customised theme when compared to the standard theme.  A step at a time I move files across and test, beginning with the favicon, then the config file, and finally the pix's.  I discover that both themes require the use of a CSS file that is contained within the standard theme directory.

The effect of moving files around seems to produce, more or less, what I was after.  The interactive 'side blocks' (particularly the show/hide buttons) are not presented as they should, but further searching reveals a magic variable, allowuserblockhiding that can be used to control this functionality.

Moodle version 2

A question to complete this post is: what is the situation regarding Moodle version 2.0?  This is a development that I have heard about for some time, but I have not heard recent any announcements regaring its expected release.  After a quick search, I reacquaint myself with something called the Moodle Roadmap.

This appears to state that there will be a beta release of V2 by the end of 2009, followed by some months of testing before a final release.  Judging by the planning document, there appears to be quite a lot more coding to do (nearly four hundred days of development time to go, so we should expect some delays).

I appreciate that giving opinion is certainly a lot easier than giving code, so I hope that Moodlers who read this section will forgive me.  I personally hope that the code for the next version is a lot cleaner.  Since the developers are forced to move to PHP version 5, I hope they will choose to adopt its object-oriented features which can help developers to form clearer (less leaky) abstractions.

In a perfect world, developers should be able to look at a screenful of code and be able to describe, more or less, what that section of code does without having to look at other code (providing, of course, they more or less have an understanding of what the product does).  From what I have seen so far in version 1.9, there is a long way to go to, but I'm certainly looking forward to learning how things have moved on in version 2.0.

Wrap-up

It's great that the developers of Moodle have designed it in such a way that it is 'themeable' (if there is such a word).  In some respects, I was surprised to discover things were not as difficult as I had expected.  Whilst, in some ways, going directly to the code and looking what is there may be a daunting challenge, it is one that I certainly recommend doing.

There's a whole lot more to the issue of Moodle themes.  I haven't touched upon the structure of Moodle pages and how they relate to elements in stylesheets, for example.  I'll leave this challenge for another day!

Permalink
Share post
Christopher Douce

Considering Middleware and Service Oriented Architecture

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 21 July 2010, 18:25

4815941514_0b0c87dda6_m.jpg

I wrote the following notes some time ago as a way to share information about the subject of middleware and service-oriented architecture.  I think I began by asking the questions 'what is middleware?' and 'what can it do for us?', explicitly in the context of making information systems that can help to support the delivery of useful services to support learning.

I should add a disclaimer: some of the stuff that is presented here is quite technical and seems quite a long way away from my earlier posts that relate to accessibility, but there are connections in terms of understanding how to build information systems that can help an organisation to manage the delivery of accessibility services (such as the loan of assistive technology).

Beginning my search

I began by exploring a number of definitions.  I first attacked the notion of workflow (Wikipedia).  What does workflow mean?  Is it one of those terms that can have different meanings to different people?  I rather like the Wikipedia definition, which goes:

  • A workflow is a reliably repeatable pattern of activity enabled by a systematic organization of resources, defined roles and mass, energy and information flows, into a work process that can be documented and learned. Workflows are always designed to achieve processing intents of some sort, such as physical transformation, service provision, or information processing.

I then asked myself, 'how does the idea of workflow relate to the notion of middleware?' (I had heard they were connected, but wasn't quite sure how).  Again, the Wikipedia definition of middleware proved to be useful:

  • Middleware is the software that sits 'in the middle' between applications ... stretched across multiple systems or applications. ... The software consists of a set of enabling services that allow multiple processes running on one or more machines to interact across a network. This technology evolved to provide for interoperability in support of the move to client/server architecture. It is used most often to support complex, distributed applications. ... Middleware is especially integral to modern information technology based on XML, SOAP, Web services, and service-oriented architecture.

So, these two ideas are connected.  Carrying out workflow may involve making use of a number of different services, which might be able to call through some sort of middleware...

Further links

A little more digging pointed me to a number of other directions.  Clever people have proposed something called BPEL, an abbreviation for Business Processing Execution Language.  Wikipedia is again useful:

  • WS-BPEL (or BPEL for short) is a language for specifying business process behavior based on Web Services. Processes in WS-BPEL export and import functionality by using Web Service interfaces exclusively.

On this page, there is a link to a blog post which is a very good primer and introduction.  It is lots more clearer than the Wikipedia page.

I found the following text to be useful:

  • In BPEL, a business process is a large-grained stateful service, which executes steps to complete a business goal. That goal can be the completion of a business transaction, or fulfilling the job of a service. The steps in the BPEL process execute activities (represented by BPEL language elements) to accomplish work. Those activities are centered on invoking partner services to perform tasks (their job) and return results back to the process.

Interestingly, it also contained the following:

  • As for limitations, BPEL does not account for humans in a process, so BPEL doesn't provide workflow-there are no concepts for roles, tasks and inboxes.

We are almost at the point where the same terms may be used to mean different things.  Perhaps there is a difference between what workflow is and what business processes are?  Michelson (the blog author) seems to equate workflow with 'things that people do'.  The point is that a wide definition of workflow can include things that BPEL does not.

At this point, I was wondering, 'if I have a process (say, a task that I have to complete), where half of the task has to be completed by a machine and the other half has to be completed by a person, then what technologies should I use?'.  All is not lost.  The blog mentions there is something called  BPEL4People (Wikipedia), and contains a link to an IBM whitepaper.

I've extracted some fragments that caught my eye:

  • The BPEL specification focuses on business processes ... But the spectrum of activities that make up general purpose business processes is much broader. People often participate in the execution of business processes ...

Following this, I stumbled across the following scenario:

  • Consider a service that takes place out-of-sight of the initiating process. In many circumstances, it may be immaterial as to whether the service is performed with or without user interaction, for example, a document translation service.

This made me wonder about my own involvement in the EU4ALL project, which is exploring processes that enable lecturers to order alternatives formats, such as tactile maps or other kinds of materials, for instance.

Application Servers

BPEL is represented using something called XML (Wikipedia), which is, of course (more or less) a text file that has lots of structure (created by the enthusiastic use of angled brackets).

BPEL is not the only way to represent or describe business processes (or workflow).  Another approach might be to use something called State Chart XML (SCXML), for instance.   There are probably loads more other data structures or standards you might use.

At this point, you might be asking, "okay, so there are these magic XML data structures that allow you to describe entire processes but how do you make this stuff real so people can use it?".  The answer is use something called an Application Server (Wikipedia).

Here, I am again lazy and quote from Wikipedia:

  • Application server products typically bundle middleware to enable applications to intercommunicate with dependent applications, like web servers, database management systems ...

Although an application server may be able to run middleware (and potentially sequence the order in which activities are carried out), we need to add interfaces so people can interact with it.

Always being the pragmatist, I asked myself another question, 'all this sounds like good fun, but where can I find one of these application servers that does all this magic stuff to manage our workflow and processes?'  I don't have a precise answer to this question, but I did find something called Apache ODE.

To quote from the project website,

  • Apache ODE (Orchestration Director Engine) executes business processes written following the WS-BPEL standard. It talks to web services, sending and receiving messages, handling data manipulation and error recovery as described by your process definition. It supports both long and short living process executions to orchestrate all the services that are part of your application.

Another distinction (as opposed to long and short running processes) include processes that require human intervention (or actions) and those that can run on their own, such as executing a database query or sending messages to another part of a large organisation to request the availability of resources.

All this sounds great!  All I have to do now is to find some time to study this stuff further.

Other approaches

Whilst reading all this stuff, the purpose of other products that never made sense to me started to become clear.  A couple of years ago, I had heard something called Biztalk mentioned, but never properly understood what it was.  Again, Wikipedia is useful, describing Biztalk (Wikipedia) as

  • a business process management (BPM) server. Through the use of "adapters" which are tailored to communicate with different software systems used in a large enterprise, it enables companies to automate and integrate business processes.

I've not looked into this very deeply, but it also seems that the House of Microsoft might have concocted something of their own called the Windows Workflow Foundation (Wikipedia) which I understand also connects to the topic of BPEL.

Of course, there's a whole other set of terms and ideas that I haven't even looked at.  These include technologies and ideas such as an enterprise service bus (ESB), message queues, message-oriented middleware (MOM), the list goes on and on...

A summary (of sorts)

The issue of service-oriented architecture design goes a lot deeper than simply creating a set of solitary web services running on different systems.  Designers need to consider how to ensure that messages are received successfully, how to consider or address redundancy and how to measure or ensure performance.  The ultimate choice of architectural components and elements depend very much on your requirements, the boundaries of your organisation, your needs for communication and who you need to communicate with.

What I found surprising was the number of technologies that could be potentially used within the project that I'm currently working on.  The ultimately choice of technologies are likely to boil down to the key issue of: 'what do we know about right now', and 'what is the best thing we can do'.

Footnote

I was going to add a footnote to one of the earlier sections, but because my notes have turned into a blog post, I've decided to put it here.

I like this stuff because it reminds me of two areas that always fight with each other: software maintenance and business process re-engineering.  Business practices can change more quickly than software systems.  The need for process flexibility (and abstraction) is one motivation that has driven the development of things like SOA and BPEL.

This stuff is also interesting because workflow is where the world of 'work' and the world of software nearly combine.  There is another dimension: would you like a computer telling you what to do?  Also, no matter how much we try to be comprehensive in our understanding of a particular institution there will always be exceptions.  Any resulting architecture should ideally try to accommodate change efficiently.

Middleware (in some senses) can have a role to play in terms of gathering information about the performance of services, i.e. how long it takes for certain actions to a certain kind of request, and has the potential toe manage the delivery of interventions (such as issue escalation to supervisors) should service quality be at risk.

Acknowledgements

Blog image is a modified version of the one found on the Wikipedia SOA page.  I also cheekily consulted an O'Reilly book when I was preparing an earlier version of these notes, but I've long since returned it to the library (and I can't remember its title).

Permalink
Share post
Christopher Douce

Second International Education for All Conference

Visible to anyone in the world
Edited by Christopher Douce, Thursday, 21 Nov 2019, 11:24

This blog post represents a review of the second International Education for All conference that I was lucky enough to attend in September 09.  I originally intended to post a review earlier, but mitigating circumstances (which I hope will become clear at the end) prevented this.

Like the first conference, held in '07, this conference was also hosted at the University of Warsaw.  The '07 conference represented a finale of an EU project, a collaboration between universities and other organisations from Germany, Poland, Estonia, Croatia and others (please forgive my poor memory!), but this one was slightly different.

Below I attempt to present a brief summary of some of the sessions that I attended.  There were three parallel sessions, so I had to choose carefully.  This is then followed by what I took away in terms of the themes of the conference.

Opening Keynote

The opening keynote was by Dianne Ryndak from the University of Florida.  Dianne explored the topic of inclusion, particularly the differences between generalised and specialised education.  Dianne explained how personalised support and learning activities could be provided as a part of general learning activities.

She went on to present a powerful description of two students: one who was educated within a segregated school, the other who was educated, with the provision of additional support, through a main stream (or general education) school.  I remember her saying that 'education is a service that goes to the student, not a place where the student goes' and that education should be 'only as special as necessary'.

Although Dianne's presentation primarily related to high school education the themes she highlighted can be directly brought to bear on higher education too.  Technology can be used as a way to help with the inclusion of people with disabilities main stream education.  This said, teachers have a more important role where they need to be viewed as collaborators as well as educators.

Three dimensional solid science models for tactile teaching materials

I sometimes like to visit museums.  One of the things that frustrate me is the sight of signs that say 'please do not touch!'  This strikes me as particularly unfair when I discover sculptures in art galleries.  Given that sculptors use their haptic sense when creating an object, it seems unfair to deny visitors the possibility of using this same modality.

Yoshinori Teshima, from the Digital Manufacturing Research Centre in Japan, gave an inspiring presentation where he showed a number of different models, ranging from abstract objects (such as polyhedra) through to hugely magnified representations of microscopic creatures that can only be seen under a microscope (imagine a microscoping monster the size of your fist!)

Yoshinori briefly spoke about the manufacturing methods, which included stereolithography and 3D printing using either plaster on nylon powder.  His relief emphasised models of the earth and mars were fabulous.

It struck me that his models could be used by all students, regardless of visual abilities.  It also struck me that the ultimate use of such models within the classroom depends ultimately upon the skills and the expertise of the teacher.

Talking Tactile Tablet

I have heard about tactile tablets before.  This presentation demonstrated a product that was also included within the assistive technology exhibition that was also hosted at the conference.

I came away with two points from this presentation.  Firstly, referring to three dimensional objects using two dimensional symbols is a skill that I take for granted.  Secondly, it is now possible for educators to author their own tactile materials.  We were shown how it was possible to create a small family tree.  Audio materials were recorded using Audacity (Wikipedia), which were then associated to positions on a tablet.  Corresponding tactile representations could be produced using embossers.

Opening Linux for the Visually Impaired

This presentation primarily focused upon a screen reader called Sue (Screenreader Usability Extensions) that was developed by the Study Centre for the Visually Impaired Students (SZS) based at the University of Karlsruhe, Germany.  This presentation reminded me a little of a presentation of the Orca screen reader, made at the Aegis project dissemination event that I wrote about a couple of months ago.

One of the interesting things about Sue was that it could be connected to both a refreshable braille display (Wikipedia) (visiting this page was interesting, since it mentioned a new type of refreshable display called a rotating-wheel display) and a screen magnifier at the same time.

Although Sue could be considered to be 'yet another screen reader', having multiple versions of similar products is undeniably, in my view, a good thing.  Competition between individual products, whether it is in terms of popularity or functionality can help their development and enhancement.

Distance Education and Training Programme on Accessible Web Design

I was drawn to this presentation due to involvement in the Open University Accessible online Learning and Fundamentals of Interaction Design courses.  I was not to be disappointed.  There were some strong echoes with these current courses, but I should say the curriculum is perhaps complementary.

The course was developed as a part of a European project called Accweb with the intention of creating distance learning materials that could address a need for a professional qualification or a certificate in accessible web design. The materials comprised of eighteen units which could be delivered through the ATutor VLE, amounting to the equivalent of 60 points of study.

Key elements of the curriculum included:

  • Fundamentals of web accessibility
  • Guidelines and legal requirements
  • Assistive technologies
  • Accessible content creation (which included issue such as methodology, evaluation, rich internet application and authoring tools)
  • Design and usability (themes from human-computer interaction)
  • Project development

The materials do not seem to be available through this site at the moment, but I hope they will be available in time.

Helping children to play using robots: IROMEC project experience

This presentation, by Francesca Caprino, outlined the IROMEC project, which is an abbreviation of Interactive Robotic Social Mediators as Companions and a sister project called the adapted robot project.  Francesca began by describing play: what it is, what it can do and considered the effect of play deprivation on the development of children.  Robots, it was argued, can help children with physical disabilities and other impairments participate in play activities.

The robots that were described were essentially toy robots that were modified to allow them to be controlled in different ways.  Future research objectives included uncovering of new play scenarios, considering how to adapt or modify other robots and assessing the educative and therapeutic outcomes of robot assisted  play interventions and developing associated guidelines.

Studying Sciences as a Blind Person: Challenges to AT/IT

Joachim Klaus introduced us to the Centre for the Visually Impaired Students, which seemed to have similarities to the Open University Office for Students with Disabilities (more information is available through the services for disabled students portal).

After presenting an overview of the centre, Joachim presented the ICC: International Camp on Computers and Communication.  The ICC 'tries to make young blind and visually impaired students aware what technology can do for them, which computer skills they have to have, where they should put efforts to enhance their technical skills, the level of mobility as well as their social skills'.  Using and learning to use assistive technologies can be difficult.  This international camp, which is held in different countries, can help people become more skilled at using assistive technologies, thus removing substantial barriers to access.

Improving the accessibility of virtual learning environments using the EU4ALL framework

During the conference, I gave a short talk about the EU4ALL project I am working on.  The presentation focussed on an architecture that the project has been creating and how it can improve the accessibility of services that are delivered to students.  The architecture takes into consideration a number of different stakeholders, each of which has a responsibility in helping to deliver accessibility.  My slides are available on-line through the Open University Knowledge Network (presentation information).

At the same time as my presentation, my colleague Elisabeth Unterfrauner from the Centre for Social Innovation, Technology and Knowledge, Vienna, was presenting her research, the socio-economic situation of students with disabilities, also carried out within the EU4ALL project.

Fostering accessibility through Design4All education in mainstream education

Continuing the theme of EU projects, Andrea Petz gave an interesting presentation about universal design, or Design4All.  Andrea has been involved with EDeAN, and abbreviation for the European Design for All e-Accessibility Network.  EDeAN has studied how D4ALL is covered or treated in different universities across Europe and has helped to guide the development of a masters programme.

Andrea began her presentation by saying that D4ALL is not design for the average, but for the widest possible group of users and went on to talk about the principles of universal design (Wikipedia):

  1. Equitable use
  2. Flexibility in use
  3. Accessible information
  4. Tolerance for errors
  5. Simple and intuitive
  6. Low physical effort
  7. Size and space for approach and use

Andrea pointed us towards a conference called the International Conference on Computers Helping People with Special Needs (IICHP).

Inclusive science strategies

Greg Stefanich added two more to Andrea's list of principles, namely:

  1. Build a community of learners
  2. Create a positive instructional climate, i.e. one that is welcoming.

Greg also connected his talk to the theme of inclusive education by saying 'a person in a regular class room setting will have better relationships with the general public, family and be employed' and emphasised the view that inclusion of all students will have no real consequence on other students.  An important point is to spend time to get to know the needs of individuals so they can be effectively supported.

Foreign language courses for students with hearing impairments

Ewa Domagała-Zyśk talked about her experience of teaching English to hearing impaired students.  Her presentation made me reflect on my own experience of using the virtual world SecondLife (although Ewa's presentation was mostly about why teaching foreign languages is a good thing and what some of the challenges might be).

Quite some time ago, I was adventurous enough to visit a couple of 'Polish speaking' virtual bars where I tried to interact, using text, with some of the 'regulars' and found myself totally lost.  This experience showed me that this was an interesting and predominately unthreatening way to help to learn (and understand) written language. It did make me wonder whether virtual worlds (in combination with real-word assistance, of course), might be an interesting way to expose people to new languages.  The issue of whether such environments promote the creation of new dialects is, of course, a whole other issue.

Educational practices towards increasing awareness among academic teachers

Dagmara Nowak-Adamczyk (or one of her colleagues) spoke about the DARE project, a disability awareness project.  The project website states, 'The long-term objective of the project and the DARE Consortium is raising public awareness of disability and the way people with disabilities function in modern (knowledge-based) society'.  The project has produced some training materials which are currently being evaluated.

Access for science students with disabilities in an open distance learning institution in South Africa

I was particularly looking forward to this presentation since its title contained particularly interesting themes.  Eleanore Johannes, from the University of South Africa, spoke about different models of disability, introduced us to the Advocacy and Resource Centre for Students with Disabilities (ARCSWiD) office and spoke of some of the challenges that students face: funding, electricity, inaccessibility web pages and training.  She also described a qualitative research project that is exploring the experiences of science students with disabilities that is taking place over a period of three years.

No contradiction : Design4All and assistive technologies

Michaela Freudenfeld introduced the INCOBS web portal that provides information about assistive technologies that are available in Germany.  The INCOBS portal has the objective of carrying out market surveys of products and services, testing of assistive devices and workplace technologies, evaluating the accessibility of software applications and offer seminars for facilitators and advisors.

Understanding educational needs of students with psychiatric disabilities

Enid Weiner, from the Counselling and Disability Services, York University, Canada, gave an impressive hour long talk on the theme of mental health difficulties.  The subtitle of her presentation was 'making the invisible more visible'.

Enid spoke about a number of interesting related themes, such as different illnesses, the effect of medication and that some illnesses can have an episodic nature, which may cause the place of learning to be slower or take place over an extended period.  Accommodations are to be made on a case by case basis.

Enid emphasised the importance of a 'community of support' and said how important it is for educational providers not to 'get hung up' on an individual diagnosis and instead focus on individual accommodations i.e. what learners need to study.

Environmental influences on participation with disabilities: a Sri Lankan perspective

This was an interesting presentation since it presented a different perspective.  Samanmali Kularatne outlined the situation in Sri Lanka and then described a study that is aiming to explore the experiences of children with disabilities in mainstream schools.

The study adopts a qualitative approach.  Interviews are carried out in class rooms, which are then transcribed and subjected to thematic analysis.  The participants include children, teachers, parents and non-participative observers.  Themes identified included: attitudes, values and beliefs, support and relationships, products and technology, natural and built environment.

The conclusion was that inclusion is not really a reality and that there is a lack of resources.  The actions resulting from the study includes further communication with educational authorities, an awareness programme for parents and launching a project to try to initiate more inclusion.

How AT can help with learning maths for people who are print disabled

The presentation and manipulation of mathematical notation is a perennial problem.  When some mathematical expressions are translated into spoken language ambiguities can easily arise.  One proposed solution is to make use of the LaTeX (Wikipedia) language.

The challenge is not just technical.  Acceptance of technology relates to the willingness of learners to accept technological solutions and effectiveness of teachers to communicate their potential benefits.  It also relies upon educators having both the time and wiliness to understand different tools.

Considering different definitions of disability

Paweł Wdówik from the University of Warsaw Office for Persons with Disabilities spoke about the different definitions of disability and the differences that exist between primary and secondary education.  Paweł highlighted that through the medical model, if you don't have a medical model, then a disability is not likely to exist.  As a result, people who do have disabilities are likely to slip through the system.  Paweł emphasised that the views of the individual should always be fundamental.

Working towards inclusive education in Europe

Andrea Watkings from the European Agency for Development in Special Needs Education spoke about the different agency projects and mentioned the UNESCO Salamanca statement and asked the question, 'how do we change our systems so they are inclusive from the beginning?' and made the point that inclusion needs to take account of all peoples and groups.  Amanda emphasised that inclusion is a process, not a state.

Closing Keynote

The final presentation of the conference was made by Yvonne Bonner, Reggio Emilia, Italy.  Yvonne presented a range of very thought provoking images.  She asked the question, 'why work in this area?'  She answered philosophically (and, of course, I paraphrase) that by working in this area  you are considering (and hopefully challenging others to enhance) the rights of all people.  It was a great way to close the conference.

Conference themes

One of the ways that this conference differed from the previous event was that there were more distinct themes.  Whereas the previous event focused quite a lot on an EU project that had just concluded, this conference I felt was slightly more wide ranging (but this could be cause I was more attuned to what to look out for).

One of the more prominent theme were debates surrounding inclusion or exclusion, or more specifically, how to help ensure that people with additional needs could be effectively brought into mainstream education.  This theme was clearly articulated within the opening and closing keynote speeches.  There are differences between countries (and the models of disability that are applied).  Sharing understanding of definitions was certainly a subject that was considered to be important.

Another theme was the need to listen to the individual.  I recall two projects that are aiming to learn more about the experience of individuals.

Quite a few of the presentations related to on-going projects and programmes.  Ideally I would have liked to go away with a more fuller set of conference proceedings to help me remember what was said and recall the arguments that were presented.  Hopefully, as the conference series proceeds, this may be something that the organisers may consider, but hopefully without detracting from an underlying sense that delegates are happy to discuss, share and learn from each others practice.

Addendum

After the conference ended I had some free time.  It was suggested that a fun thing to do would be to go hiking in the Tatra mountains.  I had been told a lot about a town called Zakopane and how it once exerted a strong draw for artists and Bohemians, and how a special cheese was likely to be sold everywhere in the town.  I was not to be disappointed.  As well as having extraordinary mountains and restaurants, tourists walking down the main street would stumble across cheese purveyors (Wikipedia) very thirty or so metres.

My choice of words is no accident, but instead I was embroiled in one.  Rather than literally stumbling across cheese sellers, I literally stumbled down the side of a mountain and broke my arm (although I should add that the stumble was a relatively modest one of about forty or so centimetres).  Visiting the accident and emergency ward was an experience, where a sharp witted paramedic, upon hearing that I was from the UK asked, 'were you walking on the wrong side of the path?'  There were more jokes, but their charm has long since worn away!

The upshot of the accident was that I found myself temporarily disabled, my dominant arm immobilised in plaster.  It all came as a bit of a shock.  Simple tasks suddenly became trials of patience and took considerable longer, if I could figure out how do them at all.  Shoe laces became a liability and shirt buttons became almost impossible.  I had to go about cancelling events and activities that were scheduled for the time after I was to return to the UK.

Upon return to the UK, my motivation levels nose dived. I quickly recalled the universal design principles when doors became difficult to open and jars and cans a frustrating challenge. I also had entered the UK health system, but I had no real sense of who I should ask about information about things.  Whilst monolithic institutions are there to help, individuals are necessary to provide support and peace of mind.

Despite my frustrations, I still had an overwhelming desire to do stuff.  Although I wasn't able to attend a weekend meeting I was scheduled to attend, one of my colleagues from the University of Leeds helped me to participate.  Using Skype text chat, it was possible to take part in a short group discussion activity which helped to lift my mood.  This showed me what a positive impact technology can by providing effective alternative ways of communication.  It also distinctly underlined on of the conference themes: the importance (and power) of inclusion.

I think I'm on the mend now, but I understand it's going to take some time.  All in all, the trip (both to the conference, and over a part of mountain) was an interesting experience.  I've certainly learnt a few things.

Permalink
Share post
Christopher Douce

Inclusive Digital Economy Network event

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 28 June 2023, 10:28

I recently attended an event that was hosted by the Inclusive Digital Economy Network.  The network, led by the University of Dundee, comprises of a variety of groups who wish to collectively ensure that people are able to take advantage of digital technologies.

The event was led by Prof Alan Newell from Dundee.  Alan gracefully introduced a number of keynote speakers; the vice-chancellor from City University, the dean of Arts and Social Sciences and representatives from the government and the funding body: the EPSRC.

Drama

One really interesting part of the day was the use of 'theatre' to clearly illustrate the difficulties that some people can have when using information technology.  I had heard about the use of drama when I have spoken to people from Dundee before but this was the first time I was able to witness it.  In fact, I soon found out that I was going to witness a film premiere!

After the final credits had appeared, I was surprised to discover that two of the actors who played central roles in the film were in the audience.  The film was not the end of the ‘theatre’ event, it was the beginning.  The actors carried out an improvisation (using questions from the audience) that was based upon the roles we had been introduce to through the film.

The notion of drama and computing initially seemed to me to be a challenging combination, but any scepticism that had very quickly dissipated once the connections between the two areas became plainly apparently.  Drama and theatre relies on characters.  Computer systems and technologies are ultimately used by people.  The frustrations that people encounter when they are using computer systems manifest themselves in personal (and collective) dramas that might be as small as uttering the occasional expletive when your machine doesn't do what it supposed to do, to calling up a call centre to harass an equally confused call centre operative.

The lessons of the 'computing' or 'user' theatre were clear to see: the users should be placed centre stage when we think about the design of information systems.  They may understand things in ways that designers of systems may not have imagined.  A design metaphor that might make complete sense to an architect may seem to be completely nonsensical to an end user who has a totally different outlook and background.  Interaction design tools such as creating end user personas are powerful tools that can expose differences and help to create more usable systems.

Debates

I remember a couple of important (and interesting) themes from the day.  One theme (that was apparent to me) was occasional debate about the necessity to ensure that users are involved with the design of systems from the outset to ensure that any resulting products and systems are inclusive (user led design).  This connected to a call to 'keep the geeks from designing things'.  In my view, users must be involved with the creation of interactive systems, but the 'geeks' must be included too.  The reasons for this being that the geeks may imagine functionality that the users might not be aware exits.  This argument underlines the interdisciplinary nature of interaction design (wikipedia).

Much of the focus of the day was about how technology can support elderly people; how to create technologies and pedagogies that can promote digital inclusion.  Towards the end of the day there was a panel discussion from representatives from Help the Aged, a UK government organisation called the Technology Strategy Board, the BBC, OFCOM and the University of York.

Another them that I remember relates to the cost of both computing and assistive technologies.  There was some discussion about the possibility of integrating internet access within set top boxes (and a couple of comments relating to the Digital Britain report that was recently published by the UK government).  There was also some discussion about the importance of universal design (wikipedia) and tensions with personalised design (which connects to some of the themes underpinning the EU4ALL project).

Another recollection from the event was that some presenters stated that although there is much excellent work happening within the academic community (and within other organisations) some of the lessons learnt from research are often not taken forward into policy or practice.  This said, it may be necessary to take the recommendations from a number of different research projects to obtain a rich and complete understanding of a field before fully understanding how policy might be positively influenced.  The challenge is not only combining and understanding the results from different projects, but communicating the results.

Summary

Projects such as the Inclusive Digital Economy Network, from my outsiders perspective, attempt to bridge the gaps between different stakeholders and facilitate a free exchange of ideas and experiences that may point towards areas of investigation that can allow us learn more how digital technologies can make a difference to us all.

Acknowledgements: many thanks are extended to the organisers of the event – an interesting day!

Permalink
Share post
Christopher Douce

Reflections on learning object granularity

Visible to anyone in the world
Edited by Christopher Douce, Tuesday, 1 Sept 2020, 07:57

4815260870_ea30750a28.jpg

I first discovered the notion of learning object granularity when I was tasked with creating my first learning object.  I was using an authoring tool that allowed you to describe (or tag) absolutely anything.  This was a revelation!  My tool allowed me to assign descriptions to individual photographs and sets of navigable pages that could contain any type of digital media you could imagine.  You could also assign descriptions to an entire learning object.  Not only was I struggling with how to use the fields (title, description, keywords) that I had to complete, it was also difficult to know where I should stop!

Terms of reference

There are a significant number of terms here that beg further explanation.  The idea of a learning object (wikipedia) is one that is slippery: it varies depending upon who you speak to.  I see a learning object as one or more digital resources that have the potential to provide useful information to, or serve a useful function for, a consumer.  Consumers, I argue, are both the end-users (learners), and those who might use learning objects within a course of study.

An alternative definition might be: a set of learning resources that can be used together to help a learner achieve a defined set of learning objectives.  I think I prefer this second definition.  It feels a little more precise, but there are few words that allude to how large a learning object might be.

Benefits of learning objects

One of the often cited benefits of learning objects is that they have the potential to be reused.  A digital resource could be taken from one learning situation could be reused (or repurposed) to another situation.  The benefits could include an increase in the quality of the resulting material and possible savings in terms of time and money.

Learning objects are sometimes held within mysterious instruments called repositories.  If existing materials are taken and modified, they could then be later returned to a repository and placed back into circulation for other people can use and modify, thus creating a virtuous cycle.  One problem with placing material in a repository is that if your repository contains tens of thousands of individual objects, finding what you want (to solve your particular teaching need) can become difficult (as well as tedious).

Metadata (wikipedia) has the ability to 'augment’ textual searching, potentially increasing the quality of search results.  Metadata also has the ability to offer you additional information or guidance about what an object might contain and how it might have been used, allowing you to make judgements regarding its applicability in your own teaching context.

There is a paradox: the more granular (or mutable) a learning object is, the more easily it can be reused, but the less useful it is likely to be.  The larger a learning object is, the more useful it is to an individual user (since it may attempt to satisfy a set of learning objectives), and the less likely it could be transferred or 'repurposed' to different learning and teaching contexts or situations.  Furthermore, the smaller the learning object, the more moral fibre one needs to successfully create correct (and relevant) metadata.

Repurposing

'Repurposing' is a funny word. I understand it to mean that you take something that already exists and modify it so it becomes useful for your own situation. I think repurposing is intrinsically difficult.  I don't think it's hard in the sense that it's difficult to change or manipulate different types of digital resources (providing you already have skills to use the tools to effect a change).  I think it's hard because of the inherent dependencies that exist within an object.  You have to remember to take care of all those little details. 

I consider repurposing akin to writing an essay. To write a really good essay you have to first understand the material, secondly understand the question that you are writing about, and then finally, understand who you are writing it for.  If you write an essay that consists of paragraphs which have been composed in such a way that they could be used in other essays, I sense you will end up with an essay that is somewhat unsatisfactory (and rather frustrating to read).

There is something else that can make learning object repurposing difficult.  Learning objects are often built with authoring tools.  Some tools begin with a source document and then spit out a learning object at the other end.  The resulting object may (or may not) contain the source from which it was created.  This is considered to be 'destructive' (or one way) 'authoring', where the resulting material is difficult to modify.

Even if we accept that reuse is difficult, there are other reasons why it is not readily performed.  One reason is that there is no real sense of prestige in using other people materials (but you might get some credit if you find something that is particularly spectacular!).  Essentially, employers don't pay people to re-purpose learning materials; they pay people to convey useful and often difficult ideas of learners in a way that is understandable.  There is no reward structure or incentive to reuse existing material or build material that can be easily reused.  Repurposing takes ingenuity and determination, but within the end result, much of this may be hidden.

There is a final reason why people may like to create and use their own learning resources rather than reuse the work of others.  The very act of creating a resource allows one to acquire an intimate understanding of the very subject that you are intending on teaching.  Creating digital resources is a creative act.  Learning object construction can be constructivism used to prepare for teaching.

Considering metadata granularity

The terms 'aggregate' (or 'composite') and 'atomic' objects are sometimes used when talking about learning objects.  An atomic object, quite simply, are objects  that cannot be decomposed.  An atomic object might well be an image or a sound file, whereas an aggregate object might be a content package or a SCORM object.

In my opinion, many aggregate objects should be considered and treated as atomic objects since it could be far too difficult, complex and expensive to treat them in any other way.  I hold this view since learning objects are ultimately difficult to reuse and repurpose for the reasons presented earlier, but this should not detract from the creation and use of repositories.  Repositories are useful, especially if their use is supported by organisational structures and champions.

I hold the view that metadata should match the size of a resource that it describes.  There should be metadata that describes an object in terms of overall learning objectives.  Lower-level metadata can be used to add additional information to a composite object (such as an image file) that cannot be directly gained from examining its properties or structure (such as using an algorithm to determine its type).

In essence, tagging operations for aggregate and atomic object types must be simple, economic and pragmatic.  If you need to do some tagging to add additional information to a resource (a pragmatic decision), the tagging operation should be simple, and in turn, should be cost effective.

High and low-level metadata tagging

The purpose of high level tagging, the description of high level aggregate object, should be obvious.  Consider a book.  A book has metadata that describes it so it can be found within a library with relative ease (of course, things get more complicated when we consider more complex artefacts, such as journals!).

Low-level (or lower level) metadata may correspond to descriptions of individual pages or images (I should stress at this point, my experience in this area comes from the use of software tools, rather than any substantial period of formal education!).  Why would one want to 'tag' these smaller items (especially if it costs time and money)?  One reason is to provide additional functionality

Metadata helps you to do stuff, just in the same way that storing a book title and list of authors help you to find a book within a library.  Within the EU4ALL project, metadata has the potential to allow you to say that one page (which may contain an audio file) is conceptually equivalent to another page (which contains a textual equivalent).

By describing the equivalence relationships between different resources, the users experience can be optimised to their preferences.  There is also the notion of adaptability, for example, whether a resource can be dynamically changed so it can be efficiently consumed using the device from where it was accessed (this might be a mobile device, a PC, or a PC that is using assistive technology).

Moving forwards

One of the biggest challenges within EU4ALL is to ensure that the users interface to an adaptable learning technology system is coherent, consistent and understandable.  By way of addressing accessibility concerns, all users could potentially benefit.  Learners could potentially be presented with an interface or a sign that indicates that different alternatives are available at certain points during a learning activity, should they be found to exist.  Presenting alternatives in a way that does not cause disruption to learning, yet remains flexible by permitting users to change their preferences, is a difficult task.

Creating metadata is something that is difficult and tiresome (not to mention expensive).  As a result, mistakes can be easily introduced.  Some researchers (slideshare) have been attempting to explore whether it is possible to automatically generate metadata using information about the context in which they are deployed.  In fact, it appears to be a subject of a recent research tender.  But ultimately, humans will be the final consumer of metadata, although metadata languages are intended to be used by machines.

Summary

The notion of a learning object is something that is difficult to define.  Speak to ten different people and you are likely to get ten different answers.  I hold the view that the most useful learning object is an aggregate (or composite) learning object. 

Just as the idea of a learning object can be defined in different ways, the notion of granularity can also have different definitions.  The IEEE LOM standard offers four different levels of 'aggregation', ranging from 1, which refer to 'raw media data' (or media objects), through to individual lessons (level 2), a set of lessons (i.e. a course, level 3), to finally a set of courses which could lead to a formal qualification or certificate (level 4).  I hold the opinion that metadata should match the size of a 'learning object'.  Otherwise, you might end up in a situation where you have to tag everything 'in case it might be used'.  This is likely to be expensive.

High level metadata (in my opinion) is great for storing larger objects within repositories, whereas low-level metadata can be used to describe the adaptability and similarity properties of smaller resources which opens up the possibility of delivering learning resources that match individual user needs and preferences.

Acknowledgements

Posting image: from cocoi_m, from Flick.  Thanks go to an anonymous reviewer whose comments have been very instructive, and all those on the EU4ALL project.  The opinions that are presented here are my own rather than those of the project (or the Open University).

Permalink 1 comment (latest comment by Jonathan Vernon, Friday, 5 Oct 2012, 06:45)
Share post
Christopher Douce

Understanding Moodle localisation

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 21 July 2010, 13:19

moodle-logo-small.gif

Another Moodle activity that I've been tasked with is: 'ensure that different users are presented with user interfaces that match their language choices'.

I understand that software localisation (or internationalisation) is an industry in its own right, replete with its own tools and practices. When you scratch the surface of the subject you're immediately presented with different character sets, fonts and issues of text direction (whether text flows from left to right or visa versa).

My question is: how is Moodle localised into different languages, and does it use any approaches that could be considered to be common between other systems?

This post will only scratch the surface of what is an interesting (and often rather challenging) subject. For example, what is the Moodle approach to dealing with plurals, for example? There's also the issue of how internet browsers send their localised settings to web servers and application engines... Before I've even started with this post, I'm heading off topic!

Let's begin by considering three different perspectives: the students perspective, maintainers perspective and the developers perspective.

Students perspective

A student shouldn't really need to concern themselves with their locale settings, since the institution in which they are enrolled are likely use a sensible default setting. But if students wish to change the LMS interface language (and providing your particular Moodle installation permits the changing of user preferences), a student user could click on their name hyperlink that they see after logging on and click on an 'Edit Profile' tab and search for the 'preferred language' drop down box.

In my test installation, I initially had only one language installed: English (en). In essence, my students are not presented with a choice. I might, at some point during my project need to offer 'student users' a choice of four different languages: German, Italian, Greek and Spanish. Obviously something needs to be done, leading us swiftly to the next perspective.

Maintainers perspective

I log out from my test student account and log back in as an administrator and discover something called a 'Language' menu, under which I discover a veritable treasure trove of options.

The first is entitled 'Language Settings'. This allows an administrator to choose the default language for a whole installation and also to do other things such as limit the choice of languages that users can choose.

The second menu option is entitled 'Language Editing'. It appears that this option allows you to edit the words and phrases (or strings) that appear on the screen of your interface. The link between a 'bit on a screen' and a language specific description is achieved by an identifier, or a 'placeholder' that indicates that 'this piece of text should go here'.

What is interesting is that individual strings are held within Moodle programming files. This makes me wonder whether the action of editing the strings causes some internal programming code to change. This process is mysterious, but interesting.

As a useful aside (which relates to an earlier project related post), I click on 'resource.php' to see what identifiers (and text translations) I can find. I see loads of resource types, including names for resource types, which are numbered. Clearly, when adding new functionality, a developer needs to understand how software localisation occurs.

Continuing my user perspective exploration (after being a little confused as to what 'new file created' means after choosing to view the 'resource.php' translation page), I click on the 'Language Packs' option. Here I am presented with a screen that tells me about what language packs I have installed. By default, I only have a single language pack: English (EN). Underneath, I see a huge list of other language packs, along with a corresponding 'download' link. Apparently, because of a problem connecting to the main Moodle site (presumably because one of my development machines is kindly shielded from world from different nasties), things won't install automatically and have to save (unzipped) language packs to a directory called 'moodledata/lang'.

Let's see what happens by downloading and unzipping the language packs I need.

After unzipping the language packs, I hit my browser 'refresh' button. As if my magic, Moodle notices the presence of the new packs and presents you with a neat summary of you have installed.

Developers perspective

So, how does this magic work, and what does a developer have to know about localisation in Moodle?

One place to start is by exploring the anatomy of a downloaded language pack by asking the questions: 'what does it contain, and how is it structured?' Out of all the four packs that I have downloaded the German pack looks by far the most interesting in terms of its file size. So, what does it contain?

The immediate answer is simply: files and directories. In the German pack I see three folders: doc, help and fonts. The doc and fonts folder do not contain very much, mostly readme files, whereas the help folder in turn contains a whole load of subfolders. These subfolders contain what appears to be files containing fragments of HTML that are read using PHP code and presented to the user. At this point I can only assume that Moodle reads different help files (and presents different content to the user) depending upon the language that a user has selected.

At the root of a resource pack I see loads of PHP files. Some of these have similar file names, i.e. some begin with quiz, and presumably correspond to the quiz functionality, and others begin with repository, enrol and so on (my programmer sense is twitching, wondering whether this is the most efficient way to do things!)

A sample of a couple of these PHP files shows that they are simply definitions of localised strings which are stored in an associative array, which is indexed by a name. Translated into 'human speak', there's a fixed 'programming world' name which is linked to a 'language world' equivalent. You might ask the question of why do 'language localisation' this way? The answer is: to avoid having to make many different versions of the same Moodle programming code, which would be more than a nightmare to maintain and keep track of.

A number of questions crawl out of the woodwork. The main one being, 'how are the contents of these resource packs used when Moodle is running?', but there is the earlier question of 'what happens when you make a change to a translation?' that needs to be answered. Both are related.

Moodle has two areas where localisation records are stored. The first can be described as a 'master' area. This is held within the 'programming code' area of Moodle within a directory unsurprisingly named 'lang'. This contains files which contains identifiers and strings for the default language, which is English. The second area is a directory, also called 'lang', which can be found within the Moodledata directory area. Moodledata is a file area that can be modified by the PHP software engine (the software that Moodle itself is written in). Moodledata can store course materials and other data that is easier to store using 'file storage' area as opposed to using the main Moodle database.

As mentioned earlier, language packs are stored to the Moodledata area. If a user chooses to edit a set of localised strings, a new version of the edited 'string set' is written as a new file to a directory that ends with '_local'. In essence, three different language resources can exist: the 'master' language held within the programming area, the installed 'language pack', and any changes made to the edited language pack.

During earlier development work, I created a new resource category called an 'adaptable resource'. After installing the German resource pack, using the 'master language pack', Moodle can tell you whether there are some translations that are missing.

4814610613_9b910ff2c8.jpg

After making the changes, the newly translated words are written to a file. This file takes the form of a set of identifier definitions which are then read by the Moodle PHP engine. Effectively, Moodle writes its own programming script.

Using this framework, developers shouldn't have to worry too much about how to 'localise' parts of their systems, but before stating that I understand how 'localisation' works, there's one ore question to ask.

How does Moodle choose which string to use?

When viewing a course you might see a the 'topic outline' headline. How does Moodle make a choice about which language pack to use? I begin my search by looking through the code that appears to present the course page, 'course/view.php'. There isn't anything in there that can directly help me, so I look further, stumbling upon a file within a 'topics' sub-directory called 'format.php'.

In the format file I discover a function called get_string, which references an identifier called 'topicoutline'. This is consistent with the documentation that I uncovered earlier. The get_string function is the magic function that makes the choice about where your labels come from.

Get_string is contained within a file called 'moodlelib.php' which is, perhaps unsurprisingly, contained within a directory called 'lib'. Moodlelib is a huge file, weighing in at about eight thousand lines. It is described as (in the comments) as a file that contains ‘miscellaneous general-purpose Moodle functions’.

Get_string is a big function. One of the first things it does is figure out what language is currently set by looking at different variables. It then creates a list of places to look where localised strings can be found. The list begins with the location of where language packs are installed to, followed by areas within the Moodle codebase that are installed by default. It then checks to see if any ‘local’ (or edited) versions of the strings that have been created (as a result of user editing the language packs). When the function knows which file the strings are held in, Moodle reads (includes) the file and caches the contents of the 'string file' into a static variable (so Moodle doesn’t have to read the file every time it needs to fetch a string) and returns the matching localised string.

In the middle of this function there is extra magic to present sensible error messages if no strings are found, and other code to help with backwards compatibility with earlier versions of Moodle. It also seems to check for something called 'parent languages', but I've steer clear of this part of the code.

Testing language installation

Has all my messing around the languages worked? Can I now assign different users different languages? (Also, can users choose their own language preferences?) There is only one way to find out. Acting as an administrator I created a new user and set the users default language to Italian. I logged out and logged in using the new user account.

Moodle in Italian

It seems to work!

The one thing that I have not really explored is whether Moodle will automatically detect the language a user has configured on their internet browser. A little poking around, indicates that Moodle can indeed be clever and change its language dynamically by using the hidden 'language' information that is sent to a web server whenever a HTTP request is made.

The 'dynamic language adaptation' functionality is turned on by default, and a switch to turn it on and off can be found within the 'language settings' menu that the administrator can use.

The fact that Moodle can dynamically change in response to browser (and potentially operating system) settings is interesting. One of the things that the EU4ALL project is exploring is whether it might be possible to tell web-based systems whether certain categories of assistive technology are being used. This may open up the possibility of user interfaces that are more directly customised to users individual needs and preferences.

Other 'languages'

I've described (rather roughly) how Moodle takes care of software localisation, but how is it handled in other programming languages. I've used Java and the .NET framework in the past, and each system provides its own way to facilitate localisation.

Java makes use of something called a resource bundle (Sun Microsystems). dotNET, on the other hand, uses something called resource files (Code Project). One question remains: is there a generally recommended approach for PHP, the language on which PHP is based? Like with so many different things in software, there is more than one way to get the same result.

The author of the PHP Cookbook describes another way to think about localisation. This approach differs in the sense that it focuses more on demonstrating localisation by using object-orientation (an approach that Moodle has historically tried to steer away from, but this seems to be changing), and doesn't really address how a user might be able to edit or change their own strings should they not like what they see.

Conclusions

Software localisation, like accessibility, is a subject that software developers and web designers need to be aware of. This rather long post has outlined how software localisation is broadly achieved in Moodle. Much, however, remains unsaid. Issues such as how plurals, right to left scripts and multi-character fonts have been carefully side stepped.

What is clear is that Moodle appears to have a solid infrastructure for localisation which seems to work, and provides site maintainers the ability to add different languages without too many headaches. Also, whilst browsing the documentation site I stumbled across a documentation page that hints at potential future localisation developments.

Although I have mentioned one other way to approach localisation within PHP it might be useful at some point to explore how comparable learning management systems tackle the same problem, perhaps also looking at how localisation is handled in other large projects.

Localisation will always be something that developers will need to address. Whenever new functionality is introduced, developers will obviously make provision to ensure that whatever is developed is understandable to others.

Permalink
Share post
Christopher Douce

Exploring how to call SOAP webservices using PHP (and Moodle)

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 21 July 2010, 13:00

4815188662_bd8a3e24e0_m.jpg

This post describes my second bash at understanding PHP and SOAP webservices, work carried out off and on over the last couple of weeks. The first time I connected PHP to an externally hosted web-service was using a script that I wrote that was external to Moodle. Now my challenge is slightly different: to try to get Moodle calling external web services.

Just to make sure I understand everything, I'm going to present some background acronyms, try and remember what pages I looked at before, then step towards uncovering parts of Moodle that are in some way connected to the magic of web services.

Background information

I'm required to interface to web services that use the SOAP protocol (wikipedia). SOAP is, I am led to believe, an abbreviation for Simple Object Access Protocol. In a nutshell, SOAP allows you to send a message from one computer to another, telling it to do stuff, or asking it a question. In return, you're likely to get a response back that either tells you what you wanted or indicates why your request had failed. SOAP is one of many different techniques that you can use to pass messages to one computer to another over the internet.

Another technique, which is simpler (and faster) but has some limitations that SOAP gets round, is REST (wikipedia). More information on this 'architectural style' can be found quite easily by doing a quick internet search. My focus is, however, SOAP.

So, assuming that one computer exposes (or makes available) a web service to another computer, how do other computers know how to call a service? In other words, what parameters or data does a particular service expect? The answer is that the designers of SOAP service use a language that describes the format of the messages that the SOAP server (or service) will accept. This language is called WSDL, or Web Services Description Language (wikipedia).

Each SOAP server (or service) has a web address. If you need to find out what data a SOAP service requires, you can usually ask it by adding ?wsdl after the service name. This description, which is presented in a computer readable structure, can sometimes help you to build a SOAP call – a request from your computer to another.

Very often (in my limited experience of this area), the production and use of this intermediate language is carried out using layers of software tools and libraries. At one end, you will describe the parameters that you will process, and some magic programming will take your description (which you give in the language of your choice) and convert it into a difficult to read (for humans!) WSDL equivalent. But all this is a huge simplification, of course! And much can (and will) go wrong on the journey to get SOAP web services working.

A web service can be a building block of a Service Oriented Architecture (again, wikipedia), or SOA. In the middle, between different web services you can use the mysterious idea of middleware to connect different pieces of software together to manage the operation of a larger system, but this is a whole level of complexity which I'm very happy to avoid at this point!

Stuff I looked at earlier

The first place that I looked was in a book! Specifically, the PHP Cookbook.

Chapters 14, consuming web services, and 15, building web services looked to be of interest, specifically the sections entitled 'calling a SOAP method with/out WSDL'. Turning to this section I was presented immediately with a number of possibilities of how to make SOAP calls since there are a number of different implementations depending upon the version of PHP that you're using.

Moodle, as far as I understand, can work with version 4.3 of PHP, but moves are afoot to move entirely towards version 5. My reference suggested its perhaps best to use the bundled SOAP extension as opposed to the other (PEAR::SOAP or NuSoap) libraries since they are faster, more compatible with the standards, automatically bundled and exceptions (special case errors) that occur within SOAP are fed into corresponding PHP exception constructs to make programs (theoretically!) easier to read.

Consuming services

On my first attempt to call a web service, I ran into trouble straight after starting! All my code was failing for a mysterious reason and my debugger wasn't deciding to give me anything that was useful. After doing some searching and finding some on-line documentation I gave the PEAR library a try, but ended up just as confused. I ended up asking one of my illustrious colleagues for help who suggested that I should add an additional parameter to original attempts using the PHP extensions to take account of local network setup.

Calling seemed to be quite easy. I could create something called a SOAP client, tell it which address I want to call, give it some options and make a call my sending my client a message which has the same name of the web service which I want to call, optionally loaded up with all my parameters. To see more of what came back, I put some of the client variables in some temporary variables so I could more easily watch what was coming back in my debugger.

Producing services

Now that I (more or less) knew how to call web services using PHP, it struck me that it might be useful to see how it might be possible to present web services using PHP. This was found in the next chapter of the book.

To maintain consistency, I asked the question how might I create some WSDL that describes a service? Unfortunately, there is not an easy answer to this one. Although the integral SOAP libraries don't directly offer support to do this, there are some known techniques and utilities that can help.

One of the big differences between PHP and the WSDL language is that PHP is happy to just go ahead and do things with data without having to know exactly what form (or type) the data takes. You only get into trouble when you ask PHP to carry out operations on a data item that doesn't make sense.

WSDL, on the other hand, describes everything, giving both the name of a data item and its type. Because of this, you can't directly take a PHP data structure and use it to create WSDL. To get round this difference one approach is to provide this additional information in the form of a comment. Although comments are intended to help programmers, they can also be read by other computer programs. By presenting data type information in the form of a comment, an intermediate program can create WSDL structures without too much trouble, saving developer time and heartache. This approach is used by both the NuSoap library and code that works with PHP 5. But I digress...

Moodle web services code

There appear to be some plans to expose some of the Moodle functionality via a series of web services, enabling Moodle to be connected to and used with a range of external applications. There is also a history connecting Moodle with external assessment systems using web services.

A grep through the Moodle codebase (for 1.9) reveals a library called (perhaps unsurprisingly) soaplib. There appears to be some programming logic which makes a decision about which SOAP interface library to use, depending upon the version of PHP: use the native version if PHP 5 is used, otherwise NuSoap.

I'm guessing that the need to use the NuSoap library will gradually disappear at some point, but a guess is totally different from finding out whether this is really going to happen.

One way to find out what is going on and what lies in store for the future is to explore the on-line discussion forums and quickly find a forum that is dedicated to discussing Moodle web services. It appears there are two interesting developments, something called the Moodle NetWork (which allows you to share resources between different instances of Moodle, at a first glance), and non-core Moodle code contribution called the OKTech Web Services. After a little poking around it's possible to find some documentation that describes this development in a little more detail.

I also discovered a documentation page entitled Web services API , but is related to XML-RPC (wikipedia) rather than SOAP. My head is beginning to hurt!

Returning to the Moodle core SOAP library, I ask the question: what uses the soaplib? One way to do this is to search for calls to functions that are contained within this library. I have to confess, I didn't find anything. But, what I did find is a discussion.

It turns out it was added as a result of work carried out at the University of York in the UK for a project called Serving Maths that created something called the Remote Question Protocol (RQP). The initial post mentions concerns about not being able to make use of some of the additional parameters that the PHP 5 library provides. This is a concern that I share.

Next steps

I've more or less finished my whistlestop tour of Moodle components and code that relate to web services type stuff. I'm sure there is more lurking out there that I haven't discovered yet. But what of a conclusion?

Since I'm not planning on using Moodle to expose any web services I can thankfully sidestep some of the more difficult discussions I've uncovered.

Also, since there isn't much in the way of existing SOAP utility code that I can build upon and I roughly know more or less how to call web services using the magic functions that are provided in PHP 5, I'm going to try to more or less directly add some lines of code to Moodle. But before I do this, like every good developer, I'll test things out using a test harness to explore how my target services behave.

Image: modified from wikipedia

Permalink
Share post
Christopher Douce

Discovering Moodle profile fields

Visible to anyone in the world
Edited by Christopher Douce, Wednesday, 21 July 2010, 12:58

EU4ALL logo

One way to improve e-learning user experience is to attempt to present material that match a learners precise needs and preferences. In terms of accessibility, it would be non-sensical to provide a screen reader user with a digital video resource, if that resource contained images or illustrations which did not have accompanying auditory explanations.

The previous post explored how it might be possible to add a new category of resource to Moodle, an 'adaptable resource'. This post will try to explore a related piece of the puzzle by examining how it might be possible to tell Moodle about your own e-learning content preferences.

Some background

A learner might use a range of different e-learning systems at different schools or universities during a learning career. One problem might be the need to continually tell different systems what your content preferences might be. Let's face it: this is trouble! Not only would this take time, but it would also no doubt introduce errors. One solution to this might be to allow a user to store their preferences on a server somewhere. This server could then share user preferences to different systems, subject to some form of magic authentication.

A learning management system could be used allow a learner (or someone acting on behalf of a learner) to edit and change their centrally managed preferences. The question is: how could we demonstrate this idea using Moodle?

Let's begin from where I left off in the previous post: user profile developer pages.

Returning to code

What this page says is that it's possible for a user of Moodle to store extra 'stuff' about a group of users to a database. This sounds great! But how does it work? In true developer fashion, ignoring all the user documentation, I delved into the source code and then browsed over the database structures. I found quite a few tables that relate to the user. There were tables relating to fields, data and categories, and a hint of previous accessibility development work as evidenced by the presence of a 'screenreader' field (but more of this later).

It soon became clear that there was quite a lot of existing functionality that might be able to be 'leveraged' (horrid word!) to facilitate (another one) the entering of user preferences. I liked what I saw: code where the functions were not too (not bigger than a screenful) and had the odd set of comments (you can read that in two different ways). Looking at the code, whilst useful, is never enough. It was time to have a look to see what the user sees.

Return to the user interface

Within a couple of minutes, I found it was possible to construct a way to enable both the user and the administrator to enter extra data against a particular user profile. Using the Moodle tools I created a really quick pull down menu to represent a learner specifying their preferences.

4815188614_d799dfb361.jpg

I should note, that a single menu represents a tip of the iceberg regarding the issue of entering user preferences! My titles are undoubtedly badly chosen. Also, there are existing metadata standards, such as AccMD (powerpoint), which can be used to describe user preferences, but I certainly won't go this thorny area here...

Along the way I stumbled across some documentation pages that describes the Moodle user profile.

Joining the dots (or nodes)

Okay, so this part of Moodle might be able to be used as a simple user interface to allow a user to specify their content preferences, but how (and where?) might I store other information like 'special-magic-numbers' or identifiers that can allow the VLE to understand that other systems are referring to the same user? (I hope this sentence makes sense!)

It seems that there are ways to store additional stuff in a Moodle profile too, fields that can be accessed and used by an administrator, but cannot be seen or edited by learners.

But... why?

As ever, one simple question has created a whole raft of others:

  1. Where did this feature come from?
  2. How is the data represented in the db? (looking at things from a developers eyes again!)
  3. What part of the code should I modify so I can connect the Moodle user interface to some kind of magic 'preferences server'?
  4. What does this mysterious 'screenreader' option do?

I'll leave some of them for another day, but I shall 'touch upon' answers to the first and the fourth.

Answers... of a sort

Apparently the capability to add profile fields (and categorize them) was added in version 1.8 of Moodle (which also incorporated a number of accessibility enhancements). I've tried to find the discussions on the forum that culminated in the addition of this feature, but I've had no joy - but what I have learnt is that there is talk about making an even more customisable version of the user interface, but I digress.

Wishing to know more, I turned my attention to the code to see what it could tell me. References to the screen reader profile tag is found scattered throughout the codebase. It appears to change how certain parts of the HTML is presented to browsers. It is found in the chat module, within the file type resource code, the question engine code (where additional feedback is presented to screen reader users), and in some of the currently mysterious theme code. I sense this question is a bit harder to answer than I had initially anticipated!

Onwards and upwards (or should it be downwards?)

Now that I know roughly how to make a custom user profile interface, my next task is to identify where in the code I should add some magic to make Moodle speak to different servers. Wish me luck!

Permalink
Share post
Christopher Douce

Working with new Moodle resource types

Visible to anyone in the world
Edited by Christopher Douce, Tuesday, 2 Dec 2008, 17:14

Moodle logo

As a part of the EU4ALL project, I have been trying to figure out how to add a new resource type. The idea is to add a resource known as an 'adaptable resource', whereby different media types are presented to the user depending on their accessibility preferences. The issue of how and where to assign or change these preferences is currently a question that has to be resolved. This post is intended as a bunch of 'notes to self' about what I have found during the last couple of days exploring and poking around the Moodle code base.

To explore the code, I've been using a couple of tools: SQLYog, which was recommended to me by an illustrious IET developer (to allow me to explore an instance of a Moodle MySQL database I have running on my home machine), and NuSphere, a PHP IDE. I did try the Zend IDE a year or so back, but abandoned it since I became rather confused!

So, how is it possible to add a new resource to Moodle? Initially, I decided to look at an existing resource, beginning with the simplest one that I could find: a simple text resource. By browsing the code base I seemed to find the rough area where the 'resource code' lives. I also browsed around the developer documentation page an unearthed a resource class template. Great!

In development, one question instantiates a tree of others. The most fundamental question is: how does this code work? I need to answer this big one to make a change. This is too big, so I split it into two other questions: (1) how can you modity a form that allows you to enter the parameters that describe an adaptable resource (currently it is to be a simple numerical value, from what I understand), and (2) how can I take the values held within a form and update them to the MySQL database? This requires an understanding of further magic code. As a note to myself, let's have a look at each of these in turn.

Entering stuff

Looking at the text resource code, there seemed to be a bit of object-oriented polymorphism going on. The name of the directory where the resource code is important too! There is a magic function called display which appears to make some further magic calls to create some data entry fields - but these calls are quite a long way away from the pure HTML that is presented in the browser window.

This is another question: how does the magic functions in display() get turned into HTML? The answer apparently lies with the application of a forms library called PERL. If I figure out how to add functions in a way that would work for this library, I can ask the user for whatever I want.

The form uses some object-oriented principles. Individual controls are added to 'the form', and then a function is executed that 'prints out' or renders each of the controls, without you having to go near to producing your own HTML.

Another interesting observation, is that the display function I have uncovered only relates to a small part of a bigger form. This is due to subclassing and polymorphism that is being used, but this is a distraction... now I have a little understanding of what is happening (thanks to the NuSphere debugger!), I'll park this question for the time being. There are other mysterious areas to explore!

Storing stuff

When a Moodle user edits a course resource, there are a couple of buttons that appear at the bottom of the screen. These are 'save and return', 'save and display' and 'cancel'. Looking at these buttons from a HCI perspective I think, 'buttons doing two different things?? surely this is a bad idea!'. But I digress.

My question is, 'what happens when the tutor (or administrator) clicks on either of the save buttons - where does the data go? Or more precisely, how does the data get saved?

Moodle seems to have a thin database layer: a set of functions that allows you to send SQL statements and receive data in response. Since the contents of the resource form is held in what can only be described as a 'big variable' (PHP has a funny approach to object-oriented programming if you've used other languages), the Moodle developers have figured out a way to transfer the contents of a form to the database, by matching on-screen fields to database fields.

This seems to work well: but on the downside is the database update code that Moodle code generates appear to be rather big, and an implicit dependency is created between the form and the database structure. Other systems that I've looked at make use of stored procedures, which has the potential to boost performance and security on one hand, but on the other restrict the database platforms that an application can be used with.

Moving forwards

Now I know (roughly) how to add extra bits to a new resource type, the next thing I have to do is figure out how to write the functions that I need. After I've done that I'll have to hook up my edits to the database, and figure out how to best display the data that I've produced. I already have some idea about how to do this since I have created a paper prototype.

But before going down that road, I think I'll continue my survey of the Moodle codebase by exploring what sections can potentially relate to adding and manipulation of user parameters and settings. I think I'll start by looking at the user profile developer pages.

Looking towards the longer term, I will also have to connect Moodle to a number of different web services. Wish me luck!

Permalink
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 2335244