New Marking Block

New Marking Block

by Mark Tyers -
Number of replies: 56
Hi.
I needed a block to show our teachers what assignment work needed marking without having to navigate to each assignment in turn. I found a 'marking' block but it had not been updated, so I wrote a simple block (attached) that works in 1.8 (not tested it in 1.7).

It can only be added to the frontpage and if the user does not have any outstanding assignments to mark it is hidden (ie students won't see it at all).

I would love to get some feedback on it so feel free to download and install. It is far simpler than the old marking block but does everything we need.

Regards

Mark

I have also added it to the blocks database:
http://moodle.org/mod/data/view.php?d=13&rid=917
Average of ratings: Useful (2)
In reply to Mark Tyers

Re: New Marking Block

by Tom Hogan -
Mark, you have unknowingly answered my prayers!

This is just too funny; I post a request for this, thinking it's a long shot as long as they get, and three hours later your block shows up!

I've just downloaded it and look forward to trying it out. Thanks a million! big grin
In reply to Mark Tyers

Re: New Marking Block

by Tom Hogan -
OK, my euphoria was a bit premature...
The block correctly displays all unmarked assignments for the logged-in teacher (and very nicely, I might add!), but the links don't work.

I'm not sure, but it seems it does not write the course ID correctly. The error message Moodle gives is "Course module is incorrect", and upon closer inspection I see that all the links are the same no matter what course the assignment belongs to:


I'm no programmer, but I'm guessing an id number should have been written after the "id=" bit?
In reply to Mark Tyers

Re: New Marking Block

by Jakub Ctvrtnicek -

Dear Mark,

I have tried out the block and agree to Tore, its great piece of fuction. But as I click on the link to the un-assesed assignment work it shows me message "Course module is incorect"

Is it the same as Tore's issue? I will  try to look through your block and find the mistake, let u know later...

cheers

jakub

Attachment content_incorect.JPG
In reply to Jakub Ctvrtnicek

Re: New Marking Block

by Bruno Vernier -
the problem is around line 63 of block_marking.php

$module = get_record_select('course_modules', $select,'id')

it refers to a variable called $select which is not defined... or rather it is defined much earlier for a different context and so does not work

the solution is to add this line just before the above line:

$select = "course=$val->id and module=1 and instance=$val2->id";

In reply to Bruno Vernier

Re: New Marking Block

by Mark Tyers -
Hi Bruno

Thanks for the fix. Does it work OK now?

Attached is the block with Bruno's additional line of code. I have not had a chance to test it thoroughly yet...
In reply to Mark Tyers

Re: New Marking Block

by Bruno Vernier -
Thank you Mark, for kickstarting marking block for 1.8

I attempted to maintain marking block for 1.6 but gave up because the code was too time-consumming for me to figure out the bugs

I am very happy to restart fresh with your minimalist approach (which i like)

I extended your code to include 3 other mod types besides assignment, namely: journal, FAQ and forums

Now there are two marking blocks listed on moodle.org plugin database (the old buggy one from 1.6, and this one). Could you rename it "marking block for 1.8" or add it in (or let me add it in) to the old one as version 1.8 since there will not be any further development from the old code base as far as i can tell.

I have included my extended version of your block_marking.php code here for your pleasure, but really code should be pointed to in the plugins database to avoid the staleness problem when we post code to the forums

http://moodle.org/mod/data/view.php?d=13&mode=single&page=1

In reply to Bruno Vernier

Re: New Marking Block

by Julian Ridden -
Bruno, your download links are pointing to random blocks. In the moules and plugins DB yor 1.8 download link points to the 'flv resource hack'. Could you fix them.

It would be great if we could tie this in with ajax code like in the MyCourses block so that teachers can open and close courses to see the unmarked work within. Potentialy as it stands, this could become quite a large list.

Julian
In reply to Julian Ridden

Re: New Marking Block

by Bruno Vernier -
thanks Julian, the correct link for my attempt at consolidating Mark's Marking Block for 1.8 with Alex's notgraded block for 1.7 and my own additions to make a marking block that marks:

assignments
journals
glossary entries
postings
essay questions in quizzes

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

no ajax at this time. I am aiming for immediate production (teachers need this now), and when I have more time I (or someone else) can improve this block with ajax

I want to make sure no markable items ever go un-noticed (i.e. un-assessed).
In reply to Bruno Vernier

Re: New Marking Block

by Oliver James -
Hi there,

I am currently testing the new marking block as I have decided that I wasnt going to upgrade beyond 1.6 until this had been been given the 1.8 / 1.9 treatment.

I am having a problem with the links that it is generating. They are all pointing in the wrong place. It seems to think that eveything is inside the course folder. When I manually remove the course section it works fine.

http://192.168.16.9/moodle/course/mod/assignment/submissions.php?id=9&sort=timemodified

I downloaded this from the Modules and Plugins page. Not here.

Also I dont suppose any of the other Marking Block features are planned for a reappearance?
  • Group Support
  • Resubmissions
  • Overdue Students
  • Marking Page
  • Full Report - Inc a way of setting the target.
Many thanks for all your hard work.

Oliver.
In reply to Oliver James

Re: New Marking Block

by Bruno Vernier -
thank you for your bug report. Originally Mark programmed the block to work only from the FrontPage. I changed that to allow it to be anywhere but neglected to make the corresponding change in the URLs.

I just fixed that and the link in modules and plugins is now uptodate

thanks again smile
In reply to Bruno Vernier

Re: New Marking Block

by Monico Briseño -
Picture of Testers
Hi Bruno. I downloaded the marking block for Moodle 1.8 However in Moodle Admin block windows section doesn't appear the marking block settings.

Any ideas?

Mónico
In reply to Monico Briseño

Re: New Marking Block

by Bruno Vernier -
Monico: there is currently no settings in block_marking for 1.8 (it is a very slimmed down compared to block_marking for 1.6) ... please understand: marking block has always been and always will be very dependent on "permissions". The whole "permission structure" of moodle changed radically from 1.6 to 1.8 and requires a paradigm shift not only for the programmers but for the managers and teachers too! The old config allowed teachers to choose which courses they wanted to see "stuff to be marked" for. But with the new system, it is possible for instance that a teacher only mark one type of activity like forums across many courses, while another marks the assignments across the same courses.

Miroslav: so since admins have marking rights on all activities, they see everything. But understanding how permissions work, you can simply switch roles when you want to mark: switch to teacher role and you will have access only to the stuff you are allowed to mark
In reply to Bruno Vernier

Re: New Marking Block

by Mark Tyers -
Bruno
Would it be sensible to remove my marking block from the plugins database? Would be happy to do this as long as I can access and work on the code base for your block.

Would Martin be able to set up a CVS for this?

Mark
In reply to Mark Tyers

Re: New Marking Block

by Miroslav Fikar -
There is a problem with the block for teachers that have administration rights (we have no special administrator for Moodle but some teachers that do the job). In that case, the block shows assignments for all courses, not just those of a particular teacher.
In reply to Miroslav Fikar

Re: New Marking Block

by Mark Tyers -
Hi,
Administrators see all the work for marking because they have permission to mark assignments at the site context. This could be sorted by checking for admin rights at the site context and then not displaying the block at all, however this would be a problem for admins who are also teachers.

Hubris tells me there is a solution out there somewhere but it may take a bit of thinking to find it smile
In reply to Miroslav Fikar

Re: New Marking Block

by Mark Tyers -
Hi,
I have now modified the code so that administrators only see marking for the courses they teach on (either as a teacher or non-editing teacher).

This was achieved using the get_role_users() function.

I have also fixed a few bugs such as the code using non-existent capabilities:

the capability mod/journal:grade was replaced with mod/assignment:grade (I could not find any capabilities for journals in 1.8 ????)

the capability mod/forum:grade was replaced with mod/forum:rate

I have not tested the other marking types.

One additional bug is that the links from all marking apart from the assignment ones do not work!

Attached is the revised version of block_marking.php
In reply to Mark Tyers

Re: New Marking Block

by Bruno Vernier -
thanks Mark for these bug fixes. I made the the coursename a variable to accomodate our different tastes: I like shortname and you like fullname. That is the first line of the get_content function in block_marking.php

it is now in cvs and i agree: we should merge the two entries in the plugins database.
In reply to Bruno Vernier

Re: New Marking Block

by Mark Tyers -
Hi Bruno.
Maybe we should add a config page to allow users to change between shortname and fullname. Possibly also give the option of changing the name displayed in the block header.

Could you give me write access to the CVS repository? I already have a SourceForge account (username: marktyers). As soon as I can edit the code I will pull the duplicate entry in the Modules database. Might be worth updating the screenshot and the block name (just call it the marking block).

If you need to get in touch my email is mark.tyers@synergy-learning.com
In reply to Mark Tyers

Re: New Marking Block

by Bruno Vernier -
Mark: a config page would be good (although i won't have time to work on it this week)

for the cvs access, i think you need to email Martin Dougiamas directly:

Once you have a working Sourceforge account, contact Martin Dougiamas so he can set up your account with write access to particular Moodle directories
In reply to Bruno Vernier

Re: New Marking Block

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Bruno, I see you started a marking_18 directory:

http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/blocks/marking_1.8/

Please don't do that. Use the same directory as before:

http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/blocks/marking/

If you want to have different versions, then use the branches, they are the same as the ones for the core Moodle (MOODLE_18_STABLE, MOODLE_17_STABLE) etc.

These get packaged up automatically for download like this:

http://download.moodle.org/download.php/plugins18/blocks/marking.zip

http://download.moodle.org/download.php/plugins17/blocks/marking.zip

and so on.

I've deleted the new directory and moved the new files to the old directory on HEAD and MOODLE_18_STABLE for you.

Cheers
In reply to Martin Dougiamas

Re: New Marking Block

by Bruno Vernier -
thank you very much, Martin! that is a much better way to do it, indeed smile
In reply to Mark Tyers

Re: New Marking Block

by Sharon Goodson -

I've been using the older marking block and the ungraded block . We couldn't enable ajax because it conflicted with activity locking, but we've since given up on keeping AL running (and will wait impatiently for moodle 2.0). So we're using the ajax_marking block now and love it!

Unlike allot of users, however, we would like admin to be able to see all ungraded work across all courses. Since we're a smaller, self-paced K-12 school, we don't have 100s (1000s!) of items to grade at a time (at least not yet! *lol*)

Is there a snippet of code I can add or change that would enable this? (like anything's that simple.) I tried looking at the differences between before and after admin view changed, and even tried a few things, but didn't get anywhere, likely because the ajax is considerably different (or more likely because I don't know php *lol*).

Thanks for any suggestions!

In reply to Sharon Goodson

Re: New Marking Block

by Matt Gibson -
Hi Sharon,

yes there is a reasonably simple way of doing this, but it will requires changes in a few places.
  • get_my_courses() has an adminseesall check which needs altering
  • the SQL statements check to see if the user is a teacher in any of the courses
  • the permissions check has an adminseesall check of some sort
I have made a bug report in the tracker and will start poking around to see if I can make a setting for it - CONTRIB-1017 feel free to add yourself as a watcher or comment on it.

Average of ratings: Useful (1)
In reply to Matt Gibson

Re: New Marking Block

by Sharon Goodson -
That's awesome, Matt! I thought my post might be here a while before something came up, thanks for the quick response!! smile I voted and I'm watching.
In reply to Sharon Goodson

Re: New Marking Block

by Rohith Nair -
Thanks for the graet and help ful block and article.

I need a help..How can i get the marked assessment...?? I mean in which table?

I need to create a view of marked assessment for the day or within the dates like..so need to know in which table is saving...
In reply to Mark Tyers

Re: New Marking Block

by Matt Gibson -
Hi Mark and Bruno,

this is great! I'd been so missing the old marking block that I started writing a new one myself, not realising you were doing the same!

I've taken a more long winded approach and have a working AJAX implementation for assignments, but its a bit messy at the moment. I'll tidy up the code and post in a day or so. Its all java with no PHP fallback, so I think it would integrate nicely.

Matt
In reply to Mark Tyers

Re: New Marking Block

by Wayne Carroll -

Has anyone resolved the oproblems with this block?

I am keen to use it... with Moodle 1.8

In reply to Wayne Carroll

Re: New Marking Block

by Bruno Vernier -
Wayne: both versions of the moodle marking block work: both the ajax and non-ajax versions work in version 1.8 of moodle
In reply to Wayne Carroll

Re: New Marking Block

by Dan Jeffries -
Hi

Firstly - thanks for developing what is an important block!

However, we have experienced some issues which I would like to share.

1. This year we have used the 'restore' function to 'wipe clean' our courses. However, I wasn't aware that restoring the course doesn't remove all the files submitted that year. Therefore, any pieces of work not marked from the previous year now show up in that block.

2. Quizzes. It seems to show a huge list of quiz attempts which seems unnecessary and clutters the front page. Any way around this?

3. The marking block displays short course name, whereas we would rather have the course title.

I was hoping to see some settings in the blocks>marking section but can't seem to see any. sad

Hopefully these are resolvable and any help would be greatly appreciated!

Dan
In reply to Dan Jeffries

Re: New Marking Block

by Matt Gibson -
AJAX marking block fixes 1 & 2. I'll see about making a config setting in it for 3.
In reply to Matt Gibson

Re: New Marking Block

by Dan Jeffries -
thanks for the reply.

i've now turned AJAX on but there is still a huge list of assignments (quizzes).

Does the block need to be reinstalled? Is it a different download to the marking.zip block?

smile

Dan

EDIT: I figured doing a search for 'ajax marking block' would help - and it did! smile
In reply to Mark Tyers

Re: Ajax Marking Block and Moodle 1.9

by Larry Elchuck -
Hi Matt

I have a role (cloned and modified on the Non-editing Teacher Role) that allows teachers in our system view but not grade all other courses on our system. This is so they can assist students using our realtime video-conferencing solution, Marratech.

In Moodle 1.8, all I needed to do was to Prevent ... Grade Assignments and the marking block did not display courses (with unmarked assignments) other than their own.

This changed in Moodle 1.9 beta and I prevented the following, in addition to Grade Assignments:

  1. Rate Posts
  2. Manage graded items
  3. Edit Grades
  4. Manage Quizzes
  5. Grade quizzes manually

It appears to work ok. Does this sound like the right combination of permissions to modify for this role? (I'm thinking I might get by with only
  1. Grade Assignments
  2. Rate Posts
  3. Edit Grades
  4. Grade quizzes manually

thanks
larry
In reply to Larry Elchuck

Re: Ajax Marking Block and Moodle 1.9

by Matt Gibson -
Ah, I see now.

The capabilities it checks for are:
  • mod/assignment:grade
  • mod/workshop:manage
  • mod/forum:rate
  • mod/quiz:grade
so those are the ones to prevent if you want to hide it from a role.
In reply to Matt Gibson

Re: Ajax Marking Block and Moodle 1.9

by Larry Elchuck -
Matt

I do notice that with only
set to prevent, the site admin still sees all marking that needs to be done. Is this expected behaviour (wasn't in 1.8)?

Perhaps I need to probit one or more other ones?

larry

In reply to Larry Elchuck

Re: Ajax Marking Block and Moodle 1.9

by Matt Gibson -
Strange. It was a while ago, but I thought I'd fixed that one. I'll have a look over the weekend. Does the site admin have the 'can do anything' capability and are they a teacher in the courses (does the course show up in their My course block)?
In reply to Matt Gibson

Re: Ajax Marking Block and Moodle 1.9

by Larry Elchuck -
Hi Matt

Attached is a snapshot of the menu items for the admin fir both moodle 1.8.3 and 1.9b2 (both latest CVS builds). The 1.8.3 dataset was cloned and updated to work with the 1.9b2 install.

The admin does have the "can do anything" capability and all courses show up in both versions. but the marking block only shows up in 1.9b2. It might have something to do with the new capabilities as mentioned above.

marking block pix

Have a good weekend.
larry
In reply to Matt Gibson

Re: Ajax Marking Block and Moodle 1.9

by Larry Elchuck -
Matt

I also noticed that when the admin logs in as a student, the marking block appears with the horray message.

ajax 2

larry
In reply to Larry Elchuck

Re: Ajax Marking Block and Moodle 1.9

by the apprentice -
I have marked all the assignments for my course, yet the marking block still insists that there is one outstanding! I've gone back in and modified all the entries hoping this would refresh the status, but it hasn't.

I'm using this with 1.8.2, hosted with siteground.

Any ideas or help welcome! big grin
In reply to the apprentice

Re: Ajax Marking Block and Moodle 1.9

by Ed Butler -
I'm using marking block with the latest stable moodle 1.8.3+ and the newest marking block. I did a reset of all my courses before adding in the marking block but I have a lot of marking to do, leftovers from this year. I have gone in and reset the courses again but still lots any Ideas.
Attachment Marking.png
In reply to Mark Tyers

Re: New Marking Block

by Marty Gilbert -
Picture of Core developers
HELP! ;)

I'm running Moodle 1.8.2+, with Marking Block version 31/07/07.

The block appears to run correctly, showing all assignments that are ungraded. However, when I click on an assignment to grade it, I receive the following error message: "A required parameter (d) was missing".

Any clue what may be causing this? Any help is appreciated!

-Marty
In reply to Marty Gilbert

Re: New Marking Block

by Marty Gilbert -
Picture of Core developers
I posted the 'A required parameter (d) was missing' error late last friday, probably right when people were getting ready to leave for the weekend.

Any ideas what I should try to fix this problem? Any help or suggestions would be greatly appreciated.

-Marty
In reply to Marty Gilbert

Re: New Marking Block

by ftuzi ftuzi -
Line 175 (or there abouts) in lock_marking.php needs to be revised to

$url = $CFG->wwwroot.'/mod/forum/discuss.php?d=' . $discussion->id; // fixed



That should fix the forums segment of the marking
In reply to ftuzi ftuzi

Re: New Marking Block

by Rich Boettner -
The fix you have listed only has the letter d after the ?, is this correct or is it supposed to be ?id='
In reply to Rich Boettner

Re: New Marking Block

by Frederic Nevers -
Hi,

I've installed the block on a 1.9.1 version and a 1.9.2 clean version and I cannot get the block to work. It shows me the endless spinning wheel (the data in brackets seems correct though).

Is there anything I need to do?

Cheers,
Fred
In reply to Mark Tyers

Re: New Marking Block

by Gina Bennett -
Fred Nevers mentioned that the marking block wasn't working with v.1.9.... Has anyone else had this problem? or more to the point: has anyone got it working with v. 1.9??? We are reluctant to use Ajax versions because we have found Ajax to be somewhat unreliable with some browsers. So our ideal would be a non-Ajax marking block that works in 1.9.

Gina
In reply to Gina Bennett

Re: New Marking Block

by Frederic Nevers -
Hi Gina,

A few things have changed this my last post so I feel that I need to rephrase: for some completely unexplained reason, the block started working a couple of days after I installed it. I suppose there was a massive issue of caching/proxy or something in the like.

In short, I have managed to get the block to successfully work but there is still one issue as in it won't display the "essay" type questions (spinning wheel issue). I have notified the creator of the block and he is looking into the issue.

I think this block works very well (apart from this glitch) and I have tested it in Safari for Mac, Firefox 2 and 3, IE6 and 7 and it works fine in all these. I also tested it on Linux and Mac versions of Firefox. I have not tested it on Opera, Chrome or any other browser, but it covers the bulk of things.

When the essay question type works, this block will be a must have in all installations IMHO smile

Hope this helps.

Fred
In reply to Mark Tyers

Re: New Marking Block

by Dan Leighton -
We have had some problems getting this block to work in 1.9.3

The block seems to work OK in FF and Chrome. It does not display the teachers courses at all in IE.

It also does very strange things when you click the configure button...which kind of dissappear if you refresh the page.

Even in FF and Chrome it does not seem to pick up all the teachers courses.

Oh, and we get the "This block has not been implemented correctly and thus cannot provide a configuration interface" error...

Any ideas please?

Many thanks

d.


In reply to Dan Leighton

Re: New Marking Block

by Peter Diedrichs -
Picture of Particularly helpful Moodlers
The block shows the teachers unmarked posts as well as the students in the gradeable forums, how to prevent this?
In reply to Peter Diedrichs

Re: New Marking Block

by Matt Gibson -
If the teachers also have a student role, they will show up. Otherwise, that's really odd as the results are filtered against a list of students who are currently enrolled and teachers should be excluded.

Do you mean posts that the teacher viewing the block has made themselves, or the posts of other teachers in the same course?

Also, are your teachers in the 'teacher' role, or have you got a custom role for them?


In reply to Dan Leighton

Re: New Marking Block

by Matt Gibson -
Hi there,

sorry for the delay - I didn't see this post. The block works for me in IE, including the configure link, so I need some more information in order to reproduce the issue. Could you tell me:
  • What version of IE you're using
  • what version (exact number e.g. 2007100101) from the admin->notifications screen
  • What version of the block you're using (admin->modules->manage blocks)
  • A screenshot of what goes wrong
  • There should be an error icon at the bottom of the screen that will tell you, when clicked on, what line of javascript.js is misbehaving - can you tell me what it says?
The error message about configuration is deliberate (it doesn't have any whole site configuration options as everything is per-user), but I will fix this in the next week or so, removing this warning.

Feel free to message me directly if you have any questions.

Matt
In reply to Matt Gibson

Re: New Marking Block

by Matt Gibson -
I should point out that this applies to the AJAX marking block and not to the one discussed in the main part of this thread. Please start new forum topics with this title if you need to as I missed this one until just now.
In reply to Mark Tyers

Re: New Marking Block

by Claire Browne -
Hi,

I am after a report which will tell me the progress or the total of each teachers marking habbits.

For example;

I want to know how much marking teacher a has done in a specific time period?

Is there a report out there for this?
In reply to Claire Browne

error while deleting submitted assignment

by Dhoom La -
Thanks for the marking block. I have added the marking block to the moodle. It was working fine.

But now i found an error in the marking block not in ajax marking, like if i have added a assignment as student and logged in as admin and i can see the assignment came in marking and showing in marking block as Submit Assessment (1).

But after that i have logged in as student and i have deleted the submitted assignment.

And i have logged as admin. I thought like the marking block will not show the deleted assignment count in marking block. But its still there.

I have checked the database and found that while deleting the submitted assignment the entry from the assignment_submission table is not deleting instead its updating the row of the table. its updating the modified time in table. So its again showing in marking block.


In reply to Mark Tyers

Re: New Marking Block

by Billie Clark -

I'm having a problem that I can't seem to remedy with the Marking block.  I gave several quizzes that had random questions that required manual grading.  I graded all the responses for each question but the quiz questions are still showing on the Marking Block as open and needing grading.  I don't know what I'm doing wrong.  Any suggestions?