Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31341

Add "Student must submit this activity to complete it" to the Activity Completion tracking options

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.4
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Change these admin settings
        1. enablecompletion = On
        2. enableavailability = On
        3. moodlecourse | enablecompletion = "Enabled, control via completion and activity settings"
      2. Edit the settings for a course and set "Student progress -> Completion Tracking" to "Enabled, control via completion and activity settings"
      3. Create an assignment in the course and set the Activity completion to "Show activity as complete when conditions are met" and check the "Student must submit to this activity to complete it" checkbox
      4. Login as a student and view course
      5. Verify assignment is not listed as complete
      6. Submit to the assignment and view the completion report again
      7. Verify assignment is listed as complete
      8. Login as a teacher and enable "Require students click submit button" for the assignment
      9. Revert the students submission to draft
      10. Login as the student and view course
      11. Verify assignment is not listed as complete
      Show
      Change these admin settings enablecompletion = On enableavailability = On moodlecourse | enablecompletion = "Enabled, control via completion and activity settings" Edit the settings for a course and set "Student progress -> Completion Tracking" to "Enabled, control via completion and activity settings" Create an assignment in the course and set the Activity completion to "Show activity as complete when conditions are met" and check the "Student must submit to this activity to complete it" checkbox Login as a student and view course Verify assignment is not listed as complete Submit to the assignment and view the completion report again Verify assignment is listed as complete Login as a teacher and enable "Require students click submit button" for the assignment Revert the students submission to draft Login as the student and view course Verify assignment is not listed as complete
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:

      Description

      Currently, the only two options that can flag an activity as completed are "Student must view..." and "Student must receive a grade..." If an activity must be manually graded, there needs to be a way to allow "submitted" to allow it to be considered completed. This would allow students to progress through the activities in the order prescribed by the teacher, without having to wait for the teacher to grade the activity.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            quen Sam Marshall added a comment -

            I believe this has to be done per-activity as there is no way to handle it generically. (Generic handling relies on the gradebook being a standard feature; and if there isn't a grade in the gradebook, that isn't going to work.)

            It is possible to add custom completion conditions to activities so this is possible without changing the activity completion API.

            Which specific activities did you have in mind where this support would be useful? (I am not familiar with all of the Moodle activities.)

            Show
            quen Sam Marshall added a comment - I believe this has to be done per-activity as there is no way to handle it generically. (Generic handling relies on the gradebook being a standard feature; and if there isn't a grade in the gradebook, that isn't going to work.) It is possible to add custom completion conditions to activities so this is possible without changing the activity completion API. Which specific activities did you have in mind where this support would be useful? (I am not familiar with all of the Moodle activities.)
            Hide
            kimberw Kimber Warden added a comment -

            It would be helpful if even only the core activities had the option, such as quizzes, advanced uploading of files, online text, upload a single file, databases, and lessons.

            Show
            kimberw Kimber Warden added a comment - It would be helpful if even only the core activities had the option, such as quizzes, advanced uploading of files, online text, upload a single file, databases, and lessons.
            Hide
            quen Sam Marshall added a comment -

            Tim, as quiz maintainer what would you think about adding this feature to quiz (= a way to mark it complete when quiz is submitted rather than the existing automatic support for marking it complete when graded). Good idea? Bad idea? Should have some generic support even though it can't be coded generically as far as I can see?

            Dev docs currently at:

            http://docs.moodle.org/dev/Conditional_activities_Adding_module_support#Custom_completion_rules

            Show
            quen Sam Marshall added a comment - Tim, as quiz maintainer what would you think about adding this feature to quiz (= a way to mark it complete when quiz is submitted rather than the existing automatic support for marking it complete when graded). Good idea? Bad idea? Should have some generic support even though it can't be coded generically as far as I can see? Dev docs currently at: http://docs.moodle.org/dev/Conditional_activities_Adding_module_support#Custom_completion_rules
            Hide
            timhunt Tim Hunt added a comment -

            Dev docs also at http://docs.moodle.org/dev/Conditional_activities_API and http://docs.moodle.org/dev/Activity_completion_API, since the HQ documentation effort seems to involve creating a lot of duplication.

            Yes, because of Manual grading, and ungraded quizzes, completion on submit is a good idea. Would be good to try to come up with a consistent definition that can be implemented by all the modules for which it makes sense (like complete on view which needs to be implemented in the module, but which as quite a consistent definition).

            I suppose it makes sense for assignment, quiz, lesson, scorm, ... Do you want to create subtasks for each relevant module, and assign the quiz one to me.

            For quiz, if the quiz allows N attempts, do we need to offer two settings: "Submit at least one attempt" and "Submit all allowed attempts"?

            Show
            timhunt Tim Hunt added a comment - Dev docs also at http://docs.moodle.org/dev/Conditional_activities_API and http://docs.moodle.org/dev/Activity_completion_API , since the HQ documentation effort seems to involve creating a lot of duplication. Yes, because of Manual grading, and ungraded quizzes, completion on submit is a good idea. Would be good to try to come up with a consistent definition that can be implemented by all the modules for which it makes sense (like complete on view which needs to be implemented in the module, but which as quite a consistent definition). I suppose it makes sense for assignment, quiz, lesson, scorm, ... Do you want to create subtasks for each relevant module, and assign the quiz one to me. For quiz, if the quiz allows N attempts, do we need to offer two settings: "Submit at least one attempt" and "Submit all allowed attempts"?
            Hide
            quen Sam Marshall added a comment -

            You're off work, why are you answering tracker questions

            Subtasks seem sensible but before that I was wondering kind of like you mentioned - should I make like view, so you add feature FEATURE_COMPLETION_SUBMIT or something and there is a field in course_modules to store whether it's on or not, and the extra checkbox appears in the form without you doing anything, and you just have to call a (new) function when a submit happens, to update it.

            (Alternative: no new feature, you add field to the module table to record whether it's on or not, you have to add extra checkbox in the appropriate function inside your mod_form.)

            Basically is it worth adding this into the actual API or better to just implement per-module... It's not the same as view which basically all modules can/should implement, but it might be a fair proportion, so I dunno.

            Show
            quen Sam Marshall added a comment - You're off work, why are you answering tracker questions Subtasks seem sensible but before that I was wondering kind of like you mentioned - should I make like view, so you add feature FEATURE_COMPLETION_SUBMIT or something and there is a field in course_modules to store whether it's on or not, and the extra checkbox appears in the form without you doing anything, and you just have to call a (new) function when a submit happens, to update it. (Alternative: no new feature, you add field to the module table to record whether it's on or not, you have to add extra checkbox in the appropriate function inside your mod_form.) Basically is it worth adding this into the actual API or better to just implement per-module... It's not the same as view which basically all modules can/should implement, but it might be a fair proportion, so I dunno.
            Hide
            quen Sam Marshall added a comment -

            oops forgot - re the N attempts, I guess if using the API there would only be one option. If implementing it separately there could be two possibly. That might be an argument for implementing it separately, or it might not...

            Show
            quen Sam Marshall added a comment - oops forgot - re the N attempts, I guess if using the API there would only be one option. If implementing it separately there could be two possibly. That might be an argument for implementing it separately, or it might not...
            Hide
            salvetore Michael de Raadt added a comment -

            Looks like you're off to a good start with this, Sam.

            I've triaged this, but please keep going.

            Show
            salvetore Michael de Raadt added a comment - Looks like you're off to a good start with this, Sam. I've triaged this, but please keep going.
            Hide
            quen Sam Marshall added a comment -

            Tim, oponion about my last comment?

            Show
            quen Sam Marshall added a comment - Tim, oponion about my last comment?
            Hide
            bbear31oz Steven Evans added a comment -

            This would be a fantastic feature, and would enhance an already solid part of the application. I am in the process of trialing Moodle in our organisation, and it's the little things like this that are causing 'sticking point's in the negotiations. I have also noticed this feature in another 'on-line' cloud based LMS that is making brave remarks about positioning itself against Moodle... so hope it can get into the assignment completion options soon. Thanks for all the dev work you do to make this a great resource!

            Show
            bbear31oz Steven Evans added a comment - This would be a fantastic feature, and would enhance an already solid part of the application. I am in the process of trialing Moodle in our organisation, and it's the little things like this that are causing 'sticking point's in the negotiations. I have also noticed this feature in another 'on-line' cloud based LMS that is making brave remarks about positioning itself against Moodle... so hope it can get into the assignment completion options soon. Thanks for all the dev work you do to make this a great resource!
            Hide
            kbsmith Kenton Smith added a comment -

            Seems like an obvious omission, particularly for assignments. In most cases, users would be interested in a tracking option if it was submitted. This is especially helpful when paired with the course completion block (students become confused when no check appears even though they know they've "completed" the task of submitting the assignment). While labeled as a minor improvement, I would argue that this is a higher pedagogical and functional design limitation that needs to be added.

            Show
            kbsmith Kenton Smith added a comment - Seems like an obvious omission, particularly for assignments. In most cases, users would be interested in a tracking option if it was submitted. This is especially helpful when paired with the course completion block (students become confused when no check appears even though they know they've "completed" the task of submitting the assignment). While labeled as a minor improvement, I would argue that this is a higher pedagogical and functional design limitation that needs to be added.
            Hide
            kbsmith Kenton Smith added a comment -

            "Student must submit this activity to complete it" is a glaring and seemingly obvious option that has not been included in the assignment activity completion section.

            Show
            kbsmith Kenton Smith added a comment - "Student must submit this activity to complete it" is a glaring and seemingly obvious option that has not been included in the assignment activity completion section.
            Hide
            quen Sam Marshall added a comment -

            Tim never answered my question above in this issue, but I think he answered it in person: basically we think there is no need for a change to the completion API, and instead it would be down to the assignment module to implement this option as part of its custom completion conditions.

            Reassigning it to assignment module lead.

            Show
            quen Sam Marshall added a comment - Tim never answered my question above in this issue, but I think he answered it in person: basically we think there is no need for a change to the completion API, and instead it would be down to the assignment module to implement this option as part of its custom completion conditions. Reassigning it to assignment module lead.
            Hide
            quen Sam Marshall added a comment -

            Note for developer: Here is the documentation for custom completion conditions:

            http://docs.moodle.org/dev/Activity_completion_API#Custom_completion_rules

            Show
            quen Sam Marshall added a comment - Note for developer: Here is the documentation for custom completion conditions: http://docs.moodle.org/dev/Activity_completion_API#Custom_completion_rules
            Hide
            quen Sam Marshall added a comment -

            Very sketchy mini review (I only skimmed it, don't have time today) - this looks right to me!

            I did spot a few trivial details that will cause codechecker warnings on some of the added lines, so you should run codechecker and fix those.

            Please could whoever is responsible for assignment code-review this change properly and (once satisfactory) get it integrated?

            Show
            quen Sam Marshall added a comment - Very sketchy mini review (I only skimmed it, don't have time today) - this looks right to me! I did spot a few trivial details that will cause codechecker warnings on some of the added lines, so you should run codechecker and fix those. Please could whoever is responsible for assignment code-review this change properly and (once satisfactory) get it integrated?
            Hide
            quen Sam Marshall added a comment -

            Oh. You ARE the assignment maintainer. oops

            Show
            quen Sam Marshall added a comment - Oh. You ARE the assignment maintainer. oops
            Hide
            abgreeve Adrian Greeve added a comment -

            Hi Damyon,

            The patch in general looks good.
            A few notes:

            • When running through the testing instructions I couldn't get the assignment to switch over to being complete until I set 'Require students click submit button' to 'Yes'.
            • Line 2502 of mod/assign/locallib.php

              $completion->update_state($this->get_course_module(), COMPLETION_COMPLETE, $userid);

              Should probably read -

              $completion->update_state($this->get_course_module(), COMPLETION_COMPLETE, $USER->id);

            • Line 3056 of mod/assign/locallib.php declares the global variable $USER, but it's not used in that function at all and could be removed.

            Thanks for your hard work.

            Show
            abgreeve Adrian Greeve added a comment - Hi Damyon, The patch in general looks good. A few notes: When running through the testing instructions I couldn't get the assignment to switch over to being complete until I set 'Require students click submit button' to 'Yes'. Line 2502 of mod/assign/locallib.php $completion->update_state($this->get_course_module(), COMPLETION_COMPLETE, $userid); Should probably read - $completion->update_state($this->get_course_module(), COMPLETION_COMPLETE, $USER->id); Line 3056 of mod/assign/locallib.php declares the global variable $USER, but it's not used in that function at all and could be removed. Thanks for your hard work.
            Hide
            damyon Damyon Wiese added a comment -

            Rebased and fixed these comments.

            Also sometimes I could not see the activity marked as completed in the course view - but it was in the completion report - I think this is an unrelated bug.

            Show
            damyon Damyon Wiese added a comment - Rebased and fixed these comments. Also sometimes I could not see the activity marked as completed in the course view - but it was in the completion report - I think this is an unrelated bug.
            Hide
            damyon Damyon Wiese added a comment -

            Just updated the branch because I found a var_dump left in the code.

            Show
            damyon Damyon Wiese added a comment - Just updated the branch because I found a var_dump left in the code.
            Hide
            abgreeve Adrian Greeve added a comment -

            Looks good to me.
            Please put up for integration.

            Show
            abgreeve Adrian Greeve added a comment - Looks good to me. Please put up for integration.
            Hide
            damyon Damyon Wiese added a comment -

            Thanks Adrian

            Show
            damyon Damyon Wiese added a comment - Thanks Adrian
            Hide
            poltawski Dan Poltawski added a comment -

            I've integrated this, thanks guys.

            Show
            poltawski Dan Poltawski added a comment - I've integrated this, thanks guys.
            Hide
            timb Tim Barker added a comment -

            Congrats, your test passed.

            Show
            timb Tim Barker added a comment - Congrats, your test passed.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            While testing MDL-32759, I noticed the following error when creating the new assignment module.

            Notice: Undefined property: stdClass::$completionsubmit in /master/mod/assign/locallib.php on line 420

            Tim, could you re-confirm this error? thanks

            Show
            rwijaya Rossiani Wijaya added a comment - While testing MDL-32759 , I noticed the following error when creating the new assignment module. Notice: Undefined property: stdClass::$completionsubmit in /master/mod/assign/locallib.php on line 420 Tim, could you re-confirm this error? thanks
            Hide
            damyon Damyon Wiese added a comment -

            Thanks Rossiani, Raymond just posted a bug for that issue. MDL-35004.

            Show
            damyon Damyon Wiese added a comment - Thanks Rossiani, Raymond just posted a bug for that issue. MDL-35004 .
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            YEAR!*

            CAF*, TOT!*

            • Your effort amazingly resulted. (unbelievable :-P)
            • Closing as fixed.
            • Tons of thanks.
            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - YEAR!* CAF*, TOT!* Your effort amazingly resulted. (unbelievable :-P) Closing as fixed. Tons of thanks.
            Hide
            marycooch Mary Cooch added a comment -

            Removing docs_required as I have just added this here http://docs.moodle.org/24/en/Activity_completion_settings but I noticed in the completion settings there is no name (such as "Require submission") or help text.

            Show
            marycooch Mary Cooch added a comment - Removing docs_required as I have just added this here http://docs.moodle.org/24/en/Activity_completion_settings but I noticed in the completion settings there is no name (such as "Require submission") or help text.

              People

              • Votes:
                13 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/12