Instant Moodle Marking (tm)

Instant Moodle Marking (tm)

by Bruno Vernier -
Number of replies: 7
First, The problem:

I teach self-paced students (continous entry and exit) in several moodle courses. When students do an activity that needs marking, I used to have to:

1. look at the logs and figure out which ones I missed marking (and which ones are markable) and/or check my email and/or check each activity one by one within a course

2. cycle through each course and perform step 1

(very tedious)

Second, the solution: Instant Moodle Marking

I wrote this script called topbar.php which i include in header.php and which gives me a dynamic menu of (almost) everything that needs marking at a given moment. It is still very rough and some SQL needs major review; for example, postings to be marked don't reliably show up ... and it is meant for a small moodle site with the teacher = the admin ... but in the spirit of "release early and often", I am posting here.

the script creates a link directly to the marking area for each activity that has not been marked yet (in the top bar)

The script also calculates total marks for each of the students' courses in their topbar ... and shows links to each of the registered courses for quick navigation between courses.

I started using this script in the past few days. My marking productivity tripled and I really like the visual clue (number of links) that indicates how much marking I have left to do

As soon as a student submits an activity for marking, I see it and can mark it instantaneously ... hence the title of the post.
Average of ratings: -
In reply to Bruno Vernier

Re: Instant Moodle Marking (tm)

by Dale Jones -
Great idea Bruno, this will help me a lot.  One question - could you explain how to install it again please?  I can't find header.php anywhere.

TIA
Dale
In reply to Dale Jones

Re: Instant Moodle Marking (tm)

by W Page -

Hi Bruno!

I installed the script in the "header.html" file (not a "header.php" file - was this correct or what you meant??)  which is in the "theme name" directory inside the "theme" directory in moodle.  The path would be,
moodle/theme/themename/header.html (standard)

I placed the script at the end of the original script in the "header.html"  and before the "<!-- END OF HEADER -->" line. 

I now see the following line under the navigation bar and the rest of the page table,
"Admin ask your instructor to register you in a course"

I must admit I am not clear as to how to use this feature.  Could you provide a bit more instructions as to how to use it and provide some screen shots.

If this can cut out some of the work in grading and still be accurate I want to check it out.

Thaanks in advance.

WP1

In reply to Bruno Vernier

Re: Instant Moodle Marking (tm)

by Bruno Vernier -
Thank you WP1 and Dale for your interest.

Here is a screen shot (attached)  ... look at the very top and you can see a list of links to each course and on the line below you can see a link to a posting that has to be marked (it is labelled forum with the course number and the student number that corresponds).. there can be dozens of these links in that second line (depending on how far behind I am in my marking)

I changed header.html in theme/standard like this: in both heading and navigation tables (there are only two tables; it is not difficult to find them) ... notice that the above assumes you put topbar.php in that theme folder ... notice also the conditional checking for admin status (which will probably resolve your issue, WP1)

 I am going to rewrite topbar as two separate scripts: one for students to show which courses they are in and eventually to show which assignments they should be working at or redoing and one for teachers and admins to show what needs marking and which courses teachers are assigned to

again, this is at the "proof of concept" stage ... it works for me and occasionally I get into situations where what I marked does not get saved ... then I just do it again (so nothing disastrous) and there are some items that occasionally do not show up and should ...
Attachment screen.jpg
In reply to Bruno Vernier

Re: Instant Moodle Marking (tm)

by Bruno Vernier -
note to self: do not change editors half-way through posting on moodle sad (my previous post is missing the following code snippet and so does not make much sense)

here is the code to insert in theme/WHATEVER/header.html


<?php
if (isadmin()) {$is_admin=1;} else {$is_admin=0;}
include("topbar.php");
?>

in each one of the TD elements of each of the two tables in that header.html file

attached is a zip file of

topbar.php which lists courses taken by students and total marks so far

topbar2.php which lists stuff to be marked for all courses (admin only right now)

note that this WILL increase the loading time by a fraction of a second for all moodle webpages

I have topbar.php include topbar2.php

this version corrects several bugs from the first posted version
In reply to Bruno Vernier

Re: Instant Moodle Marking (tm)

by W Page -

Hello Bruno!

I need a bit more help.  If you could be patient with me for a little bit more I think I can get the script running properly.

  • I placed "topbar.php" and "topbar2.php" into the themename folder I am using for the script.  Is this correct?
  • Below is the "header.html" file from the "standardwhite" theme.  I have given each table in the file a separate color.  In each table I gave the <TD></TD> tags and the code within them a green color.  Can you please place the code you referred to above where it should be placed in "black" and bold?

I should be able to place the code correctly in the other theme directories after seeing this example.

<html<?php echo $direction ?>>
<head>
<?php echo $meta ?>
<title><?php echo $title ?></title>
<meta name="keywords" content="moodle, <?php echo $title ?> " />
<link rel="stylesheet" type="text/css" href="<?php echo $styles ?>" />
<link rel="shortcut icon" href="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
<?php include("$CFG->javascript"); ?>
</head>

<body<?php
   if ($focus) {
       echo "xxxsetfocus()";
   }
   echo " bgcolor=\"$THEME->body\">";
?>

<?php if ($home) {  // This is what gets printed on the home page only  ?>

  <table width="100%" cellpadding="10" cellspacing="0" border="0" class="headerhome">
    <tr>
      <td valign="top" class="headerhomemain"><?php echo $heading?></td>
      <td align="right" valign="top" class="headerhomemenu"><?php echo
$menu ?></td>
    </tr>
  </table>

<?php } else if ($heading) {  // This is what gets printed on any other page with a heading ?>

  <table width="100%" cellpadding="0" cellspacing="0" border="0" class="header">
    <tr>
      <td valign="top" class="headermain"><?php echo $heading?></td>
      <td align="right" valign="top" class="headermenu"><?php echo $menu ?></td>
    </tr>
  </table>

<?php } ?>


<?php if ($navigation) { // This is the navigation table with breadcrumbs  ?>

  <table border="0" cellpadding="3" cellspacing="0" width="100%">
    <tr>
      <td bgcolor="<?php echo $THEME->cellheading?>" class="navbar">
        <font size="2"><b><?php print_navigation("$navigation"); ?></b></font>
      </td>
      <td bgcolor="<?php echo $THEME->cellheading?>" class="navbar" align="right" width="20" valign="top"><?php
          echo $button;
      ?></td>
    </tr>
  </table>
  <img src="<?php echo $CFG->wwwroot?>/pix/spacer.gif" alt="" height="5" width="1" /><br />

<?php } else if ($heading) { // If no navigation, but a heading, then print a line  ?>

  <hr size="1" noshade="noshade" />

<?php } ?>

<!-- END OF HEADER -->

Thanks for your help.

WP1

In reply to W Page

Re: Instant Moodle Marking (tm)

by Bruno Vernier -

Sorry to cause confusion, WP: Yes, topbar.php and topbar2.php go in the theme folder just like the one you give as an example.

Here is your requested inserted code in black and bold: smile


<table width="100%" cellpadding="10" cellspacing="0" border="0" class="headerhome">
<tr>
<td valign="top" class="headerhomemain"><?php echo $heading?></td>
<td><?php
if (isadmin()) {$is_admin=1;} else {$is_admin=0;}
include("topbar.php");
?></td>
<td align="right" valign="top" class="headerhomemenu"><?php echo
$menu ?></td>
</tr>
</table>

<?php } else if ($heading) { // This is what gets printed on any other page with a heading ?>

<table width="100%" cellpadding="0" cellspacing="0" border="0" class="header">
<tr>
<td valign="top" class="headermain"><?php echo $heading?></td>
<td><?php
if (isadmin()) {$is_admin=1;} else {$is_admin=0;}
include("topbar.php");
?></td>

<td align="right" valign="top" class="headermenu"><?php echo $menu ?></td>
</tr>
</table>

<?php } ?>


<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td bgcolor="<?php echo $THEME->cellheading?>" class="navbar">
<font size="2"><b><?php print_navigation("$navigation"); ?></b></font>
</td>
<td bgcolor="<?php echo $THEME->cellheading?>" class="navbar" align="right" width="20" valign="top"><?php
echo $button;
?></td>
</tr>
</table>
<img src="<?php echo $CFG->wwwroot?>/pix/spacer.gif" alt="" height="5" width="1" /><br />

<?php } else if ($heading) { // If no navigation, but a heading, then print a line ?>

<hr size="1" noshade="noshade" />

<?php } ?>

<!-- END OF HEADER -->