Blocks interacting with Modules

Blocks interacting with Modules

by M O'S -
Number of replies: 12
Hi all,

I have hit some confusion and am wondering what is the best approach to take.

Ideally, I want to develop/implement a plugin/block that will enable things like grade feedback and course resources to be digitally "signed". This would require access by the block to modules - like the assignment module for example - (grading an assignment, providing feedback, the gradescore gets "signed" and time stamped, and this "signature" is included in the feedback email mailed to student).

What do users think would be the best approach? Is the above possible but difficult within Moodle? Would it be a better idea to implement the feature directly into a module instead?

Thanks smile
Average of ratings: -
In reply to M O'S

Re: Blocks interacting with Modules

by Alejandro Michavila Pallarés -

Hi Megan,

There is a block that allows you to add activity modules as blocks, it's called activity modules:

http://cvs.moodle.org/moodle/blocks/activity_modules/?hideattic=1

May be you have a look to take some ideas.

HTH

In reply to Alejandro Michavila Pallarés

Re: Blocks interacting with Modules

by M O'S -
Thanks Alejandro, I have downloaded this block but when I try to install it under 'notifications' it tells me that "Block activity_modules: self test failed"

What does this mean and how can I solve?

Thank you smile
In reply to M O'S

Re: Blocks interacting with Modules

by Alejandro Michavila Pallarés -

Hi again Megan,

I don't really know what does it mean, but it may have something to do with the block and Moodle versions.

Which Moodle version are you running?.

In reply to Alejandro Michavila Pallarés

Re: Blocks interacting with Modules

by M O'S -
$release = '1.9.9+ (Build: 20101013)';
In reply to M O'S

Re: Blocks interacting with Modules

by Alejandro Michavila Pallarés -

I haven't tested the block with that release, I've tested with 2.0 RC1 and it works ok.

You said that you downloaded the block, but I think the block comes with your Moodle release, so may be that could be the problem.

In case that's the problem, you just have to delete the block from the block path of your Moodle site.

Average of ratings: Useful (1)
In reply to Alejandro Michavila Pallarés

Re: Blocks interacting with Modules

by M O'S -
Hi Alejandro,

When I turn editing 'on'' and go to the "Blocks" section to add a new block, I do not have the option to select the block "Activity_modules". How can I use this block?

Thank you smile
In reply to M O'S

Re: Blocks interacting with Modules

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Megan,

When you say "digitally signed", do you mean simply with a name and timestamp, or something more advanced like PGP for authenticity checking?

If you're thinking of the former, the assignment modules already store the person who marks the submission and the timestamp in the assignment_submissions table.  A block could very easily use a cron job read the data out of this table, generate and email with the grade and feedback, then append the teacher's name and timestamp to the bottom.  You'd just need to make sure you stopped the assignemnt modules sending emails themselves, which may require modification of the assignment activity module to be certain, in which case you may as well modify the activity module in the first place.

Average of ratings: Useful (1)
In reply to Mark Johnson

Re: Blocks interacting with Modules

by M O'S -
Hi Mark,

Thanks for your reply smile

By "digitally signed" I mean something similar to PGP. My aim is to "develop a digital notary service plugin for Moodle, to notarize moodle resources such as web-pages, assignment submissions and student grades". At the moment I am researching the best way to implement this, either in a block or else maybe directly modify the desired areas above where digital notarization would be useful. Moodle is very new to me so I am still learning!

In reply to M O'S

Re: Blocks interacting with Modules

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That certainly sounds like an interesting challenge. You might want to look at the email_to_user() function and where it's called in the modules you want to send signed emails from. I've never signed email from PHP myself so can't give you any more specific pointers that that, but it's a start!

Average of ratings: Useful (1)