Moodle
  1. Moodle
  2. MDL-30453

Assessments of example submissions produce invalid links in the title

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.0.7, 2.1.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      1. Prepare a new instance of the Workshop module
      2. In the settings form, check "Use examples"
      3. Define a simple assessment form
      4. Add one example submission and provide the reference assessment for it
      5. Switch the workshop to the submission phase
      6. Log in as a student
      7. Assess the submission and click "Save and close"
      8. TEST: At the page where the reference assessment is compared with the student's assessment, make sure that the header link of the student's assessment leads to a correct page and does not throw error.
      9. TEST (advanced): Copy the URL of the page displayed in step 8 (where exacompare.php is opened). Log in back as the teacher who created the workshop and paste that URL to the address bar of the browser. Make sure that now the header links in both reference assessment and the student's assessment lead to correct pages and do not throw error.

      Note: In workshop, there is no UI yet how the teacher can see student's assessments of example submissions. Hence the trick with manual copy&paste of the URL. However, one day such UI might be added and so we want the page work well already now.

      Note: The assessment header does not render as a link if it would lead to the same page of if the user does not have permission to see that page. So when the student is comparing their assessment with the reference one, there is no link displayed in the header of the reference assessment.

      Show
      1. Prepare a new instance of the Workshop module 2. In the settings form, check "Use examples" 3. Define a simple assessment form 4. Add one example submission and provide the reference assessment for it 5. Switch the workshop to the submission phase 6. Log in as a student 7. Assess the submission and click "Save and close" 8. TEST: At the page where the reference assessment is compared with the student's assessment, make sure that the header link of the student's assessment leads to a correct page and does not throw error. 9. TEST (advanced): Copy the URL of the page displayed in step 8 (where exacompare.php is opened). Log in back as the teacher who created the workshop and paste that URL to the address bar of the browser. Make sure that now the header links in both reference assessment and the student's assessment lead to correct pages and do not throw error. Note: In workshop, there is no UI yet how the teacher can see student's assessments of example submissions. Hence the trick with manual copy&paste of the URL. However, one day such UI might be added and so we want the page work well already now. Note: The assessment header does not render as a link if it would lead to the same page of if the user does not have permission to see that page. So when the student is comparing their assessment with the reference one, there is no link displayed in the header of the reference assessment.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-30453-exassessment-link
    • Rank:
      33116

      Description

      For assessments of example submissions, the normal prepare_assessment is used. Therefore the title of such assessment links to a page assessment.php (and throws error there) as it really must lead to exassessment.php.

        Activity

        Hide
        David Mudrak added a comment -

        The submitted branch introduces specialized renderable classes for assessments of example submissions. These renderable classes contain correct URL.

        Show
        David Mudrak added a comment - The submitted branch introduces specialized renderable classes for assessments of example submissions. These renderable classes contain correct URL.
        Hide
        Sam Hemelryk added a comment -

        Thanks David, spot on again!

        Show
        Sam Hemelryk added a comment - Thanks David, spot on again!
        Hide
        Adrian Greeve added a comment -

        Tested and works well.
        Thanks David.

        Show
        Adrian Greeve added a comment - Tested and works well. Thanks David.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay!

        Closing and big thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Sent upstream! Just in time for Moodle 2.2rc1 (if related), yay! Closing and big thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: