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

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

بواسطة - Jens Gammelgaard
عدد الردود: 28
صورة Translators

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

متوسط التقييمات: -
رداً على Jens Gammelgaard

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

بواسطة - Shane Elliott
صورة Core developers صورة Plugin developers
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.
رداً على Shane Elliott

Re: Skype integrated in Moodle is released today!

بواسطة - Jens Gammelgaard
صورة Translators

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

رداً على Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

بواسطة - Jens Gammelgaard
صورة Translators

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.

المرفق View.png
رداً على Jens Gammelgaard

Database Insert?

بواسطة - Melissa Anderson
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.

رداً على Melissa Anderson

Re: Database Insert?

بواسطة - Melissa Anderson
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!
رداً على Melissa Anderson

Re: Database Insert?

بواسطة - Jens Gammelgaard
صورة Translators

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

رداً على Melissa Anderson

Re: Database Insert?

بواسطة - Penny Leach
What problems did you see with Postgres? Did you file a bug report?
رداً على Penny Leach

Re: Database Insert?

بواسطة - Melissa Anderson
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.
رداً على Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

بواسطة - Tony Hursh
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.

رداً على Tony Hursh

Re: Skype integrated in Moodle is released today!

بواسطة - Jens Gammelgaard
صورة Translators

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

رداً على Jens Gammelgaard

Re: Skype integrated in Moodle is released today!

بواسطة - Robert Lefebvre
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>"); }

رداً على Robert Lefebvre

Re: Skype integrated in Moodle is released today!

بواسطة - Timothy Takemoto
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
رداً على Robert Lefebvre

Re: Skype integrated in Moodle is released today!

بواسطة - Jens Gammelgaard
صورة Translators

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

رداً على Jens Gammelgaard

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

بواسطة - Martin Dougiamas
صورة Core developers صورة Documentation writers صورة Moodle HQ صورة Particularly helpful Moodlers صورة Plugin developers صورة Testers
Moodle 1.5 now has fields and support for ICQ, Skype, AIM, Yahoo, MSN as well as Moodle Messenger.  مبتسم
رداً على Martin Dougiamas

Re: Moodle Messenger?

بواسطة - Don Hinkelman
صورة Particularly helpful Moodlers صورة Plugin developers
          "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
المرفق MM.jpg
رداً على Don Hinkelman

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

بواسطة - Martin Dougiamas
صورة Core developers صورة Documentation writers صورة Moodle HQ صورة Particularly helpful Moodlers صورة Plugin developers صورة Testers
It's automatically done for you.  مبتسم   Everybody's called Bruce - that keeps things simple.
رداً على Martin Dougiamas

Re: Skype Version of Moodle will be released today (with a little help from Bruce)

بواسطة - Don Hinkelman
صورة Particularly helpful Moodlers صورة Plugin developers
Please, turn off the auto-Brucer!   dead
رداً على Don Hinkelman

Re: Skype Version of Moodle will be released today (with a little help from Bruce)

بواسطة - Martin Dougiamas
صورة Core developers صورة Documentation writers صورة Moodle HQ صورة Particularly helpful Moodlers صورة Plugin developers صورة Testers
I am sooooooo tempted to put in a three line filter to convert random words here to Bruce.  مبتسم
رداً على Martin Dougiamas

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

بواسطة - Greg Szczotka

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

رداً على Martin Dougiamas

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

بواسطة - Hansruedi (Lori) Lorenz
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
رداً على Hansruedi (Lori) Lorenz

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

بواسطة - N Hansen
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.
رداً على N Hansen

回复: Re: Skype Version of Moodle will be released today (with a little help)

بواسطة - Haisen Zhang
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.
رداً على Hansruedi (Lori) Lorenz

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

بواسطة - Martin Dougiamas
صورة Core developers صورة Documentation writers صورة Moodle HQ صورة Particularly helpful Moodlers صورة Plugin developers صورة 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.