General developer forum

Skype Version of Moodle will be released today (with a little help)

 
 
Jens Gammelgaard
Skype Version of Moodle will be released today (with a little help)
 

Hello

I am almost done with a new user edit where you can write in your Skype name and in the view.php you can press an icon and actually skype the person behind the profile.

But it seems that in the edit.html the skypename is written skypename from this function: <td align=right><p><?php print_string("skypename") ?>:</td>. The result should be: Skype Name

What I am looking for is In which file are these names defined, so that fx. icqnumber is written "ICQ number" in the edit.html?

I will release the files and instructions later today if you can help me with with this.

Thank you!

BR
Jens

 
Average of ratings: -
Picture of Shane Elliott
Re: Skype Version of Moodle will be released today (with a little help)
Group DevelopersGroup Particularly helpful Moodlers
print_string('stringname') looks in lang/xx/moodle.php for the string 'stringname' where xx is your default site language.
If it is undefined there, it will look in lang/en/moodle.php.
And if it is undefined there it will print out stringname

There is an optional second parameter eg print_string('stringname', 'languagefile') where, if defined, it will look in languagefile.php instead of moodle.php. However the above rules still apply for retrieving the string value.

I'm looking forward to seeing the code.
 
Average of ratings: -
Jens Gammelgaard
Re: Skype integrated in Moodle is released today!
 

Hello Shane and fellow Moodlers!

Thanks! I chose to set in the parameter in the lang/en/moodle.php, so I only have to do it once, no matter the language!

I have attached a zip file with all the files, that I have added the lines below to. My experience is that you can upload and replace them to your own moodle installation and it will work, if you remember to add the field in the mdl_usertable, but it is with no warranty and guarantee!

Feedback and testing will be appreciated and if it works then maby Martin D. or some one else will add it to the future Moodleversions. Maby someone else can make some kind of sql-module that will add the skype field to mdl_user table..?

In order to make Moodle Skype Compatible I did the following:

1. I installed the MySQL Admin from the http://moodle.org/download/modules/ - look in bottom of the page.

2. I added a field called skype in the mdl_user table. See the picture in the word file in the attached Skype.zip

/>/>

3. I added these lines in the moodle/user/edit.html just above the ICQ row:

<tr valign=top>

<td print_string("skypename") ?>:</td>

<td><input type="text" name="skype" size="25" maxlength="30" value="<?php p($user->skype) ?>" >

<?php if (isset($err["skype"])) formerr($err["skype"]); ?><br>

</td>

</tr>

4. I added these lines in the moodle/user/view.php:

if ($user->skype) {

print_row("SKYPE:","<a href=callto:\"$user->skype\"> <img src=\"\" border=0></a>"); }

5. I added these lines in the lang/en/moodle.php on line 587:

$string['skypename'] = 'SKYPE name';

This is how it the view will look like - and Skype users call each other by clicking on the Skype me! image: See the word file in the attached Skype.zip

Happy Skyping!

BR
Jens Gammelgaard

 
Average of ratings: -
Jens Gammelgaard
Re: Skype integrated in Moodle is released today!
 

Hello,

I would like to show you a picture of the view.php, as it looks like if your user has entered a skype name in the profile edit page. With Skype users can call each other for free PC-PC, MAC-MAC, PDA-PDA or PC<->PDA.


 
Average of ratings: -
Picture of Melissa Anderson
Database Insert?
 
I am trying out your directions in order to add a zip code field to the user data, but I'm running into trouble because the data is not being inserted into the database. Here's what I've done, step-by-step:

1) I created the database field zipcode in the mdl_user table:
 Field     Type         Null  Default
zipcode varchar(12) Yes  NULL
I wanted to leave room for the zip + 4 in US postal codes which includes a dash, so I made it a 12 character varchar.

2) I put the following in user/edit.html

<tr valign=top>
<td align=right><p><?php print_string("zipcode")?>:</td>
<td><input type="text" name="zipcode" size="12" maxlength="12"
value="<?php p($user->zipcode) ?>">
<?php if (isset($err["zipcode"])) formerr($err["zipcode"]); ?>
</td>
</tr>


3) And the following in user/edit.php :

if (empty($usernew->zipcode))
$err["zip"] = get_string("missingzipcode");

This worked, making zipcode a required field with an error message. I eventually commented it out because it's not necessary to require it.

4) And the following in lang/en/moodle.php:

$string['zipcode'] = 'Postal Code';
$string['missingzipcode'] = 'Postal Code is a required field.';

5) I put the following in user/view.php:

if ($user->zipcode) {
print_row(get_string("zipcode").":", "$user->zipcode");
}

I didn't initially alter user/view.php because I won't be displaying the data there, but then I decided to try to be consistent with what you've done until I get this working.

6) I tested that the variable was being set by echoing it back on the page
and not filling out the required City field. It was displayed as I expected.

<? echo("Zip: " . $zipcode); ?>

It appears that everything is in order except data is not being inserted into the database.

 
Average of ratings: -
Picture of Melissa Anderson
Re: Database Insert?
 
Doh! I had installed moodle with postgres, but since not all the modules work, I installed a second instance with mysql. I edited the mysql database instead of the postgres.blush

Amend the above to say, with the postgres monitor type:
 alter table mdl_user add zipcode varchar(12);

So then, thanks for your directions, which worked quite well!
 
Average of ratings: -
Jens Gammelgaard
Re: Database Insert?
 

Hi Melissa!

Thanks, for your reflections!

I am sure it will help a lot in the long run wink

It was interesting to hear about your experiences, and you are right, my directions can very well be used as a guideline for extending Moodle with new fields and views.

So until 1.5, when it seems to be possible to make an arbitrary field in Moodle then feel free reflecting and implementing on this issue.

BR
Jens Gammelgaard

 
Average of ratings: -
Picture of Penny Leach
Re: Database Insert?
Group Developers
What problems did you see with Postgres? Did you file a bug report?
 
Average of ratings: -
Picture of Melissa Anderson
Re: Database Insert?
 
I was unable to create Surveys or Questionnaires. When I checked the forums, it appeared that whatever support might come for the questionnaire module was already on its way, so I did not file a report.
 
Average of ratings: -
Picture of Tony Hursh
Re: Skype integrated in Moodle is released today!
 
Nice mod, Jens. As it happens, one of our professors has his class working with Skype this semester (along with other forms of CMC), so this was very welcome.

 
Average of ratings: -
Jens Gammelgaard
Re: Skype integrated in Moodle is released today!
 

Thank you Tony!

I am glad you and your professors could get the use of it... Just a bit before the 1.5 version is ready, right Martin D.? smile

I have integrated this mod in a hospitals Moodle, so hopefully they can cut down on the phone bill and spend the money on caretaking...

BR
Jens

 
Average of ratings: -
Picture of Greg Szczotka
Odp: Re: Skype integrated in Moodle is released today!
 
Good work approve
 
Average of ratings: -
Picture of Robert Lefebvre
Re: Skype integrated in Moodle is released today!
 
When I click on the "Skype Me" button I get the error "call to is not an accepted protocol".

"Call to" is from the code added at #4

 I added these lines in the moodle/user/view.php:

if ($user->skype) {

 print_row("SKYPE:","<a href=callto:\"$user->skype\"> <img src=\"\" border=0></a>"); }

 
Average of ratings: -
Me and Ray
Re: Skype integrated in Moodle is released today!
 
Dear Robert,
You do have Skype installed don't you? For callto: to be recognised all you should need is for skype to be installed. What happens when you click Skype me?
Timothy
 
Average of ratings: -
Picture of Robert Lefebvre
Re: Skype integrated in Moodle is released today!
 
Wow did I goof! I was using win 98 at the time and Skypes isn't installed(it won't run in 98). Thanks for the reply. Good call!
 
Average of ratings: -
Jens Gammelgaard
Re: Skype integrated in Moodle is released today!
 

Hi Robert!

I think you have overseen the same lines as you write in your post in my instruction, but I am glad you solved it anyway!

BR
Jens Gammelgaard

 
Average of ratings: -
Picture of Robert Lefebvre
Re: Skype integrated in Moodle is released today!
 
Yes, it works great and was an excellent addition. Thank you smile
 
Average of ratings: -
Martin in black and white
Re: Skype Version of Moodle will be released today (with a little help)
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Moodle 1.5 now has fields and support for ICQ, Skype, AIM, Yahoo, MSN as well as Moodle Messenger.  smile
 
Average of ratings:Useful (1)
Picture of Don Hinkelman
Re: Moodle Messenger?
Group Particularly helpful Moodlers
          "Moodle 1.5 now has fields and support for ... Moodle Messenger."

Moodle Messenger?  wide eyes   So I will need to choose an "MM" name?  thoughtful

 
Average of ratings: -
Martin in black and white
Re: Skype Version of Moodle will be released today (with a little help)
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
It's automatically done for you.  smile   Everybody's called Bruce - that keeps things simple.
 
Average of ratings: -
Picture of Don Hinkelman
Re: Skype Version of Moodle will be released today (with a little help from Bruce)
Group Particularly helpful Moodlers
Please, turn off the auto-Brucer!   dead
 
Average of ratings: -
Martin in black and white
Re: Skype Version of Moodle will be released today (with a little help from Bruce)
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
I am sooooooo tempted to put in a three line filter to convert random words here to Bruce.  smile
 
Average of ratings: -
Picture of Chardelle Busch
Re: Skype Version of Moodle will be released today (with a little help from Bruce)
Group Developers
You guys are funny...kiss
 
Average of ratings: -
Picture of Greg Szczotka
Odp: Re: Skype Version of Moodle will be released today (with a little help)
 

I have 1.5 and I can't see it. Has it been just added? How can I safe update moodle to have it?

Regards,

Greg

 
Average of ratings: -
Martin in black and white
Re: Odp: Re: Skype Version of Moodle will be released today (with a little help)
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
This was just added today.
 
Average of ratings: -
Picture of Hansruedi (Lori) Lorenz
Re: Skype Version of Moodle will be released today (with a little help)
 
Skype works great with broadband, however with a slow dialup connection it is next to useless. I found the Australian FireFly working really well with a slow connection and wonder whether it could be integrated in Moodle?
Lori
 
Average of ratings: -
Picture of N Hansen
Re: Skype Version of Moodle will be released today (with a little help)
 
Skype in my experience, both in Egypt and the US, works absolutely wonderfully on a slow dialup connection. It's like talking to someone in the same room.
 
Average of ratings: -
Picture of Haisen Zhang
回复: Re: Skype Version of Moodle will be released today (with a little help)
 
Yeah, you're right. I have had a similar experience in using Skype. When I was in the United States as a visiting scholar, I used Skype as a medium to advise my students to improve their theses via Skype. Though we stayed on both sides of the Pacific Ocean, we talked as if we were in the same room. The experience of using Skype is really fascinating.
 
Average of ratings: -
Martin in black and white
Re: Skype Version of Moodle will be released today (with a little help)
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
I too have only had good experiences with Skype even on slow connectiosn.

But if Firefly has a capability for callto: links like Skype does then integrating it yourself is trivial, you could hack your user/view.php file to change how the Skype entry is displayed so clicking on the link calls Firefly instead.
 
Average of ratings: -