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

[Conflict_resolver] Show examiner name #9404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,30 @@ class ResolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
candidate.PSCID as pscid,
session.Visit_label as visitlabel,
Project.Name as project,
conflicts_resolved.FieldName as question,
conflicts_resolved.OldValue1 as value1,
conflicts_resolved.OldValue2 as value2,
CASE
WHEN conflicts_resolved.NewValue = 1
THEN conflicts_resolved.OldValue1
conflicts_resolved.FieldName as question,
CASE
WHEN conflicts_resolved.FieldName <> "Examiner"
THEN conflicts_resolved.OldValue1
ELSE
CONCAT(conflicts_resolved.OldValue1, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue1))
END as value1,
CASE
WHEN conflicts_resolved.FieldName <> "Examiner"
THEN conflicts_resolved.OldValue2
ELSE CONCAT(conflicts_resolved.OldValue2, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue2))
END as value2,
CASE
WHEN conflicts_resolved.NewValue = 1
AND conflicts_resolved.FieldName <> "Examiner"
THEN conflicts_resolved.OldValue1
WHEN conflicts_resolved.NewValue = 1 AND conflicts_resolved.FieldName = "Examiner"
THEN CONCAT(conflicts_resolved.OldValue1, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue1))
WHEN conflicts_resolved.NewValue <> 1 AND conflicts_resolved.FieldName = "Examiner"
THEN CONCAT(conflicts_resolved.OldValue2, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue2))
ELSE conflicts_resolved.OldValue2
END AS correctanswer,
conflicts_resolved.ResolutionTimestamp as resolutiontimestamp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,18 @@ class UnresolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
session.Visit_label as visitlabel,
Project.Name as project,
conflicts_unresolved.FieldName as question,
conflicts_unresolved.Value1 as value1,
conflicts_unresolved.Value2 as value2,
CASE
WHEN conflicts_unresolved.FieldName = "Examiner"
THEN CONCAT(conflicts_unresolved.Value1, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_unresolved.Value1))
ELSE conflicts_unresolved.Value1
END AS value1,
CASE
WHEN conflicts_unresolved.FieldName = "Examiner"
THEN CONCAT(conflicts_unresolved.Value2, " - ",
(SELECT full_name FROM examiners WHERE examinerID = conflicts_unresolved.Value2))
ELSE conflicts_unresolved.Value2
END AS value2,
psc.name as site,
session.CenterID as centerid,
Project.ProjectID as projectid
Expand Down
Loading