Database

 
 
Picture of Kimber Warden
Rating non-approved entries
 

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: -
Picture of Itamar Tzadok
Re: Rating non-approved entries
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Thomas Bieschke
Re: Rating non-approved entries
 

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. 

 

 
Average of ratings: -
Picture of Kimber Warden
Re: Rating non-approved entries
 

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!

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Rating non-approved entries
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Kimber Warden
Re: Rating non-approved entries
 

That would be great. Thanks!

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Rating non-approved entries
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Which moodle version? smile

 
Average of ratings: -
Picture of Kimber Warden
Re: Rating non-approved entries
 

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

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Rating non-approved entries
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Kimber Warden
Re: Rating non-approved entries
 

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

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Rating non-approved entries
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Chris Baldwin
Re: Rating non-approved entries
 

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: -
Picture of Daniel Hefley
Re: Rating non-approved entries
 

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.

 
Average of ratings: -