Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Assignment
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. First visit the site administration -> notifications page to upgrade the module
      2. Enter some text in the "assign | submissionstatement" admin setting (e.g. "This is my own work")
      3. Set "assign | requiresubmissionstatement" to "Yes"
      4. Create a new instance of the assignment module (online text submission) with "Require students click submit button" set to no
      5. Login as a student and add a submission - you should be forced to accept the submission statement when you enter some text.
      6. Login as a teacher and change the assignment settings so that "Require students click submit button" is set to yes. Revert the previous student submission to draft.
      7. Login as a student and edit the submission - you should NOT be forced to accept the submission statement when you enter some text.
      8. Now submit the submission as a student - you SHOULD be forced to accept the submission statement.
      9. Login as a site admin and set "assign | requiresubmissionstatement" to "No" (Site administration -> Plugins -> Activity Modules -> Assignment)
      10. Find the assignment you created earlier and edit it's settings. Check that you set "Require students accept the submission statement" to yes or no.
      11. Login as a student and verify that the setting "Require students accept the submission statement" is hiding or showing the submission statement when submitting/editing the submission.
      Show
      First visit the site administration -> notifications page to upgrade the module Enter some text in the "assign | submissionstatement" admin setting (e.g. "This is my own work") Set "assign | requiresubmissionstatement" to "Yes" Create a new instance of the assignment module (online text submission) with "Require students click submit button" set to no Login as a student and add a submission - you should be forced to accept the submission statement when you enter some text. Login as a teacher and change the assignment settings so that "Require students click submit button" is set to yes. Revert the previous student submission to draft. Login as a student and edit the submission - you should NOT be forced to accept the submission statement when you enter some text. Now submit the submission as a student - you SHOULD be forced to accept the submission statement. Login as a site admin and set "assign | requiresubmissionstatement" to "No" (Site administration -> Plugins -> Activity Modules -> Assignment) Find the assignment you created earlier and edit it's settings. Check that you set "Require students accept the submission statement" to yes or no. Login as a student and verify that the setting "Require students accept the submission statement" is hiding or showing the submission statement when submitting/editing the submission.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-31288-POST23
    • Rank:
      37753

      Description

      This feature adds a statement and a checkbox that needs to be checked to the assignment submission screen that can be shown to all users when submitting assignments. The text of the statement should be configurable globally and customisable for each module.

      This is intended for things like "I confirm that this assignment is my own work".

        Issue Links

          Activity

          Hide
          Grette Wilkinson added a comment -

          Would also be great if this could be switched off at the assignment level.

          Such a statement is not always applicable to all types of work, eg. legal studies citing case law - the work is not theirs and they should not be claiming it as such.

          Show
          Grette Wilkinson added a comment - Would also be great if this could be switched off at the assignment level. Such a statement is not always applicable to all types of work, eg. legal studies citing case law - the work is not theirs and they should not be claiming it as such.
          Hide
          David Monllaó added a comment - - edited

          Hi Damyon,

          All is good for me, just a couple of little things:

          version.php

          • $module->requires value seems to be wrong

          mod_form.php

          • $config vars must be checked with !empty() or isset() to avoid notices when the settings are not set

          locallib.php

          • Same $config notice issue with $adminconfig vars
          • The process_submit_for_grading() @return tag value seems to be boolean
          Show
          David Monllaó added a comment - - edited Hi Damyon, All is good for me, just a couple of little things: version.php $module->requires value seems to be wrong mod_form.php $config vars must be checked with !empty() or isset() to avoid notices when the settings are not set locallib.php Same $config notice issue with $adminconfig vars The process_submit_for_grading() @return tag value seems to be boolean
          Hide
          Damyon Wiese added a comment -

          Thanks David,

          I have pushed a new patch that is rebased ontop of the latest integration branch and addresses all these issues you have raised.

          Regards, Damyon

          Show
          Damyon Wiese added a comment - Thanks David, I have pushed a new patch that is rebased ontop of the latest integration branch and addresses all these issues you have raised. Regards, Damyon
          Hide
          Damyon Wiese added a comment -

          Hi David,

          I just found this code causes a problem with the assignment upgrade tool so I will update this patch again shortly.

          • Damyon
          Show
          Damyon Wiese added a comment - Hi David, I just found this code causes a problem with the assignment upgrade tool so I will update this patch again shortly. Damyon
          Hide
          David Monllaó added a comment -

          All look great for me, thanks Damyon

          Show
          David Monllaó added a comment - All look great for me, thanks Damyon
          Hide
          Damyon Wiese added a comment -

          Just pushed an update that fixes the problem with the upgrade tool.

          Show
          Damyon Wiese added a comment - Just pushed an update that fixes the problem with the upgrade tool.
          Hide
          Damyon Wiese added a comment -

          Thanks David, Sending for integration

          Show
          Damyon Wiese added a comment - Thanks David, Sending for integration
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Aparup Banerjee added a comment -

          Hi Damyon,
          I've had a look through this patch. It seems really great. I've got some points and feedback for you below. I hope its useful

          • process_submit_for_grading() and check_submit_for_grading() says $mform argument is optional in phpdoc but not in function arguments, perhaps it makes sense to equate $mform argument to null ? also the phpdoc has @return, it would be great to have a very short description of what the boolean returned means.
          • perhaps $string['requiresubmissionstatement'] = 'Require students accept the submission statement'; would be better understood as 'Require that students accept the submission statement'.
          • $string['requiresubmissionstatement_help'] = 'Require students accept the submission statement for all submissions for this entire Moodle installation';
            • i think we need to highlight in that help message that it can be customised per instance.
          • the per instance setting "Require students accept the submission statement" help hint didn't show up for me. Also should the setting for the assignment instance be under 'Submissions Settings' rather than 'Assignment Settings' ?
          • i'm guessing 'sendlatenotifications' in comment in mod/assign/db/upgrade.php seems to be about some original fieldname that was later changed.
          • mod/assign/locallib.php: add_submission_form_elements() ; you may want to break down the if condition there into two variables for easier reading. (see http://docs.moodle.org/dev/Coding_style#Wrapping_Control_Structures)
          Show
          Aparup Banerjee added a comment - Hi Damyon, I've had a look through this patch. It seems really great. I've got some points and feedback for you below. I hope its useful process_submit_for_grading() and check_submit_for_grading() says $mform argument is optional in phpdoc but not in function arguments, perhaps it makes sense to equate $mform argument to null ? also the phpdoc has @return, it would be great to have a very short description of what the boolean returned means. perhaps $string ['requiresubmissionstatement'] = 'Require students accept the submission statement'; would be better understood as 'Require that students accept the submission statement'. $string ['requiresubmissionstatement_help'] = 'Require students accept the submission statement for all submissions for this entire Moodle installation'; i think we need to highlight in that help message that it can be customised per instance. the per instance setting "Require students accept the submission statement" help hint didn't show up for me. Also should the setting for the assignment instance be under 'Submissions Settings' rather than 'Assignment Settings' ? i'm guessing 'sendlatenotifications' in comment in mod/assign/db/upgrade.php seems to be about some original fieldname that was later changed. mod/assign/locallib.php: add_submission_form_elements() ; you may want to break down the if condition there into two variables for easier reading. (see http://docs.moodle.org/dev/Coding_style#Wrapping_Control_Structures )
          Hide
          Aparup Banerjee added a comment -

          reopening, waiting for feedback from Damyon, especially on the location of the setting. i think it makes sense being a submission setting.

          Show
          Aparup Banerjee added a comment - reopening, waiting for feedback from Damyon, especially on the location of the setting. i think it makes sense being a submission setting.
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          Damyon Wiese added a comment -

          Thanks Aparup - I'll take a look at these comments now.

          Show
          Damyon Wiese added a comment - Thanks Aparup - I'll take a look at these comments now.
          Hide
          Damyon Wiese added a comment -

          Thanks Aparup, I have made all these changes except for moving the setting. Currently the "submission setttings" area is reserved for settings added by the submission plugins and I like this clean separation.

          If we still want to separate the setting, maybe we could rename "submission settings" to "submission types" and add a new "submission settings" section for these general assignment settings that affect submissions.

          • Damyon
          Show
          Damyon Wiese added a comment - Thanks Aparup, I have made all these changes except for moving the setting. Currently the "submission setttings" area is reserved for settings added by the submission plugins and I like this clean separation. If we still want to separate the setting, maybe we could rename "submission settings" to "submission types" and add a new "submission settings" section for these general assignment settings that affect submissions. Damyon
          Hide
          David Monllaó added a comment -

          Hi Damyon,

          All looks great to me, the only thing I see is about the optional $mform Aparup was pointing, check_submit_for_grading() it seems to indicate that is an optional param.

          +1 for integration review

          Show
          David Monllaó added a comment - Hi Damyon, All looks great to me, the only thing I see is about the optional $mform Aparup was pointing, check_submit_for_grading() it seems to indicate that is an optional param. +1 for integration review
          Hide
          Damyon Wiese added a comment -

          Thanks - I just updated the comment for the mform parameter.

          • Damyon
          Show
          Damyon Wiese added a comment - Thanks - I just updated the comment for the mform parameter. Damyon
          Hide
          Aparup Banerjee added a comment -

          Thanks Damyon,
          that's been integrated into master now for testing.

          (i've added one commit moving the upgrade block to after the 2.3 upgrade line.)

          Show
          Aparup Banerjee added a comment - Thanks Damyon, that's been integrated into master now for testing. (i've added one commit moving the upgrade block to after the 2.3 upgrade line.)
          Hide
          Rajesh Taneja added a comment -

          Sorry Damyon,

          I am failing this because of two reasons:

          1. Step 3: When "assign | requiresubmissionstatement" is checked (Set to yes), I can see "Require that students accept the submission statement" selection while editing assignment and it's other way round when it's unchecked. Seems like it should be visible when "assign | requiresubmissionstatement" is unchecked.
          2. "Require that students accept the submission statement" setting this to No also force student to accept student statement.

          You might want to consider:
          As this is a new feature and by default set to NO, shouldn't "Require that students accept the submission statement" be default to "No"?

          Show
          Rajesh Taneja added a comment - Sorry Damyon, I am failing this because of two reasons: Step 3: When "assign | requiresubmissionstatement" is checked (Set to yes), I can see "Require that students accept the submission statement" selection while editing assignment and it's other way round when it's unchecked. Seems like it should be visible when "assign | requiresubmissionstatement" is unchecked. "Require that students accept the submission statement" setting this to No also force student to accept student statement. You might want to consider: As this is a new feature and by default set to NO, shouldn't "Require that students accept the submission statement" be default to "No"?
          Hide
          Aparup Banerjee added a comment -

          cool, Thank you Raj.

          going by 'If this setting is not enabled, then submission statements can be enabled or disabled in the settings for each assignment'

          i've got this change: https://github.com/nebgor/moodle/compare/int_master...MDL-31288

          +1?

          Show
          Aparup Banerjee added a comment - cool, Thank you Raj. going by 'If this setting is not enabled, then submission statements can be enabled or disabled in the settings for each assignment' i've got this change: https://github.com/nebgor/moodle/compare/int_master...MDL-31288 +1?
          Hide
          Sam Hemelryk added a comment -

          Apu asked me to take a look at his patch, things look good and I've pushed it into integration now.

          This is back up for testing thanks Raj.

          Show
          Sam Hemelryk added a comment - Apu asked me to take a look at his patch, things look good and I've pushed it into integration now. This is back up for testing thanks Raj.
          Hide
          Rajesh Taneja added a comment -

          Thanks Aparup and Sam,

          There are few more things, let me know if you want to deal with them in new bug:

          1. If Submission statement is empty, I get to see checkbox with no statement, which doesn't seems right
          2. For existing assignments which have set "Require that students accept the submission statement" to false, doesn't show require checkbox on setting assign | requiresubmissionstatement. Statement says that student is required to accept for all assignments, but it is only set for new assignments.
          Show
          Rajesh Taneja added a comment - Thanks Aparup and Sam, There are few more things, let me know if you want to deal with them in new bug: If Submission statement is empty, I get to see checkbox with no statement, which doesn't seems right For existing assignments which have set "Require that students accept the submission statement" to false, doesn't show require checkbox on setting assign | requiresubmissionstatement. Statement says that student is required to accept for all assignments, but it is only set for new assignments.
          Hide
          Rajesh Taneja added a comment - - edited

          IMO: Damyon check was making more sense, https://github.com/nebgor/moodle/compare/int_master...MDL-31288#L0L97, it should be yes or no depending on submission statement.
          If and only if submission statement can be empty and user can be forced to ask for confirmation

          Show
          Rajesh Taneja added a comment - - edited IMO: Damyon check was making more sense, https://github.com/nebgor/moodle/compare/int_master...MDL-31288#L0L97 , it should be yes or no depending on submission statement. If and only if submission statement can be empty and user can be forced to ask for confirmation
          Hide
          Rajesh Taneja added a comment -

          Had a word with Sam and there are two things which need attention:

          1. Old/All assignment should respect global config
          2. Checkbox and text both should have value else it's invalid (Another issue)
            1. Don't show option is submission statement is empty and require is checked
            2. Don't show confirmation if submission statement is empty and require is checked

          FYI:

          As per above discussion, Apu's change is fine.

          Show
          Rajesh Taneja added a comment - Had a word with Sam and there are two things which need attention: Old/All assignment should respect global config Checkbox and text both should have value else it's invalid (Another issue) Don't show option is submission statement is empty and require is checked Don't show confirmation if submission statement is empty and require is checked FYI: As per above discussion, Apu's change is fine.
          Hide
          Rajesh Taneja added a comment -

          Sorry for the noise guys,

          I thinks 1 is not an issue, https://github.com/netspotau/moodle-mod_assign/commit/94f26900c94b8c7d458fa541d6a94f96f971bb7b#L4R3111

          As per point 2 I will open another issue to investigate.

          Show
          Rajesh Taneja added a comment - Sorry for the noise guys, I thinks 1 is not an issue, https://github.com/netspotau/moodle-mod_assign/commit/94f26900c94b8c7d458fa541d6a94f96f971bb7b#L4R3111 As per point 2 I will open another issue to investigate.
          Hide
          Dan Poltawski added a comment -

          asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ!

          Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!

          Show
          Dan Poltawski added a comment - asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ! Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!
          Hide
          Mary Cooch added a comment -

          Removing the qa_test_required label as this issue now has QA tests: MDLQA-4578
          and MDLQA-4579 (Note that these are QA test master copies which will be cloned
          for upcoming QA cycles.)

          Show
          Mary Cooch added a comment - Removing the qa_test_required label as this issue now has QA tests: MDLQA-4578 and MDLQA-4579 (Note that these are QA test master copies which will be cloned for upcoming QA cycles.)
          Hide
          Mary Cooch added a comment -

          Removing the docs_required label as this is now documented here http://docs.moodle.org/24/en/Assignment_settings

          Show
          Mary Cooch added a comment - Removing the docs_required label as this is now documented here http://docs.moodle.org/24/en/Assignment_settings

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: