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

Can't implement "download all submissions" feature in non-standard assignment type

    XMLWordPrintable

Details

    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-28155_master
    • Easy
    • Hide
      1. Create an online assignment (Assignment 2.2 in Moodle > 2.2)
      2. Login as a student make a submission to the assignment
      3. As a teacher / admin, go to the assignment and click "View N submitted assignments" you SHOULD see the 'Download submissions' link
      4. Create an offline assignment (Assignment 2.2 in Moodle > 2.2)
      5. As a teacher / admin, go to the assignment and click "View assignment grades and feedback" you SHOULD NOT see the 'Download all assignments' link
      6. Create an extension of the online assignment type
        1. cp -r mod/assignment/type/online mod/assignment/type/onlinetest
        2. Edit mod/assignment/type/onlinetest/version.php changing plugin->component to 'assignment_onlinetest'
        3. Edit mod/assignment/type/onlinetest/assignment.class.php changing the classes names to 'assignment_onlinetest' and 'mod_assignment_onlinetest_edit_form', and the call to 'mod_assignment_online_edit_form' to 'mod_assignment_onlinetest_edit_form'
        4. Click notifications to install the plugin
      7. Create a new onlinetest assignment, there will be missing text strings, it's a test
      8. Login as a student and add a submission
      9. As a teacher / admin, go to the assignment and click "View N submitted assignments" you SHOULD see the "Download all assignments" link
      Show
      Create an online assignment (Assignment 2.2 in Moodle > 2.2) Login as a student make a submission to the assignment As a teacher / admin, go to the assignment and click "View N submitted assignments" you SHOULD see the 'Download submissions' link Create an offline assignment (Assignment 2.2 in Moodle > 2.2) As a teacher / admin, go to the assignment and click "View assignment grades and feedback" you SHOULD NOT see the 'Download all assignments' link Create an extension of the online assignment type cp -r mod/assignment/type/online mod/assignment/type/onlinetest Edit mod/assignment/type/onlinetest/version.php changing plugin->component to 'assignment_onlinetest' Edit mod/assignment/type/onlinetest/assignment.class.php changing the classes names to 'assignment_onlinetest' and 'mod_assignment_onlinetest_edit_form', and the call to 'mod_assignment_online_edit_form' to 'mod_assignment_onlinetest_edit_form' Click notifications to install the plugin Create a new onlinetest assignment, there will be missing text strings, it's a test Login as a student and add a submission As a teacher / admin, go to the assignment and click "View N submitted assignments" you SHOULD see the "Download all assignments" link

    Description

      Skodak has point out it in the code with a TODO comment:

      if ($hassubmission && ($this->assignment->assignmenttype=='upload' || $this->assignment->assignmenttype=='online' || $this->assignment->assignmenttype=='uploadsingle')) { //TODO: this is an ugly hack, where is the plugin spirit? (skodak)

      I'm making a new assignment type and meet this bug. So I made this patch

      Attachments

        Activity

          People

            dmonllao David Monllaó
            sunner Sunner Sun
            Rajesh Taneja Rajesh Taneja
            Sam Hemelryk Sam Hemelryk
            Tim Barker Tim Barker
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10/Sep/12