Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bfee4b5
Initial commit for the porfolio dashboard
JohnDamilola Jan 2, 2026
09e57c4
Add new endpoints for portfolio dashboard
JohnDamilola Jan 2, 2026
0aab881
Add LO entry point file
JohnDamilola Jan 5, 2026
7f2f1e1
Update portfolio dashboard
JohnDamilola Feb 16, 2026
574e3a8
Update to a compatible react-redux
JohnDamilola Feb 16, 2026
f0de7d3
Update DAG endpoints
JohnDamilola Feb 16, 2026
e5a753e
update wo_portfolio_diff in .gitignore
JohnDamilola Feb 16, 2026
c33f37d
Update system
JohnDamilola Feb 16, 2026
77413e2
fixed some linting
bradley-erickson Feb 20, 2026
ec97030
fix build and add to script
bradley-erickson Feb 23, 2026
4dba81e
cleaned up lo connection to with singular values and only 1 connectio…
bradley-erickson Feb 23, 2026
5375e88
small improvements to communication protocol queries
bradley-erickson Feb 23, 2026
a6dd233
added title to compare selection bar
bradley-erickson Feb 23, 2026
fa6828e
updated document object properly for easier metadata access
bradley-erickson Feb 24, 2026
880fb32
various improvements to show doc title and student names
bradley-erickson Feb 24, 2026
13210d8
Update the readme
JohnDamilola Feb 23, 2026
c8e0b3f
updated search to use title, cleaned up graphs, removed clickable hom…
bradley-erickson Feb 24, 2026
a86fc6a
added more documentation
bradley-erickson Feb 26, 2026
5ccd4ea
added roster with provenance endpoint
bradley-erickson Feb 27, 2026
78e6b68
updated student breadcrumb href:
bradley-erickson Feb 27, 2026
77c916e
added error handling for catching the message
bradley-erickson Feb 27, 2026
b3540ac
removed non-implement overall metric cards
bradley-erickson Feb 27, 2026
b583d2a
remove hardcoded name
bradley-erickson Feb 27, 2026
b16b68f
hid id column from student table
bradley-erickson Feb 27, 2026
ba24daa
added modal for presets / metrics to smaller view on comparison page
bradley-erickson Feb 27, 2026
9b7d58e
updated name column and added link
bradley-erickson Feb 27, 2026
01d7abe
removed hardcoded tags about course
bradley-erickson Feb 27, 2026
c298f6e
update title to match others
bradley-erickson Feb 27, 2026
3207a11
added dashboard links and hid notifications
bradley-erickson Feb 27, 2026
9a4bd02
removed unimplemented schoology endponits
bradley-erickson Feb 27, 2026
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ learning_observer/learning_observer/static_data/google/
learning_observer/learning_observer/static_data/admins.yaml
.ipynb_checkpoints/
.eggs/
.next/
.next/
modules/wo_portfolio_diff/wo_portfolio_diff/portfolio_diff/*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0+2026.02.20T19.02.56.547Z.85e344b1.berickson.20260210.dashboard.updates
0.1.0+2026.02.27T21.25.37.849Z.3207a114.berickson.20260220.dami.portfolio.pr
2 changes: 1 addition & 1 deletion learning_observer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0+2026.02.20T19.02.56.547Z.85e344b1.berickson.20260210.dashboard.updates
0.1.0+2026.02.27T21.25.37.849Z.3207a114.berickson.20260220.dami.portfolio.pr
14 changes: 7 additions & 7 deletions learning_observer/learning_observer/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ async def _drive_generator(generator, dag_kwargs, targets=None):
continue
except (TypeError, ValueError) as e:
_log_protocol_event(
'json_parse_error',
'json_parse_error',
error_type=type(e).__name__,
error_message=str(e)
)
Expand Down Expand Up @@ -982,18 +982,18 @@ async def _drive_generator(generator, dag_kwargs, targets=None):
# Various ways we might encounter an exception
except asyncio.CancelledError:
_close_connection_and_cleanup('server_cancelled')
except (aiohttp.web_ws.WebSocketError,
except (aiohttp.web_ws.WebSocketError,
aiohttp.client_exceptions.ClientConnectionResetError,
ConnectionResetError) as e:
_log_protocol_event(
'connection_closed_gracefully',
exception_type=type(e).__name__,
'connection_closed_gracefully',
exception_type=type(e).__name__,
detail=str(e))
_close_connection_and_cleanup('client_disconnected')
except Exception as e:
_log_protocol_event(
'handler_exception',
exception_type=type(e).__name__,
'handler_exception',
exception_type=type(e).__name__,
detail=repr(e))
_close_connection_and_cleanup('server_exception')
finally:
Expand All @@ -1002,7 +1002,7 @@ async def _drive_generator(generator, dag_kwargs, targets=None):
t.cancel()
if background_tasks:
await asyncio.gather(*background_tasks, return_exceptions=True)

# Close WebSocket gracefully if not already closed
if not ws.closed:
try:
Expand Down
29 changes: 0 additions & 29 deletions learning_observer/learning_observer/integrations/schoology.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,32 +136,3 @@ async def clean_course_roster(schoology_json):
key=lambda user: user.get('profile', {}).get('name', {}).get('family_name', '')
)
return users


# ---------------------------------------------------------------------------
# Assignments (AGS line items)
# ---------------------------------------------------------------------------
@register_cleaner('course_assignments', 'assignments')
def clean_course_assignments(schoology_json):
'''
TODO implemement this function
When launching via LTI, Schoology only allows us to see assignments
created by our tool. To see all assignments we require an Oauth workflow.
Clean course line items (assignments) from Schoology via LTI AGS.
'''
raise NotImplemented('Schoology assignments have not yet been implemented.')


# ---------------------------------------------------------------------------
# Assignment results / assigned docs (AGS results)
# ---------------------------------------------------------------------------
@register_cleaner('assignment_results', 'assigned_docs')
async def clean_assigned_docs(schoology_json):
'''
TODO implemement this function
When launching via LTI, Schoology only allows us to see assignments
created by our tool. To see all assignments we require an Oauth workflow.
Extract per-student Google Doc attachments from LTI AGS results
for a single assignment.
'''
raise NotImplemented('Schoology documents from assignments have not yet been implemented.')
1 change: 1 addition & 0 deletions modules/lo_event/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^9.2.0",
"redux": "^5.0.1",
"redux-state-sync": "^3.1.4",
"redux-thunk": "^3.1.0",
Expand Down
41 changes: 41 additions & 0 deletions modules/portfolio_diff/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions modules/portfolio_diff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
5 changes: 5 additions & 0 deletions modules/portfolio_diff/build_and_add_to_module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rm -rf out/
npm run build
rm -rf ../wo_portfolio_diff/wo_portfolio_diff/portfolio_diff/
mkdir ../wo_portfolio_diff/wo_portfolio_diff/portfolio_diff/
cp -r out/. ../wo_portfolio_diff/wo_portfolio_diff/portfolio_diff/
14 changes: 14 additions & 0 deletions modules/portfolio_diff/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [...compat.extends("next/core-web-vitals")];

export default eslintConfig;
7 changes: 7 additions & 0 deletions modules/portfolio_diff/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
14 changes: 14 additions & 0 deletions modules/portfolio_diff/lo_event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `lo_event` is the Learning Observer event library (and also `lo_assess` within it is the Learning Observer activity library, which should be factored out eventually).

# * It's a library, and there's no practical stand-alone way to do more extensive development without some use-cases. This is a good set of use cases.
# * As we develop those, we often make changes to `lo_event` and `lo_assess`. Quite a lot, actually.

# This script packages `lo_event` into a node package, wipes the `next.js` cache (which often contains relics before changes), and installs it.

# Without this, development of `lo_event` is painful. Even with this, in an ideal case, we would rerun this whenever there were changes to `lo_event` automatically with some kind of watch daemon.
rm -Rf .next/cache/
pushd ../lo_event/
npm run prebuild
npm pack
popd
npm install ../lo_event/lo_event-0.0.3.tgz --no-save
21 changes: 21 additions & 0 deletions modules/portfolio_diff/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/_next/wo_portfolio_diff/portfolio_diff",
eslint: {
ignoreDuringBuilds: true,
},
transpilePackages: ["lo_event"],
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false, // tells Webpack to ignore fs in client bundle
};
return config;
},
output: "export",
};

export default nextConfig;
32 changes: 32 additions & 0 deletions modules/portfolio_diff/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "portfolio_diff",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"babel-loader": "^10.0.0",
"echarts": "^6.0.0",
"echarts-for-react": "^3.0.5",
"framer-motion": "^12.23.6",
"lo_event": "file:../lo_event",
"lucide-react": "^0.525.0",
"next": "15.3.5",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-redux": "^9.2.0",
"recharts": "^3.1.2",
"redux": "^5.0.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"eslint": "^9",
"eslint-config-next": "15.3.5",
"tailwindcss": "^4"
}
}
5 changes: 5 additions & 0 deletions modules/portfolio_diff/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = {
plugins: ["@tailwindcss/postcss"],
};

export default config;
70 changes: 70 additions & 0 deletions modules/portfolio_diff/src/app/components/Breadcrumb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"use client";

import Link from "next/link";
import { Home } from "lucide-react";
import PropTypes from "prop-types";

export default function Breadcrumb({
items = [],
homeHref = "/",
homeLabel = "Dashboard",
className = "",
}) {
const wrapCls = `mb-4 ${className}`.trim();

return (
<nav className={wrapCls} aria-label="Breadcrumb">
<ol className="flex items-center text-sm text-gray-600">
{/* Home */}
<li className="flex items-center">
<Link
href={homeHref}
className="flex items-center gap-1 text-gray-900 hover:text-blue-600"
>
<Home className="h-4 w-4" />
{homeLabel}
</Link>
</li>

{/* Trail */}
{items.map((item, idx) => {
const isLast = idx === items.length - 1;
return (
<li key={`${item.label}-${idx}`} className="flex items-center">
<span className="mx-2 text-gray-400">/</span>
{item.href && !isLast ? (
<Link
href={item.href}
className="hover:text-gray-900 max-w-[200px] truncate"
>
{item.label}
</Link>
) : (
<span
className={`max-w-[240px] truncate ${
isLast ? "text-gray-900 font-medium" : "text-gray-700"
}`}
{...(isLast ? { "aria-current": "page" } : {})}
>
{item.label}
</span>
)}
</li>
);
})}
</ol>
</nav>
);
}

Breadcrumb.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.string.isRequired,
href: PropTypes.string,
})
),
homeHref: PropTypes.string,
homeLabel: PropTypes.string,
className: PropTypes.string,
};
Loading
Loading