Can gradebook pull a grade from a quiz taken in another course?

Can gradebook pull a grade from a quiz taken in another course?

by Jason Hollowell -
Number of replies: 6
Picture of Particularly helpful Moodlers
I'm trying to do something that I think may not be possible but I thought I'd throw this out and see if anyone has any ideas.

We'd like to set up a test that is going to be taken by all 1st year students in our program. It is a kind of standardized test that all students take as a final exam regardless of which class section they are in. The results of the test count for a percentage of their grade and we'd like to set up the test in a meta course that is linked to all the courses the students are enrolled in. This will allow for easy auto enrollment in the meta course where students can take the test.

The test will be administered via the quiz module.

The trick is that we'd like to have the results pushed back to the gradebook of the child course that each student is enrolled in.

I haven't come across and easy way to do this yet so I'm guessing that it's either not possible or would involve way more tweaking (or complete reprogramming) that anyone at my institution is capable of.

Any insights will be appreciated. smile

Jason


In reply to Jason Hollowell

Re: Can gradebook pull a grade from a quiz taken in another course?

by Bob Puffer -
What might work for you is:
  1. quiz taken in meta-course
  2. quiz grade set up in each course in which it needs to count "as a manually added grade item" with similar grading structure as quiz
  3. cron.php setup in local folder off dirroot
  4. php code inside cron.php in local folder to query the database every ?? hours and update all grades from metacourse quiz to individual course manual grade items
We've done it a lot and the code's pretty simple. Let me know, I'll send you a sample.
In reply to Bob Puffer

Re: Can gradebook pull a grade from a quiz taken in another course?

by Larry Elchuck -
I'd like a sample please Bob

larry


In reply to Larry Elchuck

Re: Can gradebook pull a grade from a quiz taken in another course?

by Bob Puffer -
Here's the code that determines approximately how frequently the contained code runs in local/cron.php:
<<
srand ((double) microtime() * 10000000);
$random100 = rand(0,100);

if ($random100 < 20) { // Approximately 20% of the time.
RUN CODE
}
>>

moodle's cron runs every 5 minutes (this is configurable on the server cron).
if you want it to run less often than 20% of the time (every 25 minutes) increase the random100 number to
rand(0,<some multiple of 100 by which the frequency will be decreased>)
example: rand(0,5750) will run it approximately every 24 hours

I've attached a couple examples of where we go get grades and put them somewhere else. Hope this helps. Let me know if you have additional questions.


In reply to Bob Puffer

Re: Can gradebook pull a grade from a quiz taken in another course?

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Bob,

Thanks a million! I was pretty sure there was no way to do it in Moodle as is and was trying to figure out the best way to 'tweak' it and it looks like you've got it! smile

I'm going to look into setting this up and will report back here....hopefully when I have success smile

Jason
In reply to Jason Hollowell

Re: Can gradebook pull a grade from a quiz taken in another course?

by james yorke -

Hi all

Interested in exploring this further, am I right in thinking the supplied sample code txt would need changing for each course that wanted to use this functionality and where exactly does the code need to be put (inside the cron.php?)

Thanks

J