From c8e272249512cbd7e80d6e8265f0c72c2b4dce18 Mon Sep 17 00:00:00 2001 From: Nick Nicholas Date: Fri, 17 Nov 2017 21:00:43 +1100 Subject: [PATCH] Writing QA --- app/naprrql/gql_schemas/naplan_schema.graphql | 6 + .../qa/itemPrinting_map.csv | 4 +- .../qa/itemWritingPrinting_map.csv | 2 + .../qa/qaCodeframeCheck.gql | 10 + .../qa/qaCodeframeCheck_map.csv | 4 +- .../qa/systemRubricSubscoreMatches_map.csv | 2 + build_naprr.sh | 165 ---------------- naprrql/naprr_xmlhelpers.go | 3 + naprrql/qa-item-report-pipeline.go | 185 +++++++++++++++++- naprrql/qa-misc-pipeline.go | 4 +- naprrql/report-resolvers.go | 19 +- 11 files changed, 219 insertions(+), 185 deletions(-) create mode 100644 app/naprrql/reporting_templates/qa/itemWritingPrinting_map.csv create mode 100644 app/naprrql/reporting_templates/qa/systemRubricSubscoreMatches_map.csv delete mode 100755 build_naprr.sh diff --git a/app/naprrql/gql_schemas/naplan_schema.graphql b/app/naprrql/gql_schemas/naplan_schema.graphql index 5778402..eb085e6 100644 --- a/app/naprrql/gql_schemas/naplan_schema.graphql +++ b/app/naprrql/gql_schemas/naplan_schema.graphql @@ -91,6 +91,12 @@ type CodeframeCheckDataSet { LocalID: String # Type of Object that faulty GUID is found in ObjectType: String + ## the related testlet if any + Testlet: NAPTestlet + ## the related test item if any + TestItem: NAPTestItem + ## the related test if any + Test: NAPTest } ## Reason why sitting test was interrupted diff --git a/app/naprrql/reporting_templates/qa/itemPrinting_map.csv b/app/naprrql/reporting_templates/qa/itemPrinting_map.csv index 183e8d2..f0cec73 100644 --- a/app/naprrql/reporting_templates/qa/itemPrinting_map.csv +++ b/app/naprrql/reporting_templates/qa/itemPrinting_map.csv @@ -1,2 +1,2 @@ -Test Name,Test level,Test Domain,ItemRefID,Test Item Local Id,Test Item Name,Subdomain,Writing Genre,Birth Date,ACARA ID,PSI,Testlet Score,Item Score,Item Lapsed Time,Item Subscores,Item Response,Participation Code,NAPTestletLocalId,Response Correctness,ItemSubstitutedForList -Test.TestContent.TestName,Test.TestContent.TestLevel,Test.TestContent.TestDomain,TestItem.ItemID,TestItem.TestItemContent.NAPTestItemLocalId,TestItem.TestItemContent.ItemName,TestItem.TestItemContent.Subdomain,TestItem.TestItemContent.WritingGenre,Student.BirthDate,Student.ASLSchoolId,Response.PSI,Response.TestletList.Testlet.0.TestletScore,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Score,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.LapsedTimeItem,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.SubscoreList.Subscore,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Response,ParticipationCode,Response.TestletList.Testlet.0.NapTestletLocalId,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.ResponseCorrectness,TestItem.TestItemContent.ItemSubstitutedForList +Test Name,Test level,Test Domain,ItemRefID,Test Item Local Id,Test Item Name,Subdomain,Writing Genre,Birth Date,ACARA ID,PSI,Testlet Score,Item Score,Item Lapsed Time,Item Response,Participation Code,NAPTestletLocalId,Response Correctness,ItemSubstitutedForList +Test.TestContent.TestName,Test.TestContent.TestLevel,Test.TestContent.TestDomain,TestItem.ItemID,TestItem.TestItemContent.NAPTestItemLocalId,TestItem.TestItemContent.ItemName,TestItem.TestItemContent.Subdomain,TestItem.TestItemContent.WritingGenre,Student.BirthDate,Student.ASLSchoolId,Response.PSI,Response.TestletList.Testlet.0.TestletScore,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Score,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.LapsedTimeItem,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Response,ParticipationCode,Response.TestletList.Testlet.0.NapTestletLocalId,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.ResponseCorrectness,TestItem.TestItemContent.ItemSubstitutedForList diff --git a/app/naprrql/reporting_templates/qa/itemWritingPrinting_map.csv b/app/naprrql/reporting_templates/qa/itemWritingPrinting_map.csv new file mode 100644 index 0000000..6ae7329 --- /dev/null +++ b/app/naprrql/reporting_templates/qa/itemWritingPrinting_map.csv @@ -0,0 +1,2 @@ +Test Name,Test level,Test Domain,ItemRefID,Test Item Local Id,Test Item Name,Subdomain,Writing Genre,Birth Date,ACARA ID,PSI,Testlet Score,Item Score,Item Lapsed Time,Item Response,Participation Code,NAPTestletLocalId,Response Correctness,ItemSubstitutedForList,Spelling,Audience,Text Structure,Paragraphs,Sentence structure,Punctuation,Ideas,Persuasive Devices,Vocabulary,Cohesion +Test.TestContent.TestName,Test.TestContent.TestLevel,Test.TestContent.TestDomain,TestItem.ItemID,TestItem.TestItemContent.NAPTestItemLocalId,TestItem.TestItemContent.ItemName,TestItem.TestItemContent.Subdomain,TestItem.TestItemContent.WritingGenre,Student.BirthDate,Student.ASLSchoolId,Response.PSI,Response.TestletList.Testlet.0.TestletScore,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Score,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.LapsedTimeItem,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Response,ParticipationCode,Response.TestletList.Testlet.0.NapTestletLocalId,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.ResponseCorrectness,TestItem.TestItemContent.ItemSubstitutedForList,Spelling,Audience,TextStructure,Paragraphs,SentenceStructure,Punctuation,Ideas,PersuasiveDevices,Vocabulary,Cohesion diff --git a/app/naprrql/reporting_templates/qa/qaCodeframeCheck.gql b/app/naprrql/reporting_templates/qa/qaCodeframeCheck.gql index 315c44a..a199333 100644 --- a/app/naprrql/reporting_templates/qa/qaCodeframeCheck.gql +++ b/app/naprrql/reporting_templates/qa/qaCodeframeCheck.gql @@ -3,6 +3,16 @@ query CodeFrame { ObjectID LocalID ObjectType + TestItem { + TestItemContent { + ItemSubstitutedForList { + SubstituteItem { + SubstituteItemRefId + LocalId + } + } + } + } } } diff --git a/app/naprrql/reporting_templates/qa/qaCodeframeCheck_map.csv b/app/naprrql/reporting_templates/qa/qaCodeframeCheck_map.csv index 49444db..a67f5ff 100644 --- a/app/naprrql/reporting_templates/qa/qaCodeframeCheck_map.csv +++ b/app/naprrql/reporting_templates/qa/qaCodeframeCheck_map.csv @@ -1,2 +1,2 @@ -ObjectID,LocalID,ObjectType -ObjectID,LocalID,ObjectType +ObjectID,LocalID,ObjectType,ItemSubstitutedForList +ObjectID,LocalID,ObjectType,TestItem.TestItemContent.ItemSubstitutedForList diff --git a/app/naprrql/reporting_templates/qa/systemRubricSubscoreMatches_map.csv b/app/naprrql/reporting_templates/qa/systemRubricSubscoreMatches_map.csv new file mode 100644 index 0000000..5c28eb4 --- /dev/null +++ b/app/naprrql/reporting_templates/qa/systemRubricSubscoreMatches_map.csv @@ -0,0 +1,2 @@ +ACARA ID,Test Level,Test Domain,Participation Code,Family Name,Given Name,Birth Date,PSI,Test Item Local ID,Test Item Name,Testlet Score,Item Score,SubscoreList,RubricsNotScored,SubscoresNotDefined +Student.ASLSchoolId,Test.TestContent.TestLevel,Test.TestContent.TestDomain,ParticipationCode,Student.FamilyName,Student.GivenName,Student.BirthDate,Student.OtherIdList.OtherId.#[Type==NAPPlatformStudentId].Value,TestItem.TestItemContent.NAPTestItemLocalId,TestItem.TestItemContent.ItemName,Response.TestletList.Testlet.0.TestletScore,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.Score,Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.SubscoreList,RubricsNotScored,SubscoresNotDefined diff --git a/build_naprr.sh b/build_naprr.sh deleted file mode 100755 index 6dfe47f..0000000 --- a/build_naprr.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/bash - -set -e - -CWD=`pwd` - -# code is required for build, but no longer built as separate server -# is launched from within the naprr application -# echo "Downloading nats-streaming-server" -# go get github.com/nats-io/nats-streaming-server - -do_build() { - mkdir -p $OUTPUT - cd $OUTPUT - rm -fr in - mkdir in - mkdir in/Reg - #mkdir in/Pearson - #mkdir in/FujiXerox - cd $CWD - cd ./app/naprr - go get - GOOS="$GOOS" GOARCH="$GOARCH" go build -ldflags="$LDFLAGS" -o $OUTPUT/$HARNESS - cd $CWD - cd ./app/napcomp - go get - GOOS="$GOOS" GOARCH="$GOARCH" go build -ldflags="$LDFLAGS" -o $OUTPUT/$AUDITDIFFHARNESS - cd .. - - rsync -a naprr/templates naprr/public naprr/naprr.toml $OUTPUT/ - rsync -a naprr/master_nap.xml.zip $OUTPUT/in/ - rsync -a napval/students.csv $OUTPUT/in/Reg/ - #rsync -a auditdiff/naprr.toml $AUDITDIFF/ -} - -# do_shells() { -# cd $CWD -# cp bin/gonias.sh $OUTPUT/ -# cp bin/stopnias.sh $OUTPUT/ -# } - -# do_bats() { -# cd $CWD -# cp bin/gonias.bat $OUTPUT/ -# cp bin/stopnias.bat $OUTPUT/ -# } - -# do_upx() { -# upx $OUTPUT/$GNATS -# upx $OUTPUT/$HARNESS -# } - -# do_goupx() { -# goupx $OUTPUT/$GNATS -# goupx $OUTPUT/$HARNESS -# } - -do_zip() { - cd $OUTPUT - cd .. - #rm -f ../$ZIP - #zip -qr ../$ZIP naprr - cd $CWD -} - -build_mac64() { - # MAC OS X (64 only) - echo "Building Mac binaries..." - GOOS=darwin - GOARCH=amd64 - LDFLAGS="-s -w" - OUTPUT=$CWD/build/Mac/naprr - # GNATS=nats-streaming-server - HARNESS=naprr - AUDITDIFFHARNESS=napcomp - ZIP=nias-naprr-Mac.zip - do_build - #do_upx - # do_shells - do_zip - echo "...all Mac binaries built..." -} - - -build_windows64() { - # WINDOWS 64 - echo "Building Windows64 binaries..." - GOOS=windows - GOARCH=amd64 - LDFLAGS="-s -w" - OUTPUT=$CWD/build/Win64/naprr - # GNATS=nats-streaming-server.exe - AUDITDIFFHARNESS=napcomp.exe - HARNESS=naprr.exe - ZIP=nias-naprr-Win64.zip - do_build - #do_upx - # do_bats - do_zip - echo "...all Windows64 binaries built..." -} - -build_windows32() { - # WINDOWS 32 - echo "Building Windows32 binaries..." - GOOS=windows - GOARCH=386 - LDFLAGS="-s -w" - OUTPUT=$CWD/build/Win32/naprr - # GNATS=nats-streaming-server.exe - HARNESS=naprr.exe - AUDITDIFFHARNESS=napcomp.exe - ZIP=nias-naprr-Win32.zip - do_build - #do_upx - # do_bats - do_zip - echo "...all Windows32 binaries built..." -} - -build_linux64() { - # LINUX 64 - echo "Building Linux64 binaries..." - GOOS=linux - GOARCH=amd64 - LDFLAGS="-s -w" - OUTPUT=$CWD/build/Linux64/naprr - # GNATS=nats-streaming-server - HARNESS=naprr - AUDITDIFFHARNESS=napcomp - ZIP=nias-naprr-Linux64.zip - do_build - #do_goupx - # do_shells - do_zip - echo "...all Linux64 binaries built..." -} - -build_linux32() { - # LINUX 32 - echo "Building Linux32 binaries..." - GOOS=linux - GOARCH=386 - LDFLAGS="-s -w" - OUTPUT=$CWD/build/Linux32/naprr - # GNATS=nats-streaming-server - HARNESS=naprr - AUDITDIFFHARNESS=napcomp - ZIP=nias-naprr-Linux32.zip - do_build - #do_goupx - # do_shells - do_zip - echo "...all Linux32 binaries built..." -} - -# TODO ARM -# GOOS=linux GOARCH=arm GOARM=7 go build -o $CWD/build/LinuxArm7/go-nias/aggregator - -build_mac64 -build_windows64 -build_windows32 -build_linux64 -build_linux32 - diff --git a/naprrql/naprr_xmlhelpers.go b/naprrql/naprr_xmlhelpers.go index 06b3c1f..88c7fc9 100644 --- a/naprrql/naprr_xmlhelpers.go +++ b/naprrql/naprr_xmlhelpers.go @@ -32,6 +32,9 @@ type CodeframeCheckDataSet struct { ObjectID string LocalID string ObjectType string + Test xml.NAPTest + Testlet xml.NAPTestlet + TestItem xml.NAPTestItem } // struct for sorting support diff --git a/naprrql/qa-item-report-pipeline.go b/naprrql/qa-item-report-pipeline.go index 013c0a2..c73a08a 100644 --- a/naprrql/qa-item-report-pipeline.go +++ b/naprrql/qa-item-report-pipeline.go @@ -53,6 +53,11 @@ func itemresults_query() string { LocalId } } + NAPWritingRubricList { + NAPWritingRubric { + RubricType + } + } } } Student { @@ -137,6 +142,39 @@ func codeframeQuery() string { } }` } +func NonCodeframeItemsQuery() string { + return `query CodeFrame { + codeframe_check_report { + ObjectID + LocalID + ObjectType + Test { + TestContent { + LocalId + TestName + TestType + TestLevel + TestDomain + } + } + TestItem { + ItemID + TestItemContent { + NAPTestItemLocalId + Subdomain + MarkingType + ItemSubstitutedForList { + SubstituteItem { + SubstituteItemRefId + LocalId + } + } + } + } + } +} +` +} func runQAItemRespReportPipeline(schools []string) error { @@ -146,6 +184,8 @@ func runQAItemRespReportPipeline(schools []string) error { "systemItemCounts.gql", "itemExpectedResponses.gql", "itemPrinting.gql", + "itemWritingPrinting.gql", + "systemRubricSubscoreMatches.gql", } reports_path := "./reporting_templates/qa/" @@ -160,26 +200,26 @@ func runQAItemRespReportPipeline(schools []string) error { return err } errcList = append(errcList, errc) - varsc1, errc, err := systemParametersSource(ctx, schools...) + // transform stage + jsonc, errc, err := systemQueryExecutor(ctx, itemresp_query, DEF_GQL_URL, varsc) if err != nil { return err } errcList = append(errcList, errc) - // transform stage - jsonc, errc, err := systemQueryExecutor(ctx, itemresp_query, DEF_GQL_URL, varsc) + // get codeframe + codeframec, errc, err := systemQueryExecutorNoBreakdown(ctx, codeframeQuery(), DEF_GQL_URL, nil) if err != nil { return err } errcList = append(errcList, errc) - // get codeframe - codeframec, errc, err := systemQueryExecutor(ctx, codeframeQuery(), DEF_GQL_URL, varsc1) + // get list of items not in codeframe + noncodeframec, errc, err := systemQueryExecutorNoBreakdown(ctx, NonCodeframeItemsQuery(), DEF_GQL_URL, nil) if err != nil { return err } errcList = append(errcList, errc) - //cf, sub := qaReadCodeframe(ctx, codeframec) // sink stage // create working directory if not there @@ -208,8 +248,13 @@ func runQAItemRespReportPipeline(schools []string) error { } else if queryFileName == "systemParticipationCodeItemImpacts.gql" { jsonc2, errc, _ = qaParticipationCodeItemImpacts(ctx, jsonc1[i]) errcList = append(errcList, errc) + } else if queryFileName == "systemRubricSubscoreMatches.gql" { + // TODO This query relies on subscores, and may need to go to a different pipeline + jsonc2, errc, _ = qaRubricSubscoreMatches(ctx, jsonc1[i]) + errcList = append(errcList, errc) } else if queryFileName == "systemItemCounts.gql" { - jsonc2, errc, _ = qaItemCounts(ctx, codeframec1[0], jsonc1[i]) + // block on reading codeframe + jsonc2, errc, _ = qaItemCounts(ctx, codeframec1[0], noncodeframec, jsonc1[i]) errcList = append(errcList, errc) } else if queryFileName == "itemExpectedResponses.gql" { // block on reading codeframe @@ -219,6 +264,11 @@ func runQAItemRespReportPipeline(schools []string) error { jsonc2, errc, _ = qaItemResponses(ctx, jsonc1[i]) output_prefix = outFileDir errcList = append(errcList, errc) + } else if queryFileName == "itemWritingPrinting.gql" { + // TODO This query relies on subscores, and may need to go to a different pipeline + jsonc2, errc, _ = qaWritingItemResponses(ctx, jsonc1[i]) + output_prefix = outFileDir + errcList = append(errcList, errc) } else { jsonc2 = nil } @@ -336,6 +386,54 @@ func qaParticipationCodeItemImpacts(ctx context.Context, in <-chan gjson.Result) return out, errc, nil } +func qaRubricSubscoreMatches(ctx context.Context, in <-chan gjson.Result) (<-chan gjson.Result, <-chan error, error) { + out := make(chan gjson.Result) + errc := make(chan error, 1) + expectedRubricTypesStr := []string{"Spelling", "Audience", "Text Structure", "Paragraphs", + "Sentence structure", "Punctuation", "Ideas", "Persuasive Devices", "Vocabulary", "Cohesion"} + expectedRubricTypes := set.New() + for _, s := range expectedRubricTypesStr { + expectedRubricTypes.Add(s) + } + go func() { + defer close(out) + defer close(errc) + var j []byte + for record := range in { + testdomain := record.Get("Test.TestContent.TestDomain").String() + if testdomain != "Writing" { + continue + } + rubrics := record.Get("TestItem.TestItemContent.NAPWritingRubricList.NAPWritingRubric").Array() + subscores := record.Get("Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.SubscoreList.Subscore").Array() + rubrictypes := set.New() + for _, s := range rubrics { + rubrictypes.Add(s.Get("RubricType").String()) + } + subscoretypes := set.New() + for _, s := range subscores { + subscoretypes.Add(s.Get("SubscoreType").String()) + } + rubricNotScored := set.Difference(rubrictypes, subscoretypes) + subscoreNotDefined := set.Difference(expectedRubricTypes, rubrictypes) + + if rubricNotScored.Size() > 0 || subscoreNotDefined.Size() > 0 { + m := record.Value().(map[string]interface{}) + m["RubricsNotScored"] = rubricNotScored.String() + m["SubscoresNotDefined"] = subscoreNotDefined.String() + j, _ = json.Marshal(m) + + select { + case out <- gjson.ParseBytes(j): + case <-ctx.Done(): + return + } + } + } + }() + return out, errc, nil +} + func qaItemCountsRowInit(counts map[string]map[string]map[string]map[string]map[string]int, testname string, testdomain string, testlevel string, itemlocalid string, hasSubstituteItems bool) map[string]map[string]map[string]map[string]map[string]int { if _, ok := counts[testname]; !ok { @@ -358,7 +456,7 @@ func qaItemCountsRowInit(counts map[string]map[string]map[string]map[string]map[ return counts } -func qaItemCounts(ctx context.Context, codeframe <-chan gjson.Result, in <-chan gjson.Result) (<-chan gjson.Result, <-chan error, error) { +func qaItemCounts(ctx context.Context, codeframe <-chan gjson.Result, noncodeframe <-chan gjson.Result, in <-chan gjson.Result) (<-chan gjson.Result, <-chan error, error) { out := make(chan gjson.Result) errc := make(chan error, 1) go func() { @@ -373,6 +471,20 @@ func qaItemCounts(ctx context.Context, codeframe <-chan gjson.Result, in <-chan counts = qaItemCountsRowInit(counts, testname, testdomain, testlevel, itemlocalid, len(record.Get("Item.TestItemContent.ItemSubstitutedForList.SubstituteItem").Array()) > 0) } + for record := range noncodeframe { + objectType := record.Get("ObjectType").String() + if objectType != "testitem" { + continue + } + // test information not recoverable for noncodeframe items + testname := "?" + testdomain := "?" + testlevel := "?" + itemlocalid := record.Get("TestItem.TestItemContent.NAPTestItemLocalId").String() + // log.Printf("%+v\n", record) + counts = qaItemCountsRowInit(counts, testname, testdomain, testlevel, itemlocalid, + len(record.Get("TestItem.TestItemContent.ItemSubstitutedForList.SubstituteItem").Array()) > 0) + } for record := range in { testname := record.Get("Test.TestContent.TestName").String() testdomain := record.Get("Test.TestContent.TestDomain").String() @@ -426,6 +538,10 @@ func qaItemResponses(ctx context.Context, in <-chan gjson.Result) (<-chan gjson. defer close(out) defer close(errc) for record := range in { + testdomain := record.Get("Test.TestContent.TestDomain").String() + if testdomain == "Writing" { + continue + } select { case out <- record: case <-ctx.Done(): @@ -436,6 +552,58 @@ func qaItemResponses(ctx context.Context, in <-chan gjson.Result) (<-chan gjson. return out, errc, nil } +func qaWritingItemResponses(ctx context.Context, in <-chan gjson.Result) (<-chan gjson.Result, <-chan error, error) { + out := make(chan gjson.Result) + errc := make(chan error, 1) + go func() { + defer close(out) + defer close(errc) + for record := range in { + testdomain := record.Get("Test.TestContent.TestDomain").String() + if testdomain != "Writing" { + continue + } + m := record.Value().(map[string]interface{}) + subscores := record.Get("Response.TestletList.Testlet.0.ItemResponseList.ItemResponse.0.SubscoreList.Subscore").Array() + for _, s := range subscores { + rubric := s.Get("SubscoreType").String() + value := s.Get("SubscoreValue").String() + switch rubric { + case "Spelling": + m["Spelling"] = value + case "Audience": + m["Audience"] = value + case "Text Structure": + m["TextStructure"] = value + case "Paragraphs": + m["Paragraphs"] = value + case "Sentence structure": + m["SentenceStructure"] = value + case "Punctuation": + m["Punctuation"] = value + case "Ideas": + m["Ideas"] = value + case "Persuasive Devices": + m["PersuasiveDevices"] = value + case "Vocabulary": + m["Vocabulary"] = value + case "Cohesion": + m["Cohesion"] = value + } + // if not matched, this will be picked up in qaRubricSubscoreMatches + } + j, _ := json.Marshal(m) + + select { + case out <- gjson.ParseBytes(j): + case <-ctx.Done(): + return + } + } + }() + return out, errc, nil +} + type QaItemExpectedResponseType struct { PSI string TestName string @@ -565,7 +733,6 @@ func qaItemExpectedResponses(ctx context.Context, codeframec <-chan gjson.Result result.ExpectedItemsCount[locationinstage_str] = cf[testid][testletid].Size() } else { result.ExpectedItemsCount[locationinstage_str] = 0 - log.Printf("NOT IN CODEFRAME: %s\t%s\n", testid, testletid) } testitems.Clear() diff --git a/naprrql/qa-misc-pipeline.go b/naprrql/qa-misc-pipeline.go index 5c9b8d6..f99a2ff 100644 --- a/naprrql/qa-misc-pipeline.go +++ b/naprrql/qa-misc-pipeline.go @@ -30,12 +30,14 @@ func runQAMiscReportPipeline(schools []string) error { filename1 == "systemTestIncidents.gql" || filename1 == "systemTestTypeItemImpacts.gql" || filename1 == "itemPrinting.gql" || + filename1 == "itemWritingPrinting.gql" || filename1 == "systemItemCounts.gql" || filename1 == "systemParticipationCodeItemImpacts.gql" || filename1 == "qaSchoolInfo.gql" || filename1 == "qaStudentsByYrLevel.gql" || filename1 == "qaTestAttempts.gql" || - filename1 == "qaParticipation.gql" { + filename1 == "qaParticipation.gql" || + filename1 == "systemRubricSubscoreMatches.gql" { // ignore, they're addressed by one of the other pipelines } else { diff --git a/naprrql/report-resolvers.go b/naprrql/report-resolvers.go index 29affc3..0215cbb 100644 --- a/naprrql/report-resolvers.go +++ b/naprrql/report-resolvers.go @@ -882,10 +882,10 @@ func buildReportResolvers() map[string]interface{} { if _, ok := seen[t]; !ok { tests, err := getObjects([]string{t}) if err != nil { - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "test"}) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "test", Test: xml.NAPTest{}, Testlet: xml.NAPTestlet{}, TestItem: xml.NAPTestItem{}}) } else { t1 := tests[0].(xml.NAPTest) - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestContent.LocalId, ObjectType: "test"}) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestContent.LocalId, ObjectType: "test", Test: t1, Testlet: xml.NAPTestlet{}, TestItem: xml.NAPTestItem{}}) } } } @@ -893,10 +893,16 @@ func buildReportResolvers() map[string]interface{} { if _, ok := seen[t]; !ok { testlets, err := getObjects([]string{t}) if err != nil { - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "testlet"}) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "testlet", Test: xml.NAPTest{}, Testlet: xml.NAPTestlet{}, TestItem: xml.NAPTestItem{}}) } else { t1 := testlets[0].(xml.NAPTestlet) - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestletContent.LocalId, ObjectType: "testlet"}) + tests, err := getObjects([]string{t1.NAPTestRefId}) + if err != nil { + test := tests[0].(xml.NAPTest) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestletContent.LocalId, ObjectType: "testlet", Test: test, Testlet: t1, TestItem: xml.NAPTestItem{}}) + } else { + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestletContent.LocalId, ObjectType: "testlet", Test: xml.NAPTest{}, Testlet: t1, TestItem: xml.NAPTestItem{}}) + } } } } @@ -904,10 +910,11 @@ func buildReportResolvers() map[string]interface{} { if _, ok := seen[t]; !ok { testitems, err := getObjects([]string{t}) if err != nil { - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "testitem"}) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: "nil", ObjectType: "testitem", Test: xml.NAPTest{}, Testlet: xml.NAPTestlet{}, TestItem: xml.NAPTestItem{}}) } else { t1 := testitems[0].(xml.NAPTestItem) - results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestItemContent.NAPTestItemLocalId, ObjectType: "testitem"}) + results = append(results, CodeframeCheckDataSet{ObjectID: t, LocalID: t1.TestItemContent.NAPTestItemLocalId, ObjectType: "testitem", Test: xml.NAPTest{}, Testlet: xml.NAPTestlet{}, TestItem: t1}) + // note that TestItems don't link back to tests, and are in fact not unique to them. If they are not in a codeframe, we cannot trace them } } }