cancel
Showing results for 
Search instead for 
Did you mean: 
marsha_moore
Community Member

Student access to multiple submitted files

Jump to solution

Where can I make a suggestion to Canvas developers? I would REALLY like for my students to be able to access all files that they upload to an assignment. One assignment in a course I teach requires that they upload a lesson plan and a video of themselves teaching. Once they have uploaded both files to two separate platforms (PDF/Word Doc and ARC) they can only access feedback on the most recent submission. How much trouble would it be for them to have the same drop down for their submissions that instructors see?

0 Kudos
1 Solution

Accepted Solutions
ericwerth
Community Coach
Community Coach

Hi  @marsha_moore and welcome to the Canvas Community!  Not being a programmer, I cannot speak into how much trouble this change would take, but I have come to realize working with folks over the years that the answer when it comes to programming is normally more than one would think.  However . . . great news!  You don't need to worry about having anyone submit a feature request.  Student access to previous submissions is on the map for Priority: Assignments 2.0‌.  If in the future you do wish to submit a Feature Idea, the process is explained in these documents:

https://community.canvaslms.com/docs/DOC-14903-75187841183 

How do I create a new feature idea in the Canvas Community?  

I hope this helps and best wishes!

View solution in original post

4 Replies
ericwerth
Community Coach
Community Coach

Hi  @marsha_moore and welcome to the Canvas Community!  Not being a programmer, I cannot speak into how much trouble this change would take, but I have come to realize working with folks over the years that the answer when it comes to programming is normally more than one would think.  However . . . great news!  You don't need to worry about having anyone submit a feature request.  Student access to previous submissions is on the map for Priority: Assignments 2.0‌.  If in the future you do wish to submit a Feature Idea, the process is explained in these documents:

https://community.canvaslms.com/docs/DOC-14903-75187841183 

How do I create a new feature idea in the Canvas Community?  

I hope this helps and best wishes!

View solution in original post

kona
Community Coach
Community Coach

 @marsha_moore , while your students can't do this yet from their computer, they CAN view previous submissions from the Canvas App (both Android and iPhone). It's just one of those strange things in Canvas, but it does work! 

Kona

ashok_thapa
Community Contributor

Hi Marsha,

I also have the same question/ suggestion for this feature to be enabled in browser.

This however is available in iPads. Could be easier for students for multiple file submissions.

Hope the features comes out soon for a trail.

Ashok

mcphersona7
Community Participant

We had a number of kids ask about this in the last week, so I implemented a fix using our theme JS. 

canvas_past_submissions_fix.png

That was a screenshot of what the result looks like from student perspective. "Download" just goes straight to the download URL. "View" opens the DocViewer URL for the attachment.

Here is the code you need to insert into your theme JS (it's not elegant but it only took me a couple of hours to get working with interruptions): 

var hostname = window.location.hostname;
function getRequest(url) {
	//Make a request for a single object
	console.log("Making a single GET request to " + url);
	var result = "";
	$.ajax({
		url: url,
		type: "GET",
		async: false,
		contentType: 'application/json; charset=utf-8',
		dataType: 'JSON',
		success: function(resultData, textStatus, jqXHR) {
			result = resultData;
		},
		error: function(jqXHR, textStatus, errorThrown) {
			console.log("Error occurred:" + errorThrown);
			console.log(jqXHR);
		},
		timeout: 5000,
	});
	return result;
}

// Fix for allowing students to view/download previous submissions
const month_lookup = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const cur_year = new Date().getFullYear();
var path_split = window.location.pathname.split('/');
if (path_split.length == 5 && path_split[1] == "courses" && path_split[3] == "assignments") {
	var course_id = path_split[2];
	var assignment_id = path_split[4];
	var target_container = $('div#sidebar_content > div.details');

	var e_list = $('a.btn#easy_student_view');
	if (e_list.length == 0) {
		var res = getRequest(`https://${hostname}/api/v1/courses/${course_id}/assignments/${assignment_id}/submissions/self?include[]=submission_history`);
		if (res !== '' && res['workflow_state'] !== "unsubmitted") {
			var latest_attempt_n = res['attempt'];
			if (res['submission_history'].length > 1) {
				target_container.append(`<br /><h2>Past Submissions</h2><div class="content">`);
				for (var n = 0; n < latest_attempt_n-1; n++) {
					//Iterate the submission history
					var cur_submission = res['submission_history'][n];
					var dateobj = new Date(cur_submission['submitted_at']);
					var datestr = `${month_lookup[dateobj.getMonth()]} ${dateobj.getDate()}`;
					if (dateobj.getFullYear() !== cur_year) {
						datestr += `, ${dateobj.getFullYear()}`;
					}
					datestr += ` at ${dateobj.getHours()}:${dateobj.getMinutes()}`;

					target_container.append(`<div>
					<span> 
					  Submission Attempt #${cur_submission['attempt']}
					</span><br />
					<span class="">${datestr}</span>
				  	</div>`);

					for (var m = 0; m < cur_submission['attachments'].length; m++) {
						cur_attachment = cur_submission['attachments'][m];
						target_container.append(`<span class=""><i>${cur_attachment['display_name']}</i> (<a target="_blank" href="${cur_attachment['preview_url']}">View</a> | <a target="_blank" href="${cur_attachment['url']}">Download</a>)</span>`);
					};

					target_container.append(`<br /><br />`);
				};
				target_container.append(`</div>`);
			};
		};	
	};
};
//END

 

Test on your beta or test instances if you have them first, if you want to try this. Hopefully this helps anyone with a similar issue. 

 

Regards,

Alex