Weekly Report 3 Gsoc @ Moodle

Coding Period Starts !

Week 3(17 june – 24 june)

Task 1:- Creating the admin tool with the basic Solr configuration options.

Admin tool for Advance course search

Admin tool for Advance course search

Step 1 :- Creating the moodle form:- The basic moodle form with the configuration option to solr. Events like indexing, optimizing and deletion of  indexes.

Step 2 :-  List of files & description:-

  •  Setting.php :- controls who can access the advance course search & where the plugin can be found.
  • coursesearch_setting_form.php :- how the form looks like.
  • version.php :- plugin version & requirement moodle release.
  • lang/en/tool_coursesearch.php :- contains the lang Strings.
  • index.php :- retrieve the form data & perform appropriate actions.
  • /lib :- library functions that handles basic solr tasks like indexing, optimizing etc.
  • /pix :-  images directory

Installing the plugin:-

Step 1:- Refresh the moodle site it will automatically trigger the plugin installation. if not then go to administration–>notification.

Step 2:- Install the plugin.

Step 3:- the plugin basic configuration can be found in administration–>courses–>Advance Course Search.

Step 4:- Done !

Where Is the Source:- 

You can find the source here :- https://github.com/shashirepo/moodle-tool_coursesearch

So what’s done this week ?

1. Created the admin tool.

2. Designed the Schema.xml to serve to Solr.

So what’s Next week:-

1. Write local library function for the solr to perform the operations like indexing, optimizing, deletion of existing indexes.

2.  Debug the Code ! Perform optimization.

Weekly Report 2 Gsoc @ Moodle

Community Bonding Period

Week 2(7 june-14 june)

Task 1:-

Creating the Theme(Minor config Changes with Clean theme):- Its the first step. later we will be overriding the core_course_renderer($config->root.’/course/renderer.php’).

Steps & Result

Step 1:– Create the copy of the folder clean found in root/theme/clean Frankenstyle naming convention should be followed.

Step 2:-  Rename the folder with the theme name you want example cleantheme.

Step 3:- all the instance of ‘clean’ will now need to replaced with the ‘cleantheme'(name of the theme).

So finally the following files need to be changed.





/lang/en/theme_nameofyourtheme.php(Instance & file name to0 needs to be changed)

So here  are done with first step.

Result :-  https://github.com/shashirepo/moodle-search_cleantheme

Task 2:-

Overriding the core_course_renderer.php & Check with some hard coded input.

Step 1 :- Create & file named renderer.php in  your theme root folder.

Step 2:- now we need to override the existing renderer located at $config-root./course/renderer.php.

Code snippets

class theme_cleantheme_core_course_renderer extends core_course_renderer

// override the function definitions here


step 3:- add some dummy strings while overriding the method to ensure it works fine.

step 4:- ON the Debugging  by going Site Administrator–>Developer–>Debugging. to ensure you are doing in right way.

Result :-   https://github.com/shashirepo/moodle-search_cleantheme

Fine ! we done with the Task 1.

Next tasks  of this week(Probably i will be editing this post to add those to performed):-

1. Create a admin plugin(With a Button to trigger the cron to perform manual indexing)

2. Design the Schema xml to serve to Solr. Excited to start with Solr 😉

Hmm looking Cool 🙂

Weekly Report 1 moodle@Gsoc

A list of task performed during community bonding period:-

(Week 1  29 may- 6 june)

1. Learning the underlying moodle API:- my first & foremost strep. Because moodle is designed is very beautifully. keeping in mind the features of oops.  I found following documentations link really self explaining about how moodle works behind the scenes[1].

2. Learning how the Apache Solr do the magic:-  My first mail to Marina was really funny :P(Actually I was not aware of databases problems with effective searches). after the couple of sleepless nights and studying about one of the powerful open source API Apache Solr opened the doors for me. Apache is not only a powerful indexing engine. Behind that its do all the things that we need in project out of the box. according to my discussion with some local lug seniors “Integration of Apache Solr with drupal search module” is already done by drupal folks. so I cloned the whole project started looking over the source code.

3. Gsoc orientation meeting:- Its a nice way to see people around you rather than texting them. UTC 9:00 my first Gsoc orientation  meetup. That was nice to meet with  Michael de Raadt,  Tim Hunt,  Marina Glancy,  James Salsman,  Jean-Michel Vedrine,  Dan MarsdenTomasz Muras,  Aparup Banerjee,  Frédéric Massart and all.

Specially I thanks  Michael de Raadt for his awesome session. 🙂

4.  Set up the development and testing environment:- I usually write my PHP code in Aptana. but I found in moodle docs for developer tools PDT plugin for eclipse. Installed & found its really Cool 😉 Installed Apache Solr & moodle 2.6 dev.


Next week tasks:-

1. Studying the moodle database to began preparing the moodle Schema.xml.

2. Studying the Clean theme that need to be overridden further to perform manual indexing.

3. Looking over the search existing search functions & how they works(adding the manual dummy text)

4. Creating the “admin tool” plugin that will have complete search logic.

5. review the tasks by  discussion  with mentors.