Weekly Report 5 Gsoc @ Moodle

Week 5(05 july – 12 july)

Task :- Writing the Methods that talks between Solr’s instance & SolrPhpClient library.

 The task is about writing a PHP File that takes the Solr parameter’s and perform the indexing, deletion of existing index(s) and optimize the index.

File Ajaxcalls.php takes the parameters from YUI module.js file and respond back with the proper json response.

Code Snippets :-
try {
$httpTransport = new Apache_Solr_HttpTransport_Curl();       // Create the HttpApacheSolr object
$this->_solr = new Apache_Solr_Service($this->_solrHost, $this->_solrPort, $this->_solrPath, $httpTransport);   // Create the Solr instance

catch ( Exception $e ) {
$this->_lastErrorCode = $e->getCode();                              // if not succeed throw the error with
$this->_lastErrorMessage = $e->getMessage();
return false;
The deletion can be performed one by one(by passing the id of particular course id) or all at once.

Deletion by passing document id(if a particular course is removed)

Code Snippets:-
       public function deleteById( $doc_id ) {
try {
$this->_solr->deleteById( $doc_id );
} catch ( Exception $e ) {
echo $e->getMessage();

Delete all at once:-
public function deleteAll($optimize = false) {
try {
if (!$this->commit())

return false;
if ($optimize)

return $this->optimize();
return true;
} catch ( Exception $e ) {
$this->_lastErrorCode = $e->getCode();
$this->_lastErrorMessage = $e->getMessage();
return false;
Optimizing the indexes:-

Code Snippets:-
try {
return true;
} catch ( Exception $e ) {
$this->_lastErrorCode = $e->getCode();
$this->_lastErrorMessage = $e->getMessage();
return false;

What’s Next week:-

1. Rendering the results on the search page by overriding the existing methods.

2. Writing the README about how to install solr & how to configure.

3. Write the Install/uninstall/Upgrade script of admin tool.

4. Optimize the code & prepare the documentation.


Weekly Report 4 Gsoc @ Moodle

Week 4(26 june – 03 july)

After a lots of experiments with Solr schema. I came up with the final schema.xml this week. All the expected features like Intra-word delimiters, Fuzzy Search, Spell Checks etc.

So What’s Inside?

1. So what Field Types we need :- 

Code Snippets :-

<schema name=”moodle” version=”1.2″>


<fieldType name=”string” sortMissingLast=”true” omitNorms=”true”/>          // omitNorms=true @we don’t need Index time boosting

<fieldType name=”text” positionIncrementGap=”100″>



2. Fields Need to be Indexed :-

Code Snippets:-

<field name=”fullname” type=”text” indexed=”true” stored=”true”/>
<field name=”shortname” type=”text” indexed=”true” stored=”true”/>

Let’s spell check on Courses:-

<copyField source=”fullname” dest=”spell”/>
<copyField source=”shortname” dest=”spell”/>


<searchComponent name=”spellcheck” class=”solr.SpellCheckComponent”>

<str name=”queryAnalyzerFieldType”>textSpell</str>

<lst name=”spellchecker”>

<str name=”name”>default</str>

<str name=”field”>spell</str>

<str name=”spellcheckIndexDir”>./spellchecker1</str>

<str name=”buildOnOptimize”>true</str>



Currently Schema  is responding fine with:-

  • Stemming
  • Intra-word Delimiter
  • Fuzzy Search
  • Spell Checking

I am looking forward to make the search more powerful. Solr have lots of capabilities 🙂


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.


Gsoc Intern with moodle :) one of great moment for me :) :)

Hi all,

One of the great day of my life. I am writing after very long time.  It was 12:25 I was refreshing the page again & again. finally result came. As expected I was Selected.

Credit goes to my Papa, ma  & my mentor Marina glancy 🙂 & most importantly the genius one Paras Kuhad. He inspired me every seconds. I want to thanks him again.

lots of other seniors that made by day Srishti boss, Vikas boss, Nitesh boss & all my juniors.

I am writing this to encourage my juniors to keep enlightening the success of  ECB’s Gsoc Previous years selections.

I am writing here by some tips & way to ensure you get in to GSOC.

1. Be good with the technical skills. at least select one the programming language.

2.  Bugs & patches one more important part. Start submitting the bugs from very early. it will make your presence  effective in organization.

3. start from 2 months before select your organizations to work with. you can get reference from melange. although i was started 20 days before. but I was used to work 20 hrs a day.

4.  Communication ! ! ! one of the most important thing for the GSOC. its more important than your coding skills. learn to write speak with your mentor regularly. take care of punctuations and spells.

5. Closely look over your opponent.  study his ideas. and try to put more better ideas of your.

6. Make the plans 🙂 you will automatically learn to code 🙂 #

7. at last don’t stop until the last minute. keep studying your proposal. reiterate it repeatedly.


Thats all 🙂 Gud luck 🙂 feel free to contact me if you need help in any way 🙂



Google Quiz :)



Do you know everything about the company Google Inc.

And its services? Or are you still new to the topic, and you only used

Their search engine for a couple of times so far? Well, you can put your

Knowledge to the test in this quiz which will answer the question: How

Much do you know about Google?




Let’s Have a QUIZ….




1. Google Inc. was founded in …


a) 1996


b) 1998


c) 2000


2. Google Inc. was founded by …


a)       Sergey Page and Larry Brin


b)      Eric Schmidt and Larry Page


c)       Larry Page and Sergey Brin


3. Which search operator does Google enable by default?


a)       The AND operator


b)      The OR operator


c)       The NOT operator


4. Google once used Yahoo’s search result to feed its engine.



a)       Yes, from 1998-2000.


b)      No, it was the other way round – Yahoo used Google once.


c) No, Google and Yahoo never had any search relationship.


5. Google Analytics is a service to …


a)       Check if your web pages validate


b)      Check how many people visit your web pages


c)       Check your Google PageRank


6. In 2006, Eric Schmidt is Google’s …


a)       Vice President Engineering


b)      Eric left the company in 2004 to pursue his hobbies


c)       Chief Executive Officer


7. What was the name of the search engine the Google founders

developed before Google?


a)       PageRanker


b)      BackRub

c)       Gogol


8. What is the algorithm behind Google’s PageRank?


a) The more pages link to you (and the higher their PageRank), the

higher your page’s PageRank


b)      You get 1 PageRank point for every web page you own


c) The algorithm behind PageRank is kept secret, similar to the Coca-

Cola formula



9. Why do some sites get “banned” from the Google index?


a) They tried methods to get their pages ranked better which Google

considers spam


b)They have content which is illegal in this state/ country


c)       Both a) and b) are true.


10. At which university did the Google founders meet?


a)       Oxford University


b)      MIT


c)       Stanford University


11. What is the “Googleplex”?


a)       It’s where Google employees work


b)      It’s a solar system which shares only the name with Google.com


c) It’s the server farm Google built up to deliver search results to you


12. Which words are printed on the Froogle homepage?


a)       Search for any product you want (or discover new ones).


b)      froo·gle (fru’gal) n. Smart shopping through Google.


c)       Froogle. Just shopping.


13. Around how many hits do you get for the word “Hello” (in



a)       420,000 pages


b)      1,700,000,000 pages


c)       42,000,000,000 pages






14. If you want to find a place to grab a pizza, you go to …


a)       Google Food


b)      Google Places


c)       Google Local


15. At the Association of National Advertisers annual conference

in October 2005, who said Google will take 300 years to fulfill its

mission to index the world’s data?


a)       Eric Schmidt


b)      Larry Page


c)       Marissa Mayer


16. What colors do the letters of the Google logo have, from left to



a)       Red – Blue – Green – Yellow – Green


b)      Blue – Red – Yellow – Blue – Green – Red


c)       Blue – Yellow – Purple – Yellow – Red – Blue



How well did you do?


Answers-1 – b, 2 – c, 3 – a, 4 – b, 5 – b, 6 – c, 7 – b, 8 – a, 9 – c, 10 – c, 11 – a, 12 –

a, 13 – b, 14 – c, 15 – a, 16 – b.



i hope u liked the Quiz I shared .keep enjoying 


Foss’11 A 4 days technical fest by lugb :)

Spreading lights of freedom    


FOSS  is an inclusive term that covers both free software and open source software ,which describe similar developmental model having different philosophies.  The term open-source describes software whose source code is made available, most often subject to certain conditions, for use or modification by users or other developers.


 With the help of this event we are going to aware the world


about the free and open source software (Foss) and benefits of using free softwares and

challenges of using free software.



Workshops Details



Drupal is open source Content Management System to built websites. It can be used to build an Internet Portal,a personal departmental or corporate web site,a e-commerce websites. Drupal’s design goals include both being able to run well on inexpensive web hosting  accounts and being able to scale up to massive distributed sites.

Topic to be Covered-

Introduction of Drupal

Site building with Drupal

Administering Drupal

Managing Modules and Themes-

Many More…

Duration: 5 Hrs

BY Shashikant vaishnav n manuhar alam



Python is an easy to learn , powerful programming language. It has efficient high level data structures and a simple but efficient approach to object oriented programming.


Topics to be Covered-


What is Python-                                 By MANISH SHANDLIYA

Syntax ,Expression ,Variables-                       Owner of undofundoo.com

First Program in Python                                   &

Classes And Objects-                                 Mindsoft webdevelopment

Many more…


Duration: 5 Hrs.

                                 Linux & linux security

Topics to be Covered-

Basics of Linux

How to enhance security in Linux-

Doing that on Linux-

And many more….


Duration: 5 Hrs.




 Open Disscusion

Learn | Share | enjoy working on this tag line i shared something interesting like cracking window,modifing source n lot of experimen

Topics to be Covered-


Linux magics –                              By Shashikant vaishnav

why open source-

Cracking windows-

Google magics-


Duration: 5 Hrs.





Qt is library for creating GUI program.


Duration: 5 Hrs.                       By KAILASH DEORA(RHCE)

        Some Moments 🙂

This slideshow requires JavaScript.




“Hello Drupal” a talk on 27 Sep..:)

Hey Everyone,

I am sharing the moments of the talk we organised on 27 Sep on “Hello Drupal”. i hope linux user Group bikaner will keep going…:)


















Nitesh bhardwaj giving talk on Drupal…:)
























































#lugb Technogrates  😛



Hope we will create a right one platform for the juniors….:P