Can't see students Essay's

Can't see students Essay's

by Ben Stilwell -
Number of replies: 3

I created a short lesson which requires a student to complete an essay question.

Upon testing with demo student account I complete the essay and get to the "End of Lesson" page.

Then I check with my admin account to see the submitted essay and when I click on "Grade Essays" I see "No one has answered an essay question yet."

Any help?

Also is there a way to have students use an editor text area instead of the standard html textarea to compose their essay?

Average of ratings: -
In reply to Ben Stilwell

Re: Can't see students Essay's

by David Jones -

Hi Ben

I had the same problem when I started using the essay question and the problem I found was that I had not given the question a name so it was not visible for marking. That was way back in Moodle 1.4, I’m now using 1.8 if you forget, the error is now highlighted so it should not arise.

David Jones

In reply to David Jones

Re: Can't see students Essay's

by Ben Stilwell -
Doesn't seem to be the problem. I'll try some trial and error today to see if I can find the problem, I guess I'll probably end up jumping into the code.
In reply to Ben Stilwell

Re: Can't see students Essay's

by Ben Stilwell -

So I'm still working on this to make it work for me. I turned debugging on to see the following errors:

Notice: Trying to get property of non-object in /services/webpages/d/o/webserver.com/public/moodle/mod/lesson/view.php on line 966

Notice: Trying to get property of non-object in /services/webpages/d/o/webserver.com/public/moodle/mod/lesson/view.php on line 970

referring to:

$pageid = $firstattempt->pageid;

$USER->modattempts[$lesson->id] = $lastattempt->pageid;

My thought was that this has to do with the pageid which shows as being set to -9.

I was also getting an error on:

Notice: Trying to get property of non-object in /services/webpages/d/o/webserver.com/public/moodle/mod/lesson/action/continue.php on line 668

which refers to:

if($response)

immediately preceding this is:

        if (empty($response)) {
            if (!$lesson->feedback and !$noanswer and !($lesson->review and !$correctanswer and !$isessayquestion)) {
                // These conditions have been met:
                //  1. The lesson manager has not supplied feedback to the student
                //  2. Not displaying default feedback
                //  3. The user did provide an answer
                //  4. We are not reviewing with an incorrect answer (and not reviewing an essay question)
               
                $nodefaultresponse = true;  // This will cause a redirect below
            } else if ($isessayquestion) {
                $response = get_string('defaultessayresponse', 'lesson');
            } else if ($correctanswer) {
                $response = get_string('thatsthecorrectanswer', 'lesson');
            } else {
                $response = get_string('thatsthewronganswer', 'lesson');
            }
        }

I've bolded the if statement and the php statement because it was indeed firing, but it seems to me it shouldn't. Instead the first else..if statement should have gone. So on that assumption I changed it to:

if (!$lesson->feedback and !$noanswer and (!$lesson->review and !$correctanswer and !$isessayquestion))

which seemed to match what the comments said it was supposed to do.

Anyway, this changed things a bit, now after clicking "Please enter your answer in the box" it takes me to a page that appears to be a review with a "continue" button. Clicking the continue takes me to the "Congratulations - end of lesson reached" page with above 2 errors and no entry into the "Grade Essays" section for the admin.

So I'm still stuck. Please, please help.