Plugins traffic

Featured plugin August 2014: Archaius

Picture of David Mudrák
Featured plugin August 2014: Archaius
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersPlugins guardiansTestersTranslators

This month, we are aiming our torch on a theme. It's not the most popular one. It's not based on bootstrap framework. It has some known bugs and limitations to be fixed yet. And maybe it will not make you say wow first time you install it. Yet it has some unique features that are worth of spotlighting in this blog. It is called Archaius.

The Archaius theme has been available in the Plugins directory for more than a year now and gets regular updates since then. The current release called Archaius Tigris was published just recently and is available for Moodle 2.5 and higher.

Example screenshot of a site using the theme

The theme uses common three columns layout. It has responsive features implemented so on smaller screens, side blocks stack below the main content region and the horizontal custom menu bar turns into the items tree accessible via the common hamburger icon.

The theme settings page allows the site administrator to configure basic color scheme (to some extend), upload the site logo images (separate ones for desktop environments and mobile devices - i.e. devices with screen width less than 768px) and eventually provide custom CSS and Javascript. Such settings became pretty common in modern Moodle Themes though.

What caught our eyes and actually made us to feature this theme was the author's attempt to bring additional UI functionality beyond what Moodle core theme API provides. Namely, side block regions can be slipped out of sight horizontally via two control arrow-like widgets on sides. Vertically, side blocks can be elegantly collapsed and expanded but with slightly different behaviour from what we know from standard Moodle themes. Archaius makes use of the jQuery Accordion module for this. As a result, the user can focus on one block at a time easily. The block heading part itself triggers the collapse/expansion of the block so there is no need for additional control widgets (like the plus/minus widget used by default). This helps to keep the user interface look and feel very clean. Additionally, the theme provides similar behaviour for courses using the topic format. It turns sections into collapsible areas so users can again focus on what's important at the given moment.

Apart from these, the theme has in-built support for putting nicely animated slideshow to the front page. Slides content can be edited by administrators directly at the front page easily, with impressive results. This allows to implement good looking hero unit element at the front page.

The custom menu bar is sticky in this theme - it is always displayed at the top of the screen. That makes it to play an important role in the site navigation.

Interview with the maintainer

The plugin maintainer, Daniel Munera Sanchez, shared his thoughts about the project's history and development background.

Hi Daniel. Can you tell us something about yourself and your background?

Hi, I am Colombian guy, who studied computer science at EAFIT University, Medellin, Colombia. Nowadays I am master candidate at the same university. I love web programming, thats why when someone ask me what I do, most the time I only said, I am a passionate web developer.

Well, I don't like only computers, indeed. Until the third year of my degree, I was training in a professional soccer team called Atletico Nacional from Medellín, Colombia. But, I had to stop playing in order to better focus on my studies while putting football aside as a hobby.

Since my second year at the university, I have been working in a research group called LINEA i+D+I de Tic. The main focus of the group is educational informatics. Because of that, I have been very close to the use of technology in education. I have to said thanks to all people which have been part of the group, because I have learnt a lot from them - both from the technical and educational perspective.

I also had the opportunity to go to India as a trainee at INFOSYS. INFOSYS is an Indian company focused on banking software. It was a great experience because India is another world if you compare it to my country. By the way, I was learning English at that moment and receiving classes from people with Indian accent was a big challenge. When I came back to Colombia, a professor offered me an opportunity to go to the University of Bergen, Norway. Like most people in my situation and my age would do, I said YES!!. I was there for a year, working with applications to support research about linguistic and apps to teach Spanish as a second language.

After my experience in the viking lands I came back home. Nowadays, I am 23 years old and I am working part time in a company called Place to Train. The company was born from a research project I worked on before going to Norway. I like my work. When I go there, I realize what people with dedication and focus can do.

This is a summary of part of my life and professional experience. It was great to remind myself my experiences while writing this. I am very glad for the opportunities that life has given to me. I hope I can say some day that I have been in all continents doing what I love.

How did you get into Moodle and Moodle development?

As I said before, I am part of a research group. The research group is focused in educational informatics.

In my first year at the group, we developed platforms from scratch using Ruby on Rails. I was just learning it by that time but I was surrounded by VERY good developers who help me a lot. We were testing platforms to support learning processes as well. Moodle was one of the platforms we tested. Being honest, the first time I saw Moodle, I thought, WAW, this web platform is kind of ugly.

After my first year in the group, I got curious about Moodle and I talked with my brother about it (by the way, my brother studied computer science too). He helped me to understand how powerful Moodle is. After some research and conversations I understood the problem to be "married" with a technology. So, I started to find strong parts as well as weaknesses in different platforms and languages I knew at that moment (just from a novice point of view).

Since then I have been working a lot with Moodle because of my context (universities, teachers, ...). I have been trying to improve what people around me and mysel consider important. As an example: the appearance of the platform. Luckily Moodle has improved a lot. So it is not difficult now.

From that time until now, I have been learning where Moodle could be useful without treat it as a golden hammer.

What made you start with Archaius?

When people at the university realized how useful Moodle is, they started to use it more. We built platforms to support a master program for people in Bolivia and Colombia, a platform for internal courses, etc. After some time, I realized that I was doing almost the same modifications at all platforms: changing colors, animations, logos. I was just modifying templates. I was getting bored, because doing that and only that all time was kind of frustrating for me.

Then, I decided to study a bit about Moodle themes, which was mostly what I was modifying. So, I created a theme that fit most of the requirements from people that were working with me. Since that moment I got some free time to learn about Moodle plugins and philosophy. I was going to the research group office after classes to learn and extend my plugin to make it better. At that moment, most people who were working with me were designers. Thanks to that I had a great support to make things look good.

Finally, when I was in Norway, I talked with a professor to get some time at work to standardize my plugin and release it in Moodle community. She supported my idea to try and help people who were helping me since some years ago. So, I started my project.

It was the perfect place to do it. All my friends were in Colombia and my brother lived in Norway. I got support and I had less distraction. It is a nice way to say: I was without friends in one of the coldest countries in the world. I am just kidding. I had a great time in Norway and met good friends. But still, believe me, colder places are better for developers.

After some time, I took the risk to upload my theme to the Moodle community. Very kind people reviewed my theme. I had to fix small details and after some modifications, my theme was made available.

I had to change the name of my theme as a suggestion of Anthony Borrow. He suggested me a name related with the original name:

"Daniel - I want to give some thought to the name of the plugin. Chameleon was a core theme in Moodle 1.9. I wonder if it would be better to rename the theme so that folks do not confuse the two or think that your version is a 2.x version of the one previously in core. Would you consider renaming it? Having been a fan of chameleons in my youth, you might even consider renaming it to anole wink Peace - Anthony"

Spanish speakers will understand how problematic could be the suggested name, it was fun.

Archaius used to be just my hobby. I used to dedicate some part of my weekends and nights to improve it. But now, Archaius is part of my master thesis. It was the best way I found to dedicate more time to improve it and have some support (time, money, more time to sleep). So, if you have time and you are the person that makes the technical decisions of your company or institution, I will appreciate if you answer my questionnaire. It will help me a lot, even if are not using Archaius as a theme for your Moodle.

What software and IDE do you use when developing for Moodle and how does your typical screen look like?

  • Sublime Text and Emacs: these are my IDEs.
  • Iterm: As a console is better than the mac console.
  • MAMP: To run a local environment.
  • Web Server: I deploy to my server for testing in multiple versions of Moodle.
  • Grunt: To precompile assets and minified jquery plugins.
  • Rescue Time: I am starting to use Rescue time to know how I am using my time when I am in my computer, it helps me to organize my time and realize how many time I spend in each application while I am coding.
  • Github Client.

Screenshot of Daniel's desktop

What is your development workflow and how do you organise the code in terms of branching, tags etc?

I use github as a repository of my project. For testing I have two steps: first I test it at my laptop. When I think it is good enough, I deploy it to my server where I have different versions of Moodle installed. I check it in different versions for a while, trying to detect problems. Most time I ask my friends to help me in this process. After this testing I fix reported bugs.

The process to release depends of two things. If people report serious problems, I make a quick release with the fix. Otherwise I release a new version when I think I have a great new functionality. For example the main improvement of my last release was to adopt Moodle standards of including jQuery plugins.

I like Evolutionary prototyping approach and I have been trying to follow it.

I have been developing this plugin alone (from the programming perspective). I decided to create a github repository and create branches for different versions of Moodle and in some cases just to create versions with different features. After more than a year I realized I was working almost all the time on just one master branch. The other existing branch was a special version for Moodle 2.2. I used to fix reported issues, commit and push changes to the master branch - even without creating an issue on Github. I realized it could be better. So I decided to stop the 'master branch anti pattern' and re-organized my development workflow.

For whole this month, I have been learning how to follow a good versioning process, how to use the milestones correctly and how to motivate people to help me in different ways to improve Archaius. After my last release called Archaius Tigris, I want to improve the development workflow. I consider that this is VERY important to get people more interested in contribution.

What is the next big thing you would like to see in Archaius?

  • Performance: Adaptive Web Design and Responsive Web Design are great. But I have been always worried about performance, and now I want to improve page loading without breaking Moodle standards. The last release was a step forward in order to follow standards related to Moodle Javascript. Even if I do not completely agree with how Moodle load jQuery scripts. These changes won't be very attractive to people but I consider it as a very important improvement.
  • UX: I have been studying a concept called Plastic User Interfaces. It gave me an Idea to control where and when Moodle should render or not some blocks (as an example), in order to preserve usability. I am already working on it, it is part of my master thesis. What I want to render in the interface is only what works perfectly. I want to give the blocks and mods the possibility to report to the theme where they are not able to work.
  • Finally, I want to improve fonts. I realized how important fonts are for websites. I want to improve the possibilities of my theme to manipulate fonts.

What tools and communication channels do you use to stay in touch with users of your theme? How can they can ask questions and/or report issues with it?

Well, People usually make comments on the plugin page as a first option. But I have implemented other communication channels to improve the development workflow and the detection of improvements.

  • Blog: I created a simple blog to answer some of the questions, because I think blogs are good tools to teach people how to do small hacks and answer tricky questions.
  • Bug tracker: I use Github issues tracker. People can report issues there and I can add it to milestones.
  • Messaging: I used to receive direct messages in Moodle. I am new in Moodle community and I am just starting to use the communication channels inside Moodle.

How can community members help with further development of the theme?

As a said before, I am improving development methodology and communication channels to give people more options to contribute in different ways. But, I have to say that many people have overcome the lack of communication channels and have helped me a lot to rethink functionalities and define priority of improvements. Some of them use comments, other the blog and direct messages inside Moodle.

The opinion of teachers is very important to me as well as opinion of all the people who use the software in their institutions. I am not teacher and I don't realize what can be more useful for them. I am mainly focused in students, because the courses of my company don't have a teacher. There are only video conferences and Moodle resource to prepare for a final exam.

Any pull request at Github is more than welcome. Anyone who wants to learn about my theme and propose changes could do it through issues at Github, cloning the repository, commenting on my blog and Archaius plugin page.

Y PARA LAS PERSONAS QUE HABLAN ESPAÑOL, es mi lengua nativa, cualquier contribución es bienvenida y no tengo problema en responder en español o inglés.

If you were starting now from scratch, what would you do differently in Archaius?

This is a complicated question because I have been doing the best with the time and the experience I had. I would say, versioning of my plugin is a complete mess. So, I would like to go back in time and had read some posts and articles on that before I started.

Finally, I would follow all standards since the beginning and would use Moodle Tracker to expose my opinion and receive feedback.

But overall, I feel I was very lucky. When I started this project, Moodle 2.0 was released. Some people have said life was more complicated before.

Thanks a lot.

Web designer's review

We asked Barbara Ramiro, the web designer of Moodle HQ, for her short review of the theme.

Key features

When I was asked to have a look at theme Archaius, the first thing I noticed was a neat, clutter free, visually refreshing course page. Suddenly my course page was decluttered from the overwhelming course contents. With only the list of topics displayed, it gave me a quick overview of the course. All the lengthy activities and resources were hidden on collapsible topics until I expanded a few. This brought my focus on the topics I wanted to see without getting distracted from other topics which gave me a better virtual learning environment.

Apart from the collapsible topics, I noticed two quite prominent arrows on the left and the right side of the browser that toggle to efficiently dock and undock a set of blocks all at once. This made it so quick to hide all the blocks that I did not want to see while browsing the course content so I could focus on one thing and not get side tracked. It also made it easy to expand the course content area to maximise the learning space and compensate for the maximum width of 1200px. And this theme comes in responsiveness which makes the learning space suitable on small screens as well even without bootstrap.

Another thing I noticed on this theme was the accordion style on the blocks which neatly collapses a block when I expand another one. This feature again reinforces focus on one block at a time on each side rather than confused and lost with all the many expanded blocks. It also prevents the course page from a long scroll.

Overall, the unique key features of this theme gave me a sense of focused learning environment and a pleasing user experience. The collapsible topics, the blocks docking system and the accordion blocks make this theme unique, dynamic and worthy to be featured.

Room for improvement

I find the arrow on the collapsible topic a bit small which could be easily overlooked and since it is a bit close to the topic it could be mistaken as a bullet type. Although the entire topic block is clickable, I think it would be good to enlarge the arrow a bit and position it on the opposite side to make it obvious and intuitive.

Though the blocks could be quickly hidden to maximise the content area, it only spanned half of my screen. It would be good to update the maximum width of the page for large screen users and with high resolutions screens, the font size looked a bit small so it would good to scale up a bit to make it easier to read and look more modern.

Let the code talk

Archaius uses theme_base as it's only parent theme. The config.php file contains code that disables the standard docking functionality (as it provides its own alternative) and loads common javascript code (including the modernizr library). Additional JS modules are loaded in the theme_archaius_page_init() function if they are needed (based on the theme settings).

The theme uses the theme_overridden_renderer_factory class and overrides some core rendering methods to provide the desired functionality. Particularly, the subclass theme_archaius_core_renderer provides methods block() to render side blocks contents, and two more methods to modify the rendering of the custom menu and its items.

One database table is created by the plugin upon installation to hold the required data for the slides at the front page. All images used by the theme (site logos and those embedded into the slideshow) are stored in appropriate file areas in the filepool. The function theme_archaius_pluginfile() does not perform any access control and the files are available to the public.

The code slightly violates the Moodle coding guides in details (such as using camel case style for some $variableNames) but in overall, the code is pretty clean, structured and easy to follow. For the action argument, the PARAM_ALPHANUMEXT would be more appropriate than the currently used PARAM_TEXT.

Suggestions for the maintainer

When testing Archaius, the most annoying thing for me was that the theme does not store the user's layout preferences. If the user wishes to have side blocks docked, they probably have reason for that. The fact that on each page load, the blocks must be docked again manually, significantly degrades this otherwise neat feature. Same applies to collapsing course sections. Things like this should be stored permanently at the server via an AJAX call.

I would also suggest to replace the arrow-like icons that dock the side blocks with something else. These symbols are commonly used for browsing the content in carousel banners and their current usage in Archaius goes against this common experience. It's especially obvious at the front page when slideshow is used, too.

I would suggest to improve the default font size used by the theme. The current default setting make the theme look a bit archaic when compared with standard Moodle theme.

For some reason, the admin block search tool has been put into the top right corner of the screen which I personally found contra-intuitive. For non-admin users, the valuable screen space is displayed as empty.

It might be useful to have a separate site logo displayed at the front page and another one on all other pages.


I am happy to give the Featured plugin award to the Archaius theme. I appreciate the attempt to bring innovations into Moodle user interface. I believe the theme is a good choice for sites looking for a original and customizable theme. There is a potential in it for becoming a very popular Moodle theme in the future. I wish Daniel good luck and a lot of quality contributed patches from the community.

Average of ratings: Useful (5)
Tim at Lone Pine Koala Sanctuary
Re: Featured plugin August 2014: Archaius
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Since it is a bit obscure what you have to do in order to implement David's suggestion:

"Things like this should be stored permanently at the server via an AJAX call."

And since it is a useful thing to know how to do, I thought I would explain how to do it.

In your JavaScript code, you need to use the M.util.set_user_preference method. (search the code for that string to find examples of where and how it is used.

However, as a security thing, before that method will work, you need to first call user_preference_allow_ajax_update, telling Moodle which preferences are going to be changed via ajax. (Oh look, the PHPdocs for that function are out-of-date. They still refer to the old JavaScript method name. sad )

Average of ratings: Useful (2)
Picture of Daniel Munera
Re: Featured plugin August 2014: Archaius

Hi Tim,

First, thanks for your hint about storing user preferences and sorry because I waited until today to take a look of this.

Finally I had some time to work in what you and David said about storing user preferences related with my blocks effect.

Today I was able to implement it, but I have a question:



I am storing the user preferences with this format: 

"archaius-blocks-region-$regionName-context-$courseContextId[ ''| '-$moduleName-$moduleId'] 


1. archaius-blocks-region-side-pre-context-2

2. archaius-blocks-region-side-pre-context-32-lesson-6

It works, but, if a user hide a region in frontpage and go to frontpage settings or question bank (from frontpage), my theme will update the same preference, because the course context is equal and $PAGE->cm still empty, because they are not going to an specific module inside a course.

I don't know what other variable I can use to discriminate pages like: frontpage and frontpage settings. To be honest I don't if it is important.

I just want to know if you think this strategy is ok, because I am afraid to release this and then have to implement an upgrade script to change the way I was storing the preferences without erasing user preferences that was stored with this strategy.

Pd. If you have some time to take a look of I am fetching the information here

Best regards and Merry Christmas,


Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Featured plugin August 2014: Archaius
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

I suggest that you look at how the Moodle block system distinguishes pages. You can see that if you go to Admin -> Development -> Debugging and turn on 'Show page information'.

That is also reflected in the three columns (contextid, pagetype, subpage) in the block_positions table. (Note, subpage is often blank.) I think you should probably use the same scheme. You can get those three values from $PAGE. (User preference names can be up to 255 chars, so there should be no problem fitting it in.)

I think it is also good practice to start the preference name  with the full 'frankenstyle' name of your plugin, so theme_archaius...

Average of ratings: Useful (1)
Picture of Daniel Munera
Re: Featured plugin August 2014: Archaius
Hi Tim, 

I changed what I did to store the preference with the following format:


It works fine, but I am having a problem with the reports logs view.

There are few places (two at the moment) where I get the 404 status code. The request died here:

I am using the same function to allow the user_preference to be updatable from JS, so, the user_preference should be in the array.

I am just wondering if there is any restriction for some places to store user preference or if you have any idea of what could be happening, because the error I get doesn't give much information. 

The user preference is in the array when I check the array content after I set the user preference.

Thanks a lot and happy new year,


Average of ratings: -
Picture of Daniel Munera
Re: Featured plugin August 2014: Archaius

I found the answer to my problem:

I don't remember which one is the page where I had the same problem, but as soon as I find it I will check if it is already fix too.

Best regards,


Average of ratings: -
Picture of Kraig Robson
Re: Featured plugin August 2014: Archaius

Just wanted to add that I am using Archaius for the development of a social skills game targeted to children with Autism Spectrum Disorders.  I have had several email exchanges with Daniel, and he is extremely responsive and dedicated to the development of his theme.  A great guy!

I'm looking forward to working with Daniel as I make further requests based on my need to "gamify" my course.

Thanks for your great work Daniel!

Average of ratings: Useful (2)
Picture of Daniel Munera
Re: Featured plugin August 2014: Archaius

Hi David and Barbara,

I really appreciate your suggestions, it is good to have the opportunity to receive feedback from people with more experience and something we call in spanish "clinical eye" (I don´t know if it works in english)

I just want to ask you something: Which are the Known bugs?, (are the same you pointed out in the comments?) because I really want to implement what you said about store user's layout preferences, but before that I want to fix those problems.


I am not using jQuery Accordion module, I created a jQuery plugins called ArchaiusCustomBlocks, I am using this alternative for jQuery animations 

Again thanks a lot,


Average of ratings: -
Picture of David Mudrák
Re: Featured plugin August 2014: Archaius
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersPlugins guardiansTestersTranslators
Hi Daniel. Yes, by those "known bugs" I meant the issues described later in the blog post. Sorry if the "bug" term confused you. And sorry about my mistake. I know how it happened that I thought it was Accordion and I'll make sure to double check next time. Thanks for the correction.
Average of ratings: Useful (1)