Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive learning: Change gif in instructor help in competencies view to video #10030

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ <h5 jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetenc
<p jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyCreation.paragraph3"></p>
<p jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyCreation.paragraph4"></p>
<div class="explanation-model-gif">
<img src="public/videos/course-competencies/create-competencies.gif" alt="How to create a course competency" />
<video controls>
<source src="public/videos/course-competencies/create-competencies.mp4" type="video/mp4" />
</video>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance video accessibility and error handling

While the video implementation is functional, consider these improvements for better accessibility and user experience:

-                <video controls>
+                <video 
+                    controls
+                    preload="metadata"
+                    aria-label="Tutorial: Creating course competencies"
+                    poster="public/videos/course-competencies/create-competencies-poster.jpg">
                     <source src="public/videos/course-competencies/create-competencies.mp4" type="video/mp4" />
+                    <p>Your browser doesn't support HTML5 video. Here is a 
+                        <a href="public/videos/course-competencies/create-competencies.mp4">link to the video</a> instead.
+                    </p>
                 </video>

Committable suggestion skipped: line range outside the PR's diff.

</div>
<p jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyCreation.paragraph5" [translateValues]="{ link: DOCUMENTATION_LINK }"></p>
</div>
Expand All @@ -37,7 +39,9 @@ <h5 jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetenc
<p jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyRelations.paragraph3"></p>
<p jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyRelations.paragraph4"></p>
<div class="explanation-model-gif">
<img src="public/videos/course-competencies/create-course-competency-relations.gif" alt="How to create a course competency" />
<video controls>
<source src="public/videos/course-competencies/create-course-competency-relations.mp4" type="video/mp4" />
</video>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

🛠️ Refactor suggestion

Update video source paths to match actual resource locations

The video files exist but are located at a different path than referenced in the HTML. Update the source paths to match the actual resource locations:

-                    <source src="public/videos/course-competencies/create-course-competency-relations.mp4" type="video/mp4" />
+                    <source src="resources/public/videos/course-competencies/create-course-competency-relations.mp4" type="video/mp4" />
  • src/main/resources/public/videos/course-competencies/create-course-competency-relations.mp4
  • src/main/resources/public/videos/course-competencies/create-competencies.mp4

The accessibility improvements suggested in the original review are still valid and should be implemented along with this path correction.

🔗 Analysis chain

Enhance video accessibility and verify resource availability

Similar accessibility improvements needed as the first video element.

-                <video controls>
+                <video 
+                    controls
+                    preload="metadata"
+                    aria-label="Tutorial: Creating course competency relations"
+                    poster="public/videos/course-competencies/create-course-competency-relations-poster.jpg">
                     <source src="public/videos/course-competencies/create-course-competency-relations.mp4" type="video/mp4" />
+                    <p>Your browser doesn't support HTML5 video. Here is a 
+                        <a href="public/videos/course-competencies/create-course-competency-relations.mp4">link to the video</a> instead.
+                    </p>
                 </video>

Let's verify the existence of video resources:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of video files and their accessibility

# Check if video files exist in the public directory
fd -t f "create-competencies.mp4|create-course-competency-relations.mp4" public/videos/course-competencies/

# Check file permissions and size
find public/videos/course-competencies/ -name "*.mp4" -exec ls -lh {} \;

Length of output: 379


Script:

#!/bin/bash
# Let's first check if the public directory exists and its structure
fd -t d "public"

# Check for any video directories in the repository
fd -t d "videos"

# Search for MP4 files anywhere in the repository
fd -t f ".+\.mp4$"

# Check if these resources might be in src/main/webapp/
fd -t f ".+\.mp4$" "src/main/webapp/"

Length of output: 441

</div>
<div class="mt-3">
<h6 jhiTranslate="artemisApp.courseCompetency.featureExplanation.courseCompetencyRelations.relationTitle1"></h6>
Expand Down
Loading