instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.41k stars 2.42k forks source link

Using `background:` CSS property does not warn the teacher about there being an image #2294

Open Milk-Cool opened 6 months ago

Milk-Cool commented 6 months ago

Summary:

<div style="background: url('https://www.adorama.com/alc/wp-content/uploads/2018/11/landscape-photography-tips-yosemite-valley-feature.jpg');min-width:300px;min-height:300px">⠀</div>

Submitting this as a student in a quiz will not add a red border around the image that's supposed to warn the teacher about the possibility of the image being replaced with another one after the quiz was submitted. This can be used to change the answers to a test after a student is done submitting it.

Steps to reproduce:

  1. Create a quiz.
  2. As a student, submit the code shown above as an answer.
  3. As a teacher, open the submitted quiz.

Expected behavior:

There's a red border and text when the mouse is over the image indicating that the image may have been changed since the assigment was submitted

Actual behavior:

There's no red border and no text

Additional notes:

Milk-Cool commented 6 months ago

okay nevermind, it's not supposed to work like that on assigments but it works with quizzes:

image

the first picture is embedded with background: and the second one uses <img>