Moodle floating "block"/toolbar released

Moodle floating "block"/toolbar released

by Josep M. Fontana -
Number of replies: 14
The floating block/toolbar we announced and discussed in this thread has finally been released. You can test the final version here (enter as teacher:teacher) and you can download the code here.

Josep M. and Joan
Average of ratings: Useful (1)
In reply to Josep M. Fontana

Re: Moodle floating "block"/toolbar released

by Joan Codina Filba -
Just for those who may be afraid of code updates....
The floating window is included in a new theme. So in order to include the floating window in a course, it only needs to be attached to a new theme (a copy of the one in the site) with some small changes. And then use that new theme for the courses that need the floating toolbar. Different versions of the theme can be generated in order to have different floating windows in different courses.
As a drawback the floating block is the same in all the course activities.
But for us it was a plus no to change a single line of existing php code in Moodle, as this solves the problem of maintenance, and upgrades of Moodle.
The tool works well with mozilla firefox (1.0.6) and IE (6.0) some small resizing isues are still present in Safari (but we could not get any volunteer to help us with this)
Attachment language_tool.JPG
In reply to Joan Codina Filba

Re: Moodle floating "block"/toolbar released--HOW TO ADD FEED?

by Bhupinder Singh -

Hi  Joan ,

A great Functionality.

I managed to get the Language bar up and installed.

ABle to configure it. with WIKI

Can we use this with a dictionary ??

Can there be mutiple search optionss simultaneously??

Garry 

In reply to Bhupinder Singh

Re: Moodle floating "block"/toolbar released--HOW TO ADD FEED?

by Joan Codina Filba -
The floating block uses Ajax technology, this means that it asks extra data to the server depending on the operations done by the user (in this case search for word definitions or translations)
For security reasons your browser only allows the javscript to ask for extra data to the server who delivereded the page is browsing.
So internally there is a page located at  $MODLEROOT/theme/languatetool/words.php:
<?php

 $word=$HTTP_GET_VARS["word"];
 $word=trim($word);$word=trim($word,",:;.");

 include("http://en.wiktionary.org/w/index.php?title=$word&printable=yes")
 //include("http://thetis.bl.uk/cgi-bin/saraWeb?qy=$word")
?>
where only need to change the include's parameter by the address where the word must be search.

In reply to Josep M. Fontana

Re: Moodle floating "block--PATCH FOR GRADES & ASIGNMENT --PROBLEM

by Bhupinder Singh -

Hi Josep M. and Joan,

Your patches are great and I recommed it to all.

I am new to the code side and need your help to install the same.

Can you advise how I should upgrade in Windows environment.

Where should i place the patch . I do not know how to run a poatch upload commandsad.

You guidance shall be very nice.

Thanks

Garry  

In reply to Bhupinder Singh

Re: Moodle floating "block--PATCH FOR GRADES & ASIGNMENT --PROBLEM

by Joan Codina Filba -
I'm glad you like our simple tools.
The best way to use and apply patch's is using cvs.
I use to develop and make the patches using Eclipse (the same tool for different programming languages and OS). It toke me some time to get connected to the right branch of moodle but once you do it then you just simply update the project every time.
Thus...
First you should install eclipse www.eclipse.org
then connect to the moodle cvs repository, see image below
  1. Window->Show View->Other. Select CVS->CVS Repositories.
  2. Context Menu->New->Repository Location...
  3. Fill in the location information identifying your repository and click Finish.
  4. Expand the newly-created repository location.
  5. Add the branch:
    1. right click on it and expand configure branches and versions
    2. Expand HEAD and select the project moodle.
    3. Context Menu->Configure Branches and Versions...
    4. In the "Browse files for tags" table, select one or more files that contain tags you would like to see (for example scroll down to find config.php).
    5. On the right the existing tags will appear.
    6. select the tags: for example MOODLE_15_STABLE
    7. Click "Add Selected Tags".
    8. Click "OK".
  6. locate branches, MOODLE_15_STABLE, moodle MOODLE_15_STABLE.
  7. Context Menu->Check Out As Project.

The project now exists in your workspace.

to apply the patch
  1. Select the changed project in the Navigator or other view.
  2. Context Menu->Compare With->Patch...
  3. Fill in the location of the patch file
  4. Click Next. A summary of changed files will appear.
  5. Click Finish. The changes are now merged into the workspace.

Now the project has the code with the patch. And you can also upgrade the project to the new releases of moodle.

Hope this helps.

Joan
Attachment cvs.jpg
In reply to Joan Codina Filba

Re: Moodle floating "block--PATCH FOR GRADES & ASIGNMENT --PROBLEM

by Bhupinder Singh -

Joan,

Thanks a lot shall follow your advise and let you know after completing it.smile

Garry

In reply to Josep M. Fontana

Re: Moodle floating "block"/toolbar released

by Nir Banerjee -

Hello,

I was checking the site http://parles.upf.es/TEST/course/view.php?id=2 and the block is a fixed block now.

Is there any way to download that block. I could not find that anywhere.

Thank you

Nir

In reply to Nir Banerjee

Re: Moodle floating "block"/toolbar released

by Joan Codina Filba -
Our test site, is that: a test site, so we use it for teachers who are testing moodle,to test  blocks and other utilities that we find useful, before adding them to our production site, and other stuf..
So, you are right, the floating window was lost. Now it's back again.
You can test it, in this course
http://parles.upf.es/TEST/course/view.php?id=2
and you can download it from here
http://parles.upf.es/TEST/mod/resource/view.php?id=91
In reply to Joan Codina Filba

Re: Moodle floating "block"/toolbar released

by Nir Banerjee -

Hello Joan,

Thank you very much for the reply, yes I have downloaded the files, and it works great !

I have seen you have a standard block for the same purpose as well.

In my work, I am planning to have both, exactly the way its there in your test site, few pages I would like to display this as floating block, and some pages I want it to appear as a standard block.

I have modified the respective pages where I want the floating block to come, I have removed the block displaying code from header and adding the same for the pages in which I want this to display. And it works perfectly fine!

But I dont have the standard block files, Is it possible to get the block files as well? I see the block is called 'translate block'?

Thank you and Regards

Nir

In reply to Nir Banerjee

Re: Moodle floating "block"/toolbar released

by Joan Codina Filba -
The floating block was attached to the course theme, and then it appears where the theme is present
If you attach it to individual pages then you need to modify the pages and this is what we didn't want to do as then there is a maintenance problem. Every time you update moodle you need to do this through cvs, and check that there are no collisions.

The block that is used for translations.... blush I did not made the code public as it needs a bit of makeup.  I wanted also to use it more properly with the dictionary I'm using in order to be able to reproduce the selected word. But I don't have enough time. Maybe I'll suggest to my students to do it ...

If you can wait for it, I can send it "as is " ...
Joan
In reply to Joan Codina Filba

Re: Moodle floating "block"/toolbar released

by Nir Banerjee -

Hello Joan,

Thank you for the response. smile

Your comment on attaching the floating toolbar in different pages is compleetly right, that everytime I need to check after the update. I am seeing how to avoid that.

In the floating block for translation, I am using one class which translates using google language tool, and it works fine so far.

If you can send me the block in as is condition and allow me to do the makeup, that saves time and we can have a complete block which can be again reused.

Thank you & Regards

Nir

In reply to Joan Codina Filba

Re: Moodle floating "block"/toolbar released

by Cory B -
Hi Joan,

Could you send me the block as you have it now? I'de like to take a look at it as well.

Thanks,

-Cory
In reply to Cory B

Re: Moodle floating "block"/toolbar released

by Joan Codina Filba -
it works, but you need to add your own dictionary
As is done using Ajax, it can only call to a file in the same server, it calls words.php passing as a parameter the language to translate and the word. Words.php can then access to other sites, compute whatever and give the results back
In reply to Josep M. Fontana

Re: Moodle floating "block"/toolbar released

by Nicole Smith -

josep,

I am very interested in this block - is it still available as the links that you originally gave are now dead.

Thanks,

nicole