General plugins

 
 
Picture of mohamed alsharaf
New Plugin "Global Message"
 

Hello everyone,

I have recently developed my first Moodle plugin Global Message. I have added the plugin into the Modules and Plugin area.

The plugin enables a Moodle administrator to create automatic pop-up messages to appear for the users depending on the rules applied to each message.

All feedback is welcomed.

 

Thanks in advance

Mohamed

 
Average of ratings:Useful (4)
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

It looks great. You did a good work.

Is there any option to use with the html standar editor?

Thanks in advance

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks.

Currently it does not work with the standard html editor. But If I got some free time, I will work on this issue.

Cheers

Mohamed

 
Average of ratings: -
Picture of sonali bhadauria
Re: New Plugin "Global Message"
 

hey wat is d backend requird for this pluggin?? do we need ajax??

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi sonali

It works in Postgres and MySQL database.

Ajax is not something to install. It is part of any browser (i.e. internet explorer, Firefix, Chrome, Safari, etc...).

Javascript must be turn on in your browser. It is by default, unless you have turned off.

Mohamed

 
Average of ratings: -
Picture of William Mair
Re: New Plugin "Global Message"
 

Mohamed,

I have installed this but it does not allow me to save anything.

I have tried to create a deisgn, whcih does work when clicking on the Show/Hide Design button, but get a warning message saying "Message Design could not be saved. Please try again." when trying to save (several times).

Also, when trying to create a message, I cannot type anything in the standard WYSIWYG window (never mind the HTML editor), but I can in the extended WYSIWYG. However, when I return to the standard WYSIWYG window there is nothing there (but is viewable in the HTML editor window). Again I cannot save this as it sees nothing in the Description box.

Any help with this would be greatly appreciated.

Thanks

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi William

Currently it does not work with the standard html editor. But when I have some free time I will fix this issue.

For the error you are getting, turn the debuggin (Administration > Server >Debugging). select the developer option and debug display yes. Then refresh the plugin page and tell me if you see any error message at the top.

It might be that the extension tables are not installed.

 

Cheers

Mohamed

 
Average of ratings: -
Picture of William Mair
Re: New Plugin "Global Message"
 

It was that the tables were not installed. Any suggestions?

I've tried adding your updated version, but the documentation still points to being the original version, so not sure if I have the new version or not, but I still have the same issue (which gives the impression that it's still the old version)

Thanks

 
Average of ratings: -
Picture of Ian McNaught
Re: New Plugin "Global Message"
 

I have the same problem. The installation script runs, and doesn't report any errors (even in debug mode), but it doesn't generate any tables. Do scripts in /local even have permission to create db tables? I thought they could just add/update columns on existing tables.

Great looking plugin though, I've been wanting something like this for a while, and just today sat down thinking I'd have to create it myself, when I came across yours. Does everything I wanted, and more. Hope I can get it working now!

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Yes you can create tables from /local/ just follow the installation steps in the readme.txt

1. add the following code into /loca/db/upgrade.php

if ($result && $oldversion < [new version]) {

include_once $CFG->dirroot . '/local/globalmessage/lib/base.php';

$result = moo_globalmessage::install($db);

}

2.Increase local version number in /local/version.php

3. Copy the new version into [new version] in step 1.

4. Go to the notifications page to install this plugin.

Readme.txt has more details on how to install the module.

 
Average of ratings: -
Picture of Ian McNaught
Re: New Plugin "Global Message"
 

Thanks for your reply. I'd followed all the instructions on the readme first time though. I was installing for the first time, not upgrading. I ran the script on the notifications page, and it appeared to work (no errors), but no tables were created.

Just tried copying that code in, I increased the version number from 2011032201 to 2011032205 and copied that into the [latest version] place holder, but nothing shows up on notifications page and tables remain uncreated. Any chance of a SQL dump of the required table structure so I can get going with this while the install side of it is ironed out?

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hmmm. Maybe your database account in config.php does not have the permission to create the tables.

I have tested this module using Mysql and PostgreSql. Also, I have installed it in 3 different Moodle instances. I cannot see any problem with the instlation. Anyway here are the queries you need to create the module tables.

CREATE TABLE mdl_globalmessages ( id BIGINT(10) unsigned NOT NULL auto_increment, name VARCHAR(255) NOT NULL DEFAULT '', summary VARCHAR(255) DEFAULT NULL, description LONGTEXT NOT NULL, created BIGINT(11) unsigned NOT NULL, modified BIGINT(11) unsigned NOT NULL, status TINYINT(2) unsigned NOT NULL DEFAULT 0, design BIGINT(10) unsigned DEFAULT NULL, CONSTRAINT PRIMARY KEY (id) );


CREATE TABLE mdl_globalmessages_designs ( id BIGINT(10) unsigned NOT NULL auto_increment, name VARCHAR(255) NOT NULL DEFAULT '', height BIGINT(10) unsigned NOT NULL DEFAULT 400, width BIGINT(10) unsigned NOT NULL DEFAULT 400, bgcolor VARCHAR(100) DEFAULT NULL, bgimage MEDIUMTEXT, bgimageposition VARCHAR(255) DEFAULT NULL, bgimagerepeat VARCHAR(50) DEFAULT NULL, bordersize BIGINT(10) unsigned NOT NULL DEFAULT 0, bordercolor VARCHAR(100) DEFAULT NULL, bordershape VARCHAR(50) DEFAULT NULL, padding VARCHAR(255) DEFAULT NULL, innerpadding VARCHAR(255) DEFAULT NULL, CONSTRAINT PRIMARY KEY (id) );


CREATE TABLE mdl_globalmessages_rules ( id BIGINT(10) unsigned NOT NULL auto_increment, construct VARCHAR(10) NOT NULL DEFAULT '', leftside VARCHAR(255) NOT NULL DEFAULT '', operator VARCHAR(10) NOT NULL DEFAULT '', rightside VARCHAR(255) NOT NULL DEFAULT '', message BIGINT(10) unsigned DEFAULT NULL, CONSTRAINT PRIMARY KEY (id) )

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi,

I think something is missing out in the zip file. I have installed the pluging in another Moodle site and it doesn't create any table. I did it with phpmyadmin.The db has the righ permissions.

It seems that an sql or xml file is not in the right folder or the code. Can you check it?

Thanks again.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I have checked the plugin code. Everything in the right place.

Check the installation steps, you might have files in wrong place. Make sure that you have the following files.

1. /local/settings.php

2. /local/db/upgrade.php

3./local/version.php

Cheers

 
Average of ratings: -
Picture of roman jaimes
Re: New Plugin "Global Message"
 

In the folder for the Moodle 1.9 version is not db subdirectory. follow the installation instructions but I did not create tables. help

 
Average of ratings: -
Picture of Konrad Lorinczi
Re: New Plugin "Global Message"
 

Using Moodle v1.9, plugin version v1.4.1.

The problem is with the db installation, that the readme file writes this:

    a. If the file does not exist, then
        - Copy the file /local/globalmessage/upgrade.php into local/db/
        - Copy the file /local/globalmessage/version.php inot local/db/

Note, that you wrote, that user needs to copy /local/globalmessage/version.php inot local/db/

This is not working. Tables are not created.

If I copy version.php into /local/version.php, then tables are created.

 

Please fix this in the readme file.

 
Average of ratings: -
Picture of Konrad Lorinczi
Re: New Plugin "Global Message"
 

Using Moodle v1.9.13, plugin version v1.4.1.

There is also a bug in the plugin.

In the mdl_globalmessages_rules table, the 'rightside' field content is not always saved, resulting an empty field.

This happens when I create a condition (between 2 dates):

1 IF Date Greater than or equal to saturday, 2 february 2013  
2 AND Date Less than or equal to tuesday, 5 february 2013

 Please test creation of this condition, and check the values of the 'rightside' field.


Also note, that the plugin is not displaying any messages, if there is no rule created. I think messages should be displayed even, if there is no any rule created.

Please fix these bugs.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks for reporting this typo error.

About the other 2 bugs:  

1. Unsaved rules when selecting range dates. I'm unable to replicate it.

2. No message displaying, if there are not rules created.  This is not a bug. This is how the plugin works. If you want to display message in all pages, you can add the following rule:

IF         Course         Greater than or equal to        0

Cheers

Mohamed

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Check that you have the following code in /local/db/upgrade.php

if ($result && $oldversion < [new version]) {

include_once $CFG->dirroot . '/local/globalmessage/lib/base.php';

$result = moo_globalmessage::install($db);

}

And then,  increase local version number in /local/version.php

Also, copy the /local/globalmessage/settings.php into /local/

Hope this help you to install the module

 
Average of ratings: -
Ghost
Re: New Plugin "Global Message"
 

HI Mohamed,
I got the same problem, when trying to create new design, got the same message - "Message design could not be saved. Please try again". If you have any suggestions that can help.

Thanks

Ali

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Ali

Take the same steps as other people done.

  1. check your database if you have the 3 database tables.
  2. if table does not exists, you can use the sql queries above to create them.
  3. if you have the tables, then you need to investigate the AJAX request.
  • Use Firefox
  • Install add-on firebug
  • open firebug console
  • create a message and click submit
  • the console will show you the request
  • click on the link to expand the details and select response tab
  • take a screenshot and send it to me. (Note: I might be able to help you then if the response contains informative error message from the server)
 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

There is a new version for this module. I have fixed the issue with Moodle standard html editor.

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Thank you very much!

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi,

When I'm going to write a new message the frame is too small and I cannot risize it. It's a theme problem because if I change to a standar theme it's ok. How can I solve that? Where? (scrolls?) See picture.

By the way, If you don't mind and noneone else do it, I'll translate into Spanish.

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

To enable scrolls open /local/globalmessage/assets/css/styles.css

Add this to the bottom of the fille

.yui-skin-sam .yui-panel .bd {

height: 300px; /*change the value to anything you like*/

overflow: auto;

}

You are welcome to make the Spanish translation.

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Thanks again, it works nice.

But now when I send a message I've got this screen

 

I'm working in my pc as localhost, Ubuntu Linux, 10.04 and Moodle 1.9.10+

Where do you think I did a mistake?

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thats because the loader dialog uses the same class name as the message and design dialog.

To fix this replace what I have posted before with the following:

#gm-create-message-dialog .bd, #gm-design-message-dialog .bd {

height: 300px; /*change the value to anything you like*/

overflow: auto;

}

The above will limit the css to only message dialog and design dialog.

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi, Thanks again.

I fixed it as you told me but it didn't work as it supossed to be.

So I have installed Moodle, a clean instalation is a server, Moodle 1.9.11+ and Debian 5.0.8 but I have the same issue, well it's a shorter screen but still waiting something.

Thanks.

waiting

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Can I have access to your Moodle instance to check what is going wrong? If you can't, what browser do you use?

If possible install Firefox, and install the add-on firebug. Open firebug console (click on the bug icon from bottom left corner of the browser) and then try to submit a message. Send me a screenshot of the content outputted in the console.

screenshot - firebug

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Thanks, again

I tried with Chrome and it worked ok, then I went to Firefox again I opened Firebug and check everything, I tested and now it's working perfectly in Firefox. So, It's working.

I send you a Spanish translation of the interface. But the 'about' thing it's not under the lang folder so I cannot send a translation without changing that file. Would you like to consider to put it under /lang/en_utf8/ (/lang/es_utf8)?

/local/globalmessage/index.php?action=about&id=1

 

 

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thats good it is working smile

Thanks for the translation.

When I have some free time, I will move the content of the about page into the lang file. I will let you know when I am done by posting in this forum.

Cheers

Mohamed

 
Average of ratings: -
Picture of Ian McNaught
Re: New Plugin "Global Message"
 

I had the same problem, and it was because of the console.log line in your javascript. In firefox, if you have firebug installed, but not activated, the script stalls at this point. I removed all console.logs and it started working.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks! I will check all of the javascript files and remove console.logs

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi, after upgrading  'Global Message" I have an error. Here is the firebug screen.

Thanks again

 

firebug

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi

The plugin works fine I have tested in two different servers. However, the console output in your screenshot does not look right. There are a lot of white spaces at the top of the response string.

The error is caused by string printed before the JSON code {"id": "1" ....}

Here is what you can do to debug your copy of the plugin.

1. Open the file /local/globalmessage/controllers/index.php

2. Scroll to the method "editrules_action"

3. Remove the following code:

if (!$this->is_ajax()) {            
die;        
}

4. Turn debuggin on Server > Debugging > Debug messages (select developer)

5. Set Display debug messages to Yes

6. Then open /local/globalmessage/index.php?action=index/editrules&id=1

Now you should see what has been printed before the JSON code and what is causing the problem.

Hope this helps

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Ok, thank you

Don't worry so much. I discovered that the problem was in my theme, it has got some java stuff or css fighting with the pluging. I will check the whole theme.

I tested with a different theme and in a different server and it works fine.

 
Average of ratings: -
Picture of Paullo Abreu
Re: New Plugin "Global Message"
 
Dear Mohamed, thanks for the plug in. Very good idea. I'd like specific users to get specific messages before they go to any course. I thought that setting up a rule including that user's id would do the trick, but nothing happens. It could be that I'm using the wrong user id (I get it by dragging the mouse over the user's name link) or the rule is wrong. The rule is being written like this: F User ID Equal 2648 It works with course id. Can you help? Cheers!
 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I think I should change the lable from User ID to Username.

At first I used user ID but then I thought users might find it hard to know what is a user ID, so I changed the rule to use the username.

If you want to use the user ID not user name, you can create custom rule easily. Go to Global Messge Info > Custom Rule for the steps.

Here is a class rule for the user ID

defined('INTERNAL_ACCESS') or die;

class moo_globalmessage_model_rule_myuserid implements moo_globalmessage_model_rule_ruleinterface {

    public function validate()
    {
       // validation logic
       global $USER;
       if ($USER->id == 2648) {
          return 'true';
       }
       return 'false';
    }

    public function get_name()
    {
        return 'User ID Number';
    }

    public function get_keyname()
    {
        return 'myuserid';
    }
}
 
Average of ratings: -
Picture of Tyrone Davies
Re: New Plugin "Global Message"
 

Is this compatible with Moodle 2.0?

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

No, but I am working on it. It is not going to be available any time soon because I am so busy that I don't have free time to work on it.

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi,

Last translation into Spanish for version 1.1.1

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

There is a new version for this module. Includes Spanish translation from Nacho Aguilar.

 
Average of ratings: -
Picture of Joachim Vogelgesang
Re: New Plugin "Global Message"
 

Hi Mohamed,

in my 1.9.12 test environment everything is working well except the displayed message form (even with 400x400 not showing borders nor background color and text ever in one column).

(I´ve nearly finished German translation)

Joachim


 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Joachim

I have installed 1.9.12+. The plugin work fine. Can you please post a screenshot of the design form.

It might be that you have entered incorrect color name, which resulted in border and background to not showing. Or, there might be a conflic with the message box styles and your Moodle theme. You can use Firebug (Firefox add-on) to inspect the message box html elements/styles.

Cheers

 
Average of ratings: -
Picture of Joachim Vogelgesang
Re: New Plugin "Global Message"
 

Hi Mohamed,

I´ve tried with other themes too, but same effect. It shows 'Design details saved' ...

But Firebug shows: ... <div id="gm-message.popup" style="width: 0px; height: 0px; display: block; ... and later: background: url("http://localhost:8888/moodle/lib/yui/assets/skins/sam/sprite.png") ...

Tks,

Joachim


 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Joachim

I cannot see what may be wrong. It could be that the PHP version you have is different than the versions I have tested the plugin with. Do you know what is the PHP version?

I have made some modifications to the view class that might help you. Can you please replace the attached file (view.php) with the one you have in /local/globalmessage/lib/view.php

Hope this would solve the problem you have.

Cheers

 
Average of ratings:Useful (1)
Picture of Joachim Vogelgesang
Re: New Plugin "Global Message"
 

Bingo!

That was it - now working very well. BTW my php version is 5.3.2.

Pls give me 2 days or 3 for completion German translation - still having another construction zone.

Thanks for help!

Joachim

 
Average of ratings: -
Picture of Joachim Vogelgesang
Re: New Plugin "Global Message"
 

globalmessage/lang/de_utf8

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks for the translation.

 
Average of ratings: -
Picture of felipe camboa
Re: New Plugin "Global Message"
 
Translation for Portuguese/Brazil pt_br_utf8.rar Can be opened by Winzip
 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks for the translation.

 
Average of ratings: -
what the hell you looking at ? haha
Re: New Plugin "Global Message"
 

salam alikom

i don't know how to make this plugin send a message to new students who didn't enroll in any course for  let's say 10 days ? to say something like please enroll in a course.

ALAH ma3ak

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi John

Install the new version 1.4.1. I have just found and fixed a bug related to the date rule!

I have attached a plugin that will do what you want. Just add it to the rule plugin folder '/local/globalmessage/models/rule/newstudent.php'

To make the message available for only 10 days starting Wednesday, 1 June 2011, the rules should be:

1. IF  New Student Equal true

2. AND Date Less than Saturday, 11 June 2011

 

Hope this helps

Mohamed

 
Average of ratings: -
what the hell you looking at ? haha
Re: New Plugin "Global Message"
 

thank you so much ya akhi

 
Average of ratings: -
what the hell you looking at ? haha
Re: New Plugin "Global Message"
 

salam brother, i am having a lil issue here. everything that you gave me worked fine! except that everytime the new users login they see that message ?  is there a way to see it only once ?

 
Average of ratings: -
Picture of Mark G
Re: New Plugin "Global Message"
 

hi - this looks like a great addition to our moodle. I cannot however save anything. this is the degugging message...I think I have done all the file edits correctly. It says a table doesn't exist - but I am pretty sure I made all the edits... what did I do wrong?

 

Table 'atp1011006573094.mdl_globalmessages' doesn't exist

SELECT COUNT(*) FROM mdl_globalmessages
  • line 686 of lib/dmllib.php: call to debugging()
  • line 379 of lib/dmllib.php: call to get_recordset_sql()
  • line 342 of lib/dmllib.php: call to count_records_sql()
  • line 33 of local/globalmessage/models/message.php: call to count_records()
  • line 36 of local/globalmessage/controllers/index.php: call to moo_globalmessage_model_message->count_messages()
  • line 53 of local/globalmessage/lib/controller.php: call to moo_globalmessage_controller_index->index_action()
  • line 13 of local/globalmessage/index.php: call to moo_globalmessage_controller->run()
Table 'atp1011006573094.mdl_globalmessages_designs' doesn't exist

SELECT * FROM mdl_globalmessages_designs ORDER BY id, name
  • line 686 of lib/dmllib.php: call to debugging()
  • line 609 of lib/dmllib.php: call to get_recordset_sql()
  • line 577 of lib/dmllib.php: call to get_recordset_select()
  • line 910 of lib/dmllib.php: call to get_recordset()
  • line 32 of local/globalmessage/models/messagedesign.php: call to get_records()
  • line 44 of local/globalmessage/controllers/index.php: call to moo_globalmessage_model_messagedesign->fetch_all_forlist()
  • line 53 of local/globalmessage/lib/controller.php: call to moo_globalmessage_controller_index->index_action()
  • line 13 of local/globalmessage/index.php: call to moo_globalmessage_controller->run()
 
Average of ratings: -
Picture of Mark G
Re: New Plugin "Global Message"
 

oh, and I made the version number 2011032205 in both upgrade and version.php

Was that the right thing to do?

 
Average of ratings: -
Picture of Mark G
Re: New Plugin "Global Message"
 

with firebug (consol) i get this error.

 

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Version number in local/ directory is not specific to a plugin. The number can be vary for different people. Just make sure the version number in  local/version.php is bigger than the previous number. And then open the notification page to install the tables.

The error messages you are seeing are because the plugin did not installed correctly.

Cheers

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi

I have updated the plugin (attached) to fit your requirements. I have not tested it, so before installing the plugin in live site tested it in development site.

Replace the attached file with the one you have and then, create user profile fields:

1. short name must be: readnewstudentmessage

2. Name: can be anything you like.

3. Is this field required? No

4. Is this field locked? Yes

5. Should the data be unique? No

6. Display on signup page? No

7. Who is this field visible to? Not visible

8. Checked by default: No

Hope this helps

 
Average of ratings: -
Picture of Sandeep Gill
Re: New Plugin "Global Message"
 

Hi Mohamed,

Does this work in moodle 2.0

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

No!

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Global Message 2 for Moodle 2 (Download).

This is a beta version

 
Average of ratings: -
Picture of Samone Conyers
Re: New Plugin "Global Message"
 

Mohamed,

Have you experienced issues with loading this plug-in onto an Oracle database?  I am attempting to and am running into alot of errors and issues.

 

Thanks

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I have tested the plugin with Postgresql and Mysql only. I don't use Oracle for my developments.

 
Average of ratings: -
Picture of J C
Re: New Plugin "Global Message"
 

I tried installing this on Moodle 2.0.4+ under mod directory and had some problems.

#1 When I unzipped it in the mod directory, it created a directory named ___MACOSX which interfered with installation (Admin, Notifications)

#2 After renaming the above directory to take it out of the configuration, I get the following message:

Plugin "mod_globalmessage" is defective or outdated, can not continue, sorry.

More information about this error

Debug info: Missing version value in version.php
Stack trace:
  • line 455 of /lib/upgradelib.php: plugin_defective_exception thrown
  • line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1427 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 311 of /admin/index.php: call to upgrade_noncore()
Can you offer any suggestions?
- John
 
Average of ratings: -
Picture of J C
Re: New Plugin "Global Message"
 

I fixed the install:

1. inside version.php, change '$plugin' to '$module' in both entries and added cron entry (see below)

$module->version  = 2010022403;
$module->requires = 2010080300;  // Requires this Moodle version $module->cron     = 0;           // Period for cron to check this module (secs)

2. Fixed the lang error by renaming the language pack.

/mod/globalmessage/lang/en

renamed 'local_globalmessage.php' to 'globalmessage.php'

 

Now it installs, but I cannot find the feature under frontpage or anywhere else?

Anyone else want to pick this up and help? I've never written or worked a mod, just following the error trail...smile

- John

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi

This is a local plugin not a mod (activity) plugin. To install it you have to place the folder "globalmessage' into /local/ directory.

From where you have downloaded the plugin zip file? from the new plugin database or the old one?

The version 2.0.0 (works in Moodle 2.0.0) in the new plugin database and the old one is a beta version  that has not been tested.

The version 2.0.1 (works in Moolde 2.1+ only) which you can find in the new plugin database.

Read the file readme.txt for more details on how to install the plugin.

Cheers

 
Average of ratings: -
Picture of J C
Re: New Plugin "Global Message"
 

I returned to delete my comments about reworking the files as I now see 'local' as the install directory, but see you commented already. Thanks!

When I read 'local directory' to me it means on your local computer. From habit, I just ignored that wording smile

Here is some helpful info for the beta:

1. Yes, I am using the downloaded version for 2.0 (beta, apparently)

2. After uploading the zip file to the server, /local directory and unzipping it, it creates a '__MACOSX' directory that must be deleted (else Moodle tries to install it and gives an error). This file should be removed from the zip file.

3. Once the '__MACOSX' directory is removed, go to Admin, Notifications and the upgrade screen comes up (with the currently installed plugins). Be advised, although Globalmessage will not be listed, after hitting UPGRADE button, it installs successfully !

4. Under SITE ADMINISTRATION, FRONT PAGE, Global Message will show as an option. It appears to be working in version 2.0.4+ but I won't know for sure if it displays the popup until users come on tomorrow.

So good news! So far, with that minor extra directory issue corrected (delete the '__MACOSX' directory), it installs and seems to function!

Now to see if it pops up the message for users.

Also- is there a way to restrict the message to only a certain profile? For example, to show certain messages only to Teachers, some only to Students, etc?

I really like this plugin and want to see it work. Thanks for making it!

I'll let you know tomorrow how it works with users.

- John

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi John 

Yes you can create different custom roles.

There is a specific section "Global Message Info" to show you how to create custom roles. It require PHP knowledge to do so.

Also, make sure you have the following code placed just before </body> tag in your theme file

 
<?php
include_once $CFG->dirroot . '/local/globalmessage/lib/base.php';
moo_globalmessage::show_message();
?>
 
Average of ratings: -
Picture of J C
Re: New Plugin "Global Message"
 

Sorry, can you tell me into which theme file? I don't know the theme structures yet smile

ETA{Never mind, I found your explanation in the readme.txt file and added it to the theme frontpage.php file}

About the roles- I wanted to use the roles already in the system, I don't need it custom. Or do you mean to add the capabilities of using roles? It would be nice to allow it to pull the role info from the configured roles in the system.

Thanks.

- John

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

ETA{Never mind, I found your explanation in the readme.txt file and added it to the theme frontpage.php file}

With this only pages that uses frontpage.php will have the plugin enabled. Other pages that uses standard.php file will not have the plugin enabled.

About the custom rules, I am not talking about Moodle core capabilities and roles. When you setup a message you define how, when, or for who to display the message from the "Edit Message Rules"

Example, If Course ID Equal to 3 then show message to current logged in user.

If you wan to show certain messages only to Teachers, some only to Students, etc, then you need to create custom rule. The details for creating the custom rule can be found in Global Message Info section > tab Custom Rules.

Cheers

 
Average of ratings:Useful (1)
Picture of Joni Seth
Re: New Plugin "Global Message"
 

This is a really nice plugin, thank you for creating it. Is it possible to give teachers access so that they could create messages for their classes? This is what we really need to be able to do with this great creation of yours. I see how to make the messages appear for only certain courses, but I want the teachers to be able to create their own messages, not to bother me every time they need to create one. Thank you.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks. Currently you can't but I will add it to my todo list for future version.

 
Average of ratings: -
Picture of John Ryan
Re: New Plugin "Global Message"
 

Great module -thank you.

I'm not sure how you get a message to only show once for a given user. Do I have to create a custom rule for this?  If so How?

Also, the message window has no indication to show how to close it, though when the mouse pointer is over the top right corner it changes and clicking does close the window. Is there some image missing?  I did find a reference to an image in

moodle/lib/yui/2.8.2/build/assets/skins/sam/sprite.png

which refers to an old yui2 library (moodle2.1 uses 2.9.0)

Thanks

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi John

Yes there is a close image. I will fix the plugin as soon as I can. thanks for that.

The message show once per user session. If you want it to show one time only, then you would need to create a plugin (the help section has the details on how to create it) and then you would need a table or somewhere to store the status of the message if it has been viewed by the user or not.

Cheers

 
Average of ratings: -
Picture of John Ryan
Re: New Plugin "Global Message"
 

Hi Mohamed,

Thanks for the help.

I am considering writing a new rule and would create a new table with userid and message id so that I coud add an entry when the user views it but how would I get the id of the current message?

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi John

I am not sure if I understood what you want.

But when a message viewed to a user the plugin record the message id in $USER->globalmessage. This holds an array of messages ids viewed by the logged in user.

You could loop this array and insert the message ids into your table.

Cheers

mohamed

 
Average of ratings: -
Picture of John Ryan
Re: New Plugin "Global Message"
 

Thanks Mohamed -that's just what I wanted.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

The missing image fixed in the new version 2.0.2

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi,

 

Thanks again for this wonderful plugin.

We have several moodle sites working quite well in different servers. We're still using Moodle 1,9,10+. In some of them the plugin works fine but in another one which it's in a different server (I thought I had the same configuration) it doesn't work. When I try to add a rule I have nothing. This is a screen with Firebug.

I'm lost. What can I do?

Thaks in advance

 

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Nacho

There is white space at the top of the JSON string. This white space makes the JSON format incorrect. It could be a hidden error message or white space at the top of the theme.

turn debugging on and try again. Hopefully it will show what is wrong.

 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Hi Mohamed,

Thanks again for your quickly answer. You are right. There is something at the top of the theme, see attachement. However If I switch on debugging or I change the theme, the site doesn't show any error. But if I change language from Spanish (es_utf8)  to English (en_utf) on the Moodle site, it works right.  So where can I find that string? Do you have any idea?

Thanks in advance.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

It's possibly in your Spanish language file. Make sure there are no spaces or lines at the top of the file before <?php  and remove the closing tag if exists from the end of the file ?>


 
Average of ratings: -
Picture of Nacho Aguilar
Re: New Plugin "Global Message"
 

Thanks, we solved. It was a problem with the Shoutbox block and some strings.

 
Average of ratings: -
Picture of Martin Scaiff
Re: New Plugin "Global Message"
 

Hi Mohammed,

I've downloaded the version of global message for moodle 1.9 and have gone through the install process. I'm getting the "message can't be saved" error and have read through all the posts but don't know enough to follow the steps there. Is there an updated version of Global message for moodle 1.9 that resolves the issue? It's a great plugin that I'd like to use but just don't have enough knowledge to get it working.

Many thanks,

Martin

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Martin

It is possible that the database tables are not installed. How did you install the plugin? Do you have access to the database? If you do check that the plugin tables are exists (mdl_globalmessages, mdl_globalmessages_designs, mdl_globalmessages_rules ).

Cheers

Mohamed


 
Average of ratings: -
Picture of Martin Scaiff
Re: New Plugin "Global Message"
 

Hi Mohammed, I installed the plugin from fresh following the install instructions in the package. I don't know how to access the database. I am a moodle admin for my site.

Thanks

Martin

 
Average of ratings: -
Picture of Antonio Crespo
Re: New Plugin "Global Message"
 

Hi Mohamed. I have the same issue here. I am using Moodle 1.9.19, I followed the instructions from the readme file to have the plugin installed and when I logged in to Moodle as admin, I got the Global Message Settings page displayed, but no tables were created. I have checked the database and there are no global message tables in there.  Is there a way to create these tables manually? is there anything else I can do? I like this plugin and I would like to start using it right away.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 
Average of ratings: -
Picture of Orphic Pixel
Re: New Plugin "Global Message"
 
I would like to know how can i set the message to appear to student and teachers only, if not all the user who logged in...
 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Create custom rule class that will return 'true' if the current logged in user is student or teacher. Use this custom rule for the message you want.

 
Average of ratings: -
Picture of wild xu
回复: New Plugin "Global Message"
 

Thanks for your afford,this plugin is very useful.

It work perfectly in my test enviroment,(win2003+apache+php+mysql). but when I install the plugin followed the readme.txt in my product server(CentOS+Nginx+php+mysql). it show me the error belowe in firebug :

parseJSON
 
 
the errors appeared  whenever I click the Edit Rulesedit | remove
 
the relatived three tables have created in mysql db. and the new message will display after refresh page. any suggestion?

PS: the error still when I select another theme. and cannot pop setting-window when I click Edit rules.

thanks again.

 


 
Average of ratings: -
Picture of mohamed alsharaf
Re: 回复: New Plugin "Global Message"
 

When this error happens, it's possible there are whitespaces somewhere in your site. Turn the debugging and the error messages on and also check your theme files, language files, or any other files that get included from whitespaces

 
Average of ratings: -
Picture of wild xu
回复: Re: 回复: New Plugin "Global Message"
 

Thanks for your relay.
the current mode is for developer,and while clicking the "edit rule" .only JSON error from firebug ,  Moodle debug do not report any errors.

 
Average of ratings: -
Picture of wild xu
回复: Re: 回复: New Plugin "Global Message"
 

hi Mohamed,follow your instrution,Ichecked my theme file and language. also ,I turned on the debugging but have no error information. I cannot locate the position of the "whitespace" your mentioned.the error still exist, after read all reply about the plugin,.I want to know if the enviroment compatiable or not. The plugin is very useful for me .

I installed the plugin into another moodle (linux). report the same error.

so .please tell me what can do next .

thanks .

regards.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: 回复: Re: 回复: New Plugin "Global Message"
 

The other thing you can do is to compare php settings in the two enviroments you have (the local and the linux).

It is possible that you have magic_quotes_gpc "on" on your linux server. trun this setting off if it is.

 
Average of ratings: -
Picture of Stanley Swank II
Re: New Plugin "Global Message"
 

Hello All,

 

I am having issues when I initially installed, the database tables were not created.  I have deleted the direcory and files, and then re-uploaded in an attempt to "reinstall".   Moodle does not see it as a fresh install.  Also, I do not have direct access to the MySql, so I have to run the creation script to create tables.  Any Ideas on how to get this done would be great!!!! 

 

Thanks

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Which version you are using? for Moodle 1.9 or Moodle 2.1

 
Average of ratings: -
Picture of Stanley Swank II
Re: New Plugin "Global Message"
 

I am currently using Moodle version 1.9, but will be upgrading to 2.2 this weekend.

 

The version number of GM is: $local_version = 2011032202

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

1. Increase the value of the $local_version in /local/version.php

2. Open the file /local/db/upgrade.php and replace 

if($result&&$oldversion<2011032200){

with 

if($result&&$oldversion< put here the new local version number){

3. Navigate to the notification admin page to re-install it.

 
Average of ratings: -
Picture of Gene Passofaro
Re: New Plugin "Global Message"
 

Hello Friends, 

   I want to use Global Messages and have moodles v. Moodle 2.0.2 (Build: 20110221)    Does this version allow Global messages?

I instlalled once with a version that perhaps worked on 2.1.  I'm not sure.  But it didn;t work - except it looked like it installed.   Anyway, I see there is a globalmessages2.zip and  the question is will this one work with my version?

thanks

Tazo

 

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

There is a version of this plugin that works in Moodle 2.0 but it is not maintained.

http://jamandcheese-on-phptoast.com/wp-content/uploads/2011/07/globalmessage2.zip

 
Average of ratings: -
Picture of elif kara
Ynt: New Plugin "Global Message"
 

Dear Mohamed,

We installed the latest version of the plugin. We are currently using Moodle 2.1.1

If doesn't throw any error, I can create a design, create a rule and add a message from the Global Message window. It seems working fine but does not show the message to any user, actually does not function.

I added this code to theme/mytheme/layout/general.php

<?php echo $OUTPUT->standard_end_of_body_html() ?>

 <?php

include_once $CFG->dirroot . '/local/globalmessage/lib/base.php';

moo_globalmessage::show_message();

?>

Still does not function.

Do you have any suggestion?

 
Average of ratings: -
Picture of elif kara
Ynt: New Plugin "Global Message"
 

We installed the older version of the plugin and now seems working.

Now the problem is; the plugin doesn't apply the css style. Just show the message with an exit button.

Any suggestions?

 
Average of ratings: -
Picture of elif kara
Ynt: New Plugin "Global Message"
 

Solved with a different css thanks!

 
Average of ratings: -
Picture of Ignasi Freixinet
Re: Ynt: New Plugin "Global Message"
 

Hi Elif.

What older version of global message did you install? 

Does any solution for moodle 2.2.1 exist ? I've been trying to install the new version of global message but it doesn't work.

Thanks.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: Ynt: New Plugin "Global Message"
 

Hi there

I have updated the plugin to work for Moodle 2.2.x

Latest version is 2.0.3

Cheers

 
Average of ratings: -
Picture of Randy Craps
Re: Ynt: New Plugin "Global Message"
 

I am using Moodle 1.9.11+ and I can not get global message to work..

I have followed all of the instructions posted here and have the same trouble..

"can not save"  When I done the edits to version and upgrade php files the global message page does not exist...

 

Is there some way to get this to work?

Maybe an updated zip file of the program...

 
Average of ratings: -
Picture of hina yousuf
Re: Ynt: New Plugin "Global Message"
 

How can i create a custom rule in global message . in model->rule what should i write in the validation function.i want to show a message in a course for short attendance alert.when the attendance of the user in any course is less than 75 % then it should show the popup message in that course.

 
Average of ratings: -
Picture of Frank Sainsbury
Re: Ynt: New Plugin "Global Message"
 

I have installed the new version 2.0.3 for 2.2 moodle, but the window doesnt show, on login.

This is in frontpage for theme:

<?php
include_once $CFG->dirroot . '/local/globalmessage/lib/base.php';
moo_globalmessage::show_message();
?>

I cannot see any errors? is it a yui version issue?

 ls ../lib/yui/
2.9.0  3.4.1  license.txt  phploader  readme_moodle.txt

grep 2.8 globalmessage/assets/js/yui-selector.js
version: 2.8.2r1
}}},_getIdTokenIndex:function(D){for(var C=0,B

 
Average of ratings: -
Picture of mohamed alsharaf
Re: Ynt: New Plugin "Global Message"
 

It is better if you use core theme rendere instead of inserting the above code in frontpage. see installation details: http://moodle.org/plugins/pluginversion.php?id=779

The popup window will show depending on your rules. The easiest way to test it is to create a popup message that is going to show in all pages. Rule (IF course ID equal or bigger than 0)

Also, clear you cache from (http://yourmoodle.com/admin/purgecaches.php) and untick cache javascript from  (http://yourmoodle.com/admin/settings.php?section=ajax) then test the plugin. When everything is working as you expected, reselect the cache javascript setting.

Hope this helps

 
Average of ratings: -
Picture of Sherwin Binarao
Re: Ynt: New Plugin "Global Message"
 

Wow! This is a great discussion!


I have installed the current version and its working perfectly fine.

Thank mohamed! Great work :D


-Sherwin

 
Average of ratings: -
Picture of Larchen
Re: New Plugin "Global Message"
 

Hello everyone.

I have installed GlobalMessage plugin version 2011032202 for Moodle 1.9 on Moodle 1.9.7+ (Build 20100112) regarding procedure in readme.txt. Now 3 tables are exist in DB, but in Site Administration --> Front Page --> Global Message submenu there is only 'Global Message Settings' item. Items 'Global Messages' and 'Global Message Info' are absent.

When i'm trying to get that items through URL like http://<site>/local/globalmessage/index.php?id=1, I receive in some cases 'Access Denied' page, or just empty page.

What is the cause of collide with such issues?


 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Larchen

Please trun the debugging (Site Administration > Server > Debugging) on (developer option)

Then try to open the plugin pages. You should see some error messages. Please copy & send them to me.

Cheers

Mohamed

 
Average of ratings: -
Picture of Henriette Stewart
Re: New Plugin "Global Message"
 

Hello all  - new moodle user alert. smile

I have installed local_globalmessage_moodle21_2011091502 on our moodle site which is version 2.2.3+. I have followed the steps in the readme.txt though I found out by trial and error that it was /theme/[theme name]/layout/embedded.php that I had to update, not default.php which is also in the layout folder.

The required tables did not get created automatically so I did that manually. Following the advice in the readme.txt I added local_ to the start of the table names, but globalmassage would not recognise them. I then created the tables without appending local_ to the name and they seem to be recognised now as I am not getting that error anymore.

Now however, when I go to Site administration/Front page/Global Message/Global Messages and select either of the two option buttons "Manage Message Designs" or "Create Global Message" the whole screen gets blanked over (screenshot). I can navigate the fields of the box using the tab key, but it's awkward and the tutor users are not going to find this very user friendly.

How can I fix this?


 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Henriette

You are using a version of the plugin for Moodle 2.1 not Moodle 2.2. The issues you are having were fixed in the version 2011091503 smile

The plugin CSS does not work well with the theme you are using. To remove the dark overlay:

1. Open ~/local/globalmessage/assets/js/manage.js

2. Search for:

// Instantiate the Dialog
this.dialog = new YAHOO.widget.Dialog(this.elementid,
{
modal: true,

3. Replace true to false.

Cheers Mohamed

 
Average of ratings: -
Picture of Henriette Stewart
Re: New Plugin "Global Message"
 

Hello Mohamed, thank you for your quick response - and for creating this plugin!

I updated to version 2011091503 (shame-facedly as I should have checked what version was required, but it's a lesson for me) but unfortunately the same thing is still happening. I amended manage.js files as you recommended but that didn't make any difference.

Initially I didn’t think this was going to be a problem but I have since discovered that, because of this problem I can’t access any of the text editor functions at all, which is not great when you want big bold messages.

Also, is it possible to adjust where on the page the pop-up message appears? At present it is right at the top of the page (screenshot below).


 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

There isn't a direct way to adjust the position of the popup.

The styles defined in moo_globalmessage_view::message_outter_styles() (file: ~/local/globalmessages/lib/view.php)

The styles:

display:block;position:fixed;top:20px;z-index: 90000;left:50%;

Cheers

Mohamed

 
Average of ratings: -
Picture of Brian Tissue
Re: New Plugin "Global Message"
 

For simple messages like 'Server Going Down For General Maintenance' I use the additional HTML under the appearance settings and add the customized code from http://www.hellobar.com

 

Works great for busy admins. No changes to core files and no worries during or after a Moodle version upgrade......why change core code and have to worry about plugin versions, theme settings, etc. etc. etc. 

 
Average of ratings: -
Picture of Brian Tissue
Re: New Plugin "Global Message"
 

In addition, you don't have to worry about pop-up blockers, etc. 

 
Average of ratings: -
Picture of Syed Ahmad
Re: New Plugin "Global Message"
 

hi Mohamed, 

i have successfull install this mod, but anyhow the globamessage view doesnt show correctly, i attach here the screenshot of the message i try

gm

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Hi Syed,

I think your theme css is in conflict with the css of the popup view of the globalmessage.

Cheers

Mohamed

 
Average of ratings: -
Picture of Emma Richardson
Re: New Plugin "Global Message"
Group Particularly helpful Moodlers

Awesome plugin by the way!  One issue I am having - I cannot delete any messages...the box pops up Are you sure you want to delete but when I try and click on Yes or No, nothing happens and I have to reload the page to get out of there.  Running on 2.5 using Rocket theme.

Just to update - I can delete by hitting the enter button on my keyboard when the box pops up but cannot click on yes or no.  If you try to click on the pop up,  you can no longer hit enter on the keyboard.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I have not tested the plugin with Moodle 2.5 but I think your issue is css conflict. I will look into this sometimes today or tomorrow.

 
Average of ratings: -
Picture of Emma Richardson
Re: New Plugin "Global Message"
Group Particularly helpful Moodlers

Thanks - this is such a great plugin - can't believe I only just found it! Would be great if you add a role filter to the basic rule set up - if role name is (student/teacher/admin/etc..) or even on roleid where we had to put the id number in.  I think that would really increase the functionality.  I know I could create a custom rule but it would be nice just to have as a built in feature.

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

Thanks smile I will consider this feature when I have time to update the plugin.

For the issue you have, there are 2 options to fix it:

1. Disable the  dark layer that overlay the remove dialog:

- Open the file local/globalmessage/assets/js/manage.js line 33

- Replace modal: true, with modal: false,

2. Or, add the following CSS to your theme stylesheet.

- Open theme settings page: yoursite.com/admin/settings.php?section=themesettingrocket

- Scroll to the bottom of the page.

- There is option to add Custom CSS. add the following:

.yui-skin-sam .mask { 
z-index: 999998 !important; }

- Save your changes and clear theme cache (yoursite.com/theme/index.php)

 

 
Average of ratings: -
Picture of Emma Richardson
Re: New Plugin "Global Message"
Group Particularly helpful Moodlers

Thank you so much for speedy reply.  If you ever need help with testing, let me know.

 
Average of ratings: -
Picture of Luka Torby
Re: New Plugin "Global Message"
 

Hello, I have a little proble with adding item in front page menu.

I use moodle 2.3 , but the item isn't in front page menu but plugin-local-global message.

Has anyone any idea to solve it?

Thanks

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

From Moodle 2.3 the plugin location moved from the Font page menu to plugins.

Why do you want to put the plugin menu under front page menu?

 

 
Average of ratings: -
Picture of Ali Rajabpour Sanati
Re: New Plugin "Global Message"
 
hello mohamed and thank you very much for the module, i have just installed it on moodle 2.4, everything works fine but messages shows everytime users login not just once!, do you know any solution? thank you in advance
 
Average of ratings: -
Picture of Yvonne Hamilton
Re: New Plugin "Global Message"
 
Hi, I'm guessing Luka was just worried that the plugin installed in the wrong location as the documentation says it should show under Frontpage not Local plugins. I do have a question also. Does anyone have any code on how to have a message popup for only logged in users? We have 10,000 users and only want to send a message just before an outage to those that are still online. The instructions around this plugin say you can create your own criteria but I'm not much of a code writer so was hoping someone had maybe created a custom rule for messaging only current online users. Regards, Yvonne
 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

The plugin files should be installed in /path/to/your/moodle/local/globalmessage

In Moodle 2.0 and Moodle 1.9, you can find the plugin interface under the Frontpage section from the administrator navigation.

In Moodle 2.1 and above, you can find the plugin interface under the Plugin > Local section from the administrator navigation.

The plugin shows the popup message to logged users only. On every page load the plugin will attempt to find any messages for the current logged in user.

You don't need to build custom rule to show a message about an outage. You can define rules with the current default one:

- IF Course ID bigger than 0 

- AND date less than the [The date of the outage]

 The above 2 rules should make sure that the message to be visible in all courses (all pages) and if the current time is before the outage time. All logged in users should see the message.

Hope this helps and sorry for late reply, I just saw this message today.

 
Average of ratings: -
Picture of Acs Gabor
Re: New Plugin "Global Message"
 

Dear Mohamed,

I managed to install the plugin without any error messages to a 2.6.2+ system, configured it, but I am not able to get a single pop-up message from it.

Does it work on 2.6?

Thanks,

Gabor

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I have not tested the plugin with 2.6.2. I will test it when I have some free time.

Are you using a custom theme or one of Moodle standard themes?

 
Average of ratings: -
Picture of Yvonne Hamilton
Re: New Plugin "Global Message"
 

Hi,

I have this installed on Moodle 2.6.2+ and the popups to Edit Rules or just to Edit do not work at all. I would be great if you could test this.

 
Average of ratings: -
Picture of Acs Gabor
Re: New Plugin "Global Message"
 

Thank you in advance Mohamed!

I was using the standard white theme.

Best,

Gabor

 
Average of ratings: -
Picture of mohamed alsharaf
Re: New Plugin "Global Message"
 

I have tested the plugin with Moodle 2.6.2. It works fine.

@Acs if you are using Moodle standard theme, you will need to modify an existing file and add another one.

1. Open the ./theme/standard/config.php and add the following to the end of the file

$THEME->rendererfactory = 'theme_overridden_renderer_factory';

2. Download the attached file remderers.php into ./theme/standard/

3. Test the plugin.


@Yvonne what browser do you using to replicate this issue? Also, can you using chrome to replicate this issue and send me a screenshot of the javascript console.

1. Navigate to the manage messages screen.

2. Right click anywhere in the page and select inspect element.

3. Click on the console tab

4. refresh the page and the attempt to re-create the issue.

5. There should be some error message printed in the console (red color). Can I have a screenshot of this. 

 
Average of ratings: -