Rating non-approved entries

Rating non-approved entries

by Kimber Warden -
Number of replies: 12

I have a database in which I don't want students to view other students' entries, so I have set "require approval." However, it appears that a teacher can't rate an entry unless it's been approved. When I try to rate one without first approving it, I get a popup that says "Rating of items not allowed!" After I've approved it, I'm able to rate it.

Is there a setting somewhere that I've missed? I need to be able to rate items while still keeping them invisible to other students.

Average of ratings: -
In reply to Kimber Warden

Re: Rating non-approved entries

by Itamar Tzadok -

That's how it is implemented, that is, if you require approval you cannot rate unapproved entries. Whatever the reason for this implementatin is, the real problem is that you need to use 'require approval' to separate participants. Separate participants should be a working mode independent of approval. It shouldn't be too difficult to fix. This is already implemented in the dataform plugin but the plugin is still beta. smile

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Thomas Bieschke -

The only work around I have found was to include the grade in with the comment.  Doesn't solve the gradebook relationship, but, at least, I got to use the database for continuous entry and not "Approve" for general viewing. 

I hope that issue gets resolved.  I spent some time trying to figure out why I could not rate. 

 

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Kimber Warden -

What's the status of this now? Has a version been released yet in which teachers can rate / grade entries without making them visible to other students? Thanks so much for your work on this!

In reply to Kimber Warden

Re: Rating non-approved entries

by Itamar Tzadok -

I've just returned to working on the dataform and a version should be released soon. In the meantime, I can tell you how to hack the standard database module to allow rating of unapproved entries, if that could work for you. smile

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Kimber Warden -

That would be great. Thanks!

In reply to Kimber Warden

Re: Rating non-approved entries

by Itamar Tzadok -

Which moodle version? smile

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Kimber Warden -

Sorry I didn't mention it before! I'm using 2.2.

In reply to Kimber Warden

Re: Rating non-approved entries

by Itamar Tzadok -

mod/data/lib.php aroung line 1470

    if ($info->approval && !$info->approved) {
        //database requires approval but this item isnt approved
        throw new rating_exception('nopermissiontorate');
    }

 Comment out the highlighted line or the whole condition block. smile

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Kimber Warden -

Thanks so much! Is it a different process if I'm using dataform?

In reply to Kimber Warden

Re: Rating non-approved entries

by Itamar Tzadok -

It's in a different place. Try mod/dataform/field/_rating/field_class.php around line 320

        if ($data->approval and !$data->approved) {
            //database requires approval but this item isnt approved
            throw new rating_exception('nopermissiontorate');
        }

same thing, comment out the highlighted or the whole condition.

Let me know if it worked for you because the whole rating functionality in the dataform is only half way. I'm working on it as we write and it should be completed soon. smile

In reply to Itamar Tzadok

Re: Rating non-approved entries

by Chris Baldwin -

The other way around this is to set 'Entries required before viewing' to 50 (or something like that), 'Maximum entries' to 49 (i.e. lower than entries required before viewing) and 'Require approval?' to 'no'.

You'll also need to edit the language pack where is says 'You must add 48 more entry/entries before you can view other participants' entries.' to 'Thanks for your submission' or something.

That way your participants will never be able to see other entries but as there's no approval you can rate them anyway.

Hope that helps someone smile

Chris

Average of ratings: Useful (2)
In reply to Itamar Tzadok

Re: Rating non-approved entries

by Daniel Hefley -

I'm trying to accomplish something simlar with the glossary module.  Commenting out the same line in /mod/glossary/lib.php works on Moodle Moodle 2.2.3 (Build: 20120514) but I need to know if this same change will work on the 2.1.1+ (Build: 20110907) version? The only version I have to play with is our production model so I want to make sure that this change will not break it or create a security hole? Thanks.