PressPrimer Assignment provides two methods for embedding assignments and submission dashboards into your WordPress site: Gutenberg blocks and shortcodes. Both produce identical results; choose whichever option best fits your workflow.
Gutenberg Blocks
PPA Assignment: Displays an assignment on the page for students to view and submit work. Make sure you select an assignment in the block’s settings panel. The block includes toggles to show or hide the description, instructions, max points, and file information.
PPA My Submissions: Displays a list of all submissions completed by the logged-in user across all assignments. The block includes settings for how many submissions to show per page, and toggles for status, score, and date columns. Users must be signed in to see their submission history. Note that a “My Submissions” page that lists submissions is automatically created on plugin activation.
Shortcodes
Assignment Shortcode
[pressprimer_assignment id="X"]
Replace “X” with your assignment ID, which you can find in the list of assignments under Assignments > Assignments. The id attribute is required.
Optional attributes:
show_description="true"— Show or hide the assignment description (default: true)show_instructions="true"— Show or hide the instructions section (default: true)show_max_points="true"— Show or hide the maximum points display (default: true)show_file_info="true"— Show or hide file type and size requirements (default: true)
My Submissions Shortcode
[pressprimer_assignment_my_submissions per_page="10" show_status="true" show_score="true" show_date="true"]
The per_page attribute is optional and defines how many submissions to list per page. If this attribute is excluded, 10 submissions will be shown per page.
Troubleshooting
- If no assignment is shown and you instead see a message like “Assignment not found”, make sure the associated assignment is “Published” (not “Draft”) and that the correct ID is used in the shortcode.
- If the assignment you want to use is not shown in the block dropdown, make sure it is “Published” and that you have permission to access it.
- If the shortcode shows as plain text, make sure that PressPrimer Assignment is active.
- If the “My Submissions” shortcode shows a login prompt, make sure the user is signed in. This shortcode only works for logged-in users.
