Giter Site home page Giter Site logo

marxjohnson / moodle-block_messageteacher Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 9.0 89 KB

Moodle block to display messaging links for teachers on a course

Home Page: http://moodle.org/mod/data/view.php?d=13&rid=2053

PHP 58.35% CSS 0.54% Gherkin 37.27% JavaScript 3.85%

moodle-block_messageteacher's Introduction

moodle-block_messageteacher's People

Contributors

bmbrands avatar dtgillis avatar marxjohnson avatar petersistrom avatar roessling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-block_messageteacher's Issues

No notification sent to teacher

I´m using it in moodle 2.7. No problem in sending messages to teacher, but the teacher does´t receive notice of the new message. It actually shows him (0) new messages. The message only appears when he lists the recent messages.
Thanks!

From address shows Noreply

Hi,
Is it possible to have the email sent to the teacher of a course include the email address of the student so that the teacher can respond directly to the email?
Currently the email is coming from noreply and the teacher must log in to the course to respond.
Thanks,
Joe

Message MyTeacher block error in Moodle 3.6

I updated Moodle to 3.6 version. Now, when I press the "send" button to send a message through the Message My Teacher block the following error appears:

Exception - Argument 1 passed to message_send() must be an instance of core\message\message, instance of stdClass given, called in [dirroot]\blocks\messageteacher\message_form.php on line 89

Any suggestion?

Unknown error upgrading block_messageteacher

Tony Harris
Thu, 20 Jun 2013, 12:51 PM
I'm getting an error trying to upgrade to this latest version:
block_messageteacher
Unknown error upgrading block_messageteacher to version 2013031301, can not
continue.
Debug info:
Error code: upgradeerror
Stack trace:

line 249 of /lib/upgradelib.php: upgrade_exception thrown
line 821 of /lib/upgradelib.php: call to upgrade_block_savepoint()
line 362 of /lib/upgradelib.php: call to upgrade_plugins_blocks()
line 1544 of /lib/upgradelib.php: call to upgrade_plugins()
line 349 of /admin/index.php: call to upgrade_noncore()

Moodle version is Moodle 2.4 (Build: 20121203)

I'm going to just remove the block and upgrade to Moodle 2.5 anyway, and when I've
got that done and tested I'll try this block again, but I thought I should at least point out > the issue. We had been using the previous version of the block, which had no problem.

Tony Harris
Thu, 20 Jun 2013, 1:38 PM
Followup. Upgraded to Moodle 2.5, reinstalled the block, and it went in fine. Perhaps an
issue with that particular build of Moodle 2.4 that I was using?

Add GDPR support

As of 3.5 Moodle requires GDPR support to be implemented for all installed plugins. See https://docs.moodle.org/311/en/GDPR

Failing core unit tests:

root@f667725e078b:/var/www/site# vendor/bin/phpunit --testsuite='core_privacy_testsuite'
Moodle 3.9.18+ (Build: 20221201), d2f37aab5678ea198ef8a8082f3204ebae45f38f
Php: 7.4.33, pgsql: 12.8 (Debian 12.8-1.pgdg110+1), OS: Linux 5.15.0-56-generic x86_64
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

.............................................................   61 / 1357 (  4%)
.............................................................  122 / 1357 (  8%)
.............................................................  183 / 1357 ( 13%)
.............................................................  244 / 1357 ( 17%)
.............................................................  305 / 1357 ( 22%)
.............................................................  366 / 1357 ( 26%)
.............................................................  427 / 1357 ( 31%)
.............................................................  488 / 1357 ( 35%)
.............................................................  549 / 1357 ( 40%)
.............................................................  610 / 1357 ( 44%)
.............................................................  671 / 1357 ( 49%)
...............................F.............................  732 / 1357 ( 53%)
.............................................................  793 / 1357 ( 58%)
.............................................................  854 / 1357 ( 62%)
.............................................................  915 / 1357 ( 67%)
.............................................................  976 / 1357 ( 71%)
............................................................. 1037 / 1357 ( 76%)
............................................................. 1098 / 1357 ( 80%)
............................................................. 1159 / 1357 ( 85%)
............................................................. 1220 / 1357 ( 89%)
............................................................. 1281 / 1357 ( 94%)
............................................................. 1342 / 1357 ( 98%)
...............                                               1357 / 1357 (100%)

Time: 39.32 seconds, Memory: 157.00 MB

There was 1 failure:

1) provider_testcase::test_all_providers_compliant with data set "block_messageteacher" ('block_messageteacher', 'block_messageteacher\privacy\provider')
Failed asserting that false is true.

/var/www/site/privacy/tests/provider_test.php:178
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
phpvfscomposer:///var/www/site/vendor/phpunit/phpunit/phpunit:60

To re-run:
 vendor/bin/phpunit "provider_testcase" privacy/tests/provider_test.php

FAILURES!
Tests: 1357, Assertions: 9526, Failures: 1.

Add support for role assignemnts in parent contexts

Daemon Hunt
10 June, 07:14
In my case, course administrators wish to be added to the block along with teachers. It seems that any role
that I have assigned to a course at the category level does not work. This is problematic for us as we have
many courses or 'papers' under each sub/category or 'programme' which makes assigning course admins
at a paper level retrospectively to each and every paper very time consuming and error-prone.

Is it possible for you to come up with a way for me to tweak my MMT code which propogates roles assigned
at the category/sub category level instead of ONLY at the paper level?

Internal Server Error

Error below

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Error in sending message

Hi,
after the moodle upgrade, the block no longer works.
Thanks

Moodle 3.6.2+ (Build: 20190201)

Debug info:
Error code: messagefailed
Stack trace:
• line 101 of /blocks/messageteacher/classes/message_form.php: block_messageteacher\message_failed_exception thrown
• line 62 of /blocks/messageteacher/message.php: call to block_messageteacher\message_form->process()

teacher suspended in database enrol

Hello,
when a teacher was enrolled through an external database and subsequently de-enrolled, with the status of suspended he continues to be displayed in the block even though he is no longer a teacher of the course.
I solved it as follows:
file: block_messageteache.php
line: 93
add :

$where .= ' AND ra.userid not in(select userid FROM {user_enrolments} where' . ' userid=ra.userid and enrolid=ra.itemid and status=1) ';

because if mdl_user_enrolments.status =1 ----->>> user inative in course

Participants

Bug in Appending Referring URL

Hi Mark,

I'm running messageteacher 2.4 against Moodle 3.0.

When a student sends a message from within a quiz on a page like:

http://moodle.example.com/mod/quiz/attempt.php?attempt=47&page=9#q13

the email received by the teacher has the url appended as:

http://moodle.example.com/mod/quiz/attempt.php?attempt=47&page=9

where the ampersand between the "attempt" and "page" parameters is escaped, and therefore when clicking it, only the first parameter takes effect (showing the whole quiz rather than the page the student was on).

Also (less important to me) the "#q13" anchor tag vanishes.

Andrew

p.s In spite of this bug, thanks for providing such an essential block!

Order tearchers by name

On 2013-06-23 17:41, Guido Roessling wrote:

Guido Roessling has commented on a plugin you're contributing to :

Just a small recommendation: adding a " ORDER BY u.firstname ASC, u.lastname"
to the query in line 68 of blocks_messageteacher.php makes a longer list far
easier to scan (our course has 20+ tutors, so this is relevant). Otherwise -
good job!

Messages don't always go through to email

I love Message my teacher but I wish it would always force emails through to my email and students email. Sometimes I log in and see messages that have been sitting a few day that I didn't get an email about. And students tell me they didn't know they had a message.

Also, I just sent out about 20 messages. When I logged in as one of those students I looked at messages and it says no messages waiting. But when I go to messages and choose "recent conversations" from the drop down menu it shows the message. Any way to make these waiting messages more obvious and findable for students? Thank you. I'm attaching a couple screen shots. Best, Bonnie
changetorecentconversations
nomessageswaiting_butthereare

Message Teacher block not showing

  • Block MessageTeacher Release 2.2
  • Moodle Release 2.3

Although the block can be added by the administrator, it can't be seen by the students.

Block allows messages to be sent from guest

When the session times out, this block sends messages from guest. This makes it very hard to tell who the message is from unless the student signs it. Plus guest isn't allowed to send messages at all so it shouldn't be allowed here either. Guest is also not allowed to display the block.

To reproduce: I logged in as a student and displayed a course. All our courses have the Message My Teacher block. Then I waited until my session expired. Then clicked the teacher's name to display the message form. It displayed it and I went ahead and sent my message. The message was accepted, and sure enough, it was from "Guest User". So there are probably two permissions issues here. First, the block shouldn't display the message form if the session is invalid or at least should check whether the current account (guest in this case) is allowed to send a message. And second, the function it uses to send the message should probably check to see if the current account is allowed to send a message. That second issue probably isn't yours, but perhaps the block should also check the permissions before it tries to send the message.

Messages not being sent

Hello,

I have recently installed the block and when trying to send a message the messaging screen pops up allowing me to compose the message, but when i try to send it the block goes empty and the message is never sent.

Kind regards,

Alex

Feature request to message a teacher/course admin in a quiz context

Hi Mark,

We're looking for a way for students to message a teacher / course admin within a quiz that references a particular question. The feature would be used to either ask for help from the teacher or report an error in the question feedback/answer.

Is this possible with some modification to this plugin? And, if you have time and interest, would you be able to quote me on this? My email is andrew{at]olico.org

Thanks

Andrew

Feature Request: Edit title

Not sure if simple to implement, but would be nice if in the block's settings you could change the block title/header from "Message My Teacher" to something else. I'll probably amend the files to display "Message My Tutor" instead for my purposes, but thought would be handy and simple thing others may want.

Issues with Moodle 2.9.3

I have added the Message My Teacher block to the course and that part of it seems to work OK in that students can only see their own teachers to message them. The student can send a message to the teacher.

Here's where it seems to go wrong:

  • On the Dashboard of the teacher the Messages block says "No messages waiting".
  • On the Course page the Messages block says "Teacher not yet assigned to your group"
  • When the teacher goes to messages to reply she cannot reply to the messages the student can see.

Cheers

Dave

suggestion - add url of calling page into the message body

I'm plugging the message block into the pages of quiz questions. I'd like the message sent by the student to include the url of the page where they clicked on the "message my teacher" link, so the teacher can see where the student was when they asked the question.

Error in Console

I have tried this on three different Moodle 3.0.6 servers, one of which was a brand new installation for the sole purpose of testing this issue...

When a student clicks the Message My Teacher link, an error appears in the browser's developer tools console that says "Uncaught TypeError: require is not a function"

If any kind of debugging is enabled, another error is generated when the user clicks the Send button: VM1470:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
The result is that the message form does not close or give a "Message Sent!" confirmation. This could be related to the fact that my Moodle installation does not currently send out e-mails, which is probably generating an error even though it does not display with debugging turned on.

suggestion - bounce back to calling page after sending the message

Because the message page does not update without a page reload, it doesn't seem to be sensible to stay on the message page after sending a message. It might give the student the impression that the teacher's response will popup if they wait in that page. That is, it is currently giving the student the impression they are on an IRC channel.

I think it would be better to immediately bounce the student back to the page from which they clicked on the Message My Teacher link.

Update fetch teacher sql for moodle 2.7

On Moodle 2.7.1 with full debugging on the user_picture throws a notice.

You need to update your sql to include additional name fields in the user object.
changing line 67 to

   $select = 'SELECT DISTINCT u.id, u.firstname, u.lastname, u.firstnamephonetic, u.lastnamephonetic, u.middlename, u.alternatename, u.picture, u.imagealt, u.email ';

should fix it.

Add Group Support

Peter T
6 Mar, 10:27
Is it possible to only show teacher from the group the student is a member of? We have 3 teachers in the course so it's
useless and confusing to show all 3 names to all students. New ones do not know who their teacher is. Thank you.

Exception - Attempt to assign property "text" on string

Our Moodle site is 4.1

Our production site is running the teacher message block without issues, but we have needed to create a mirror copy to test / fix an error and now some of our courses can not be accessed due to a error being reported from the teacher message block

May I enquire if this block will be certified under the latest release or even for 4.1. My understanding is 3.9 is the highest.

Here is the complete error when turning on the debugging.

Error
Exception - Attempt to assign property "text" on string
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 96 of /blocks/teachermessage/block_teachermessage.php: Error thrown
line 337 of /blocks/moodleblock.class.php: call to block_teachermessage->get_content()
line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1222 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1280 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 4101 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 1477 of /lib/outputrenderers.php: call to include()
line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 248 of /course/view.php: call to core_renderer->header()

Block doesn't install on 2.3

When attempting to install in Moodle 2.3, the following error is displayed:
block/messageteacher/version.php on line 27

Implement custom messaging form

Some improvements to the block (See #7 and #8) would require the block to use its own messaging form rather than directing to Moodle's own one.

This could also allow AJAX-enhanced functionality, allowing the user to send a message in a modal form on the current page rather than having to navigate away.

Block Disappears

Block disappears whenever editing is turned off in Moodle 2.7
I have

  • Configured the plugin and assigned teachers and managers as visible
  • Assigned roles for the course
  • Configured the plugin to show on all pages
  • Added the block as a different admin user
  • Added other blocks to the same page in the same manner and they stay there

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.