Skip to content

Conversation

@livzorn
Copy link
Contributor

@livzorn livzorn commented Dec 7, 2021

JIRA link

HEEDLS-664

Description

Created a page for setting a completion date for a learning resource in a user's action plan. Also created a service filter for verifying a learning log item exists, for controller methods that have a learningLogItemId in the url.

Screenshots

localhost_5001_LearningPortal_Current_MarkAsComplete_26
localhost_5001_LearningPortal_Current_MarkAsComplete_26 (1)
localhost_5001_LearningPortal_Current_MarkAsComplete_26 (2)


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme. Links (if any) are below:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@AlexJacksonDS AlexJacksonDS left a comment

Choose a reason for hiding this comment

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

A few minor things to change/questions.

Also I'm a bit concerned the Github Build and Test seems to have failed for the branch, but not the Jenkins build. Probably need to look into that.

@livzorn livzorn force-pushed the HEEDLS-664-mark-resource-as-complete branch from f26032e to e6997c8 Compare December 8, 2021 09:42
Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

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

Few minor changes can be performed (some would have to wait for 671 to be merged, so those might need to be left for now)

@livzorn livzorn force-pushed the HEEDLS-664-mark-resource-as-complete branch from 1cf505c to b10f8d2 Compare December 10, 2021 09:09
Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

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

There's a very minor change to make, and a small merge conflict to deal with, but the rest looks good.

Doesn't require rereview.

aria-describedby="@Model.Id-name-lhr">
aria-describedby="@Model.Id-name-lhr"
asp-action="MarkActionPlanResourceAsComplete"
asp-route-learningLogItemId="@Model.Id">
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a minor merge conflict here about the role="button" that I added in the 659 fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

using System.ComponentModel.DataAnnotations;
using DigitalLearningSolutions.Web.Helpers;

public class SetLearningLogItemCompletionDateFormData : IValidatableObject
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the class wasn't renamed but the file was.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, renamed

Comment on lines 184 to 188
[HttpPost]
[ServiceFilter(typeof(VerifyDelegateCanAccessActionPlanResource))]
[Route("/LearningPortal/Current/ActionPlan/{learningLogItemId:int}/MarkAsComplete")]
public IActionResult MarkActionPlanResourceAsComplete(
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, just realised that this should probably have the "SetDlsSubApplication" as well in case of data validation error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah right, added it here

@livzorn livzorn force-pushed the HEEDLS-664-mark-resource-as-complete branch from d94b400 to 19ed12d Compare December 10, 2021 15:30
@livzorn livzorn merged commit 427089e into master Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants