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

Prefix protocol to lms url when missing, show success msg on success … #83

Open
wants to merge 18 commits into
base: master
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
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
"foreground": "#fff",
"background": "#00a97ae6"
}
},
"workbench.colorCustomizations": {
"minimap.background": "#00000000",
"scrollbar.shadow": "#00000000"
}
}
// https://github.com/microsoft/vscode-eslint/issues/91
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

## [4.3.1]

### Added

- Always show contributor card in resource and collection pages

### Fixed

- Fixed subtle exceptions in text extraction procedures, also added fallback

### Improvements

- Added fallback page for not-found resources (401/404)

## [4.3.0]

### Added
Expand Down
7,872 changes: 5,271 additions & 2,601 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/arangodb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/arangodb",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -31,12 +31,12 @@
"arangojs": "8.3.0"
},
"devDependencies": {
"@moodlenet/core": "^0.9.0",
"@moodlenet/core": "0.9.4",
"@types/node": "17.0.35",
"typescript": "5.4"
},
"peerDependencies": {
"@moodlenet/core": "^0.9.0"
"@moodlenet/core": "0.9.4"
},
"scripts": {},
"gitHead": "4b8737c02083f2eca71b432c601ba3f595cd4f51"
Expand Down
24 changes: 12 additions & 12 deletions packages/collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/collection",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand All @@ -26,26 +26,26 @@
"dist/"
],
"dependencies": {
"@moodlenet/component-library": "^0.9.0",
"@moodlenet/key-value-store": "^0.9.0",
"@moodlenet/simple-file-store": "^0.9.0",
"@moodlenet/component-library": "0.9.4",
"@moodlenet/key-value-store": "0.9.4",
"@moodlenet/simple-file-store": "0.9.4",
"formik": "2.2.9",
"yup": "0.32.11"
},
"peerDependencies": {
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@moodlenet/core": "^0.9.0",
"@moodlenet/ed-resource": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0"
"@moodlenet/core": "0.9.4",
"@moodlenet/ed-resource": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4"
},
"devDependencies": {
"@lingui/macro": "3.14.0",
"@moodlenet/core": "^0.9.0",
"@moodlenet/ed-resource": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0",
"@moodlenet/core": "0.9.4",
"@moodlenet/ed-resource": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4",
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@storybook/addon-actions": "7.4.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ export const Collection: FC<CollectionProps> = ({
/>
)

const contributorCard = isPublished ? (
const contributorCard = (
<CollectionContributorCard {...collectionContributorCardProps} key="contributor-card" />
) : null
)

const publishButton = !isEditing && canPublish && !isPublished /* && !isEditing */ && (
<PrimaryButton onClick={checkFormsAndPublish} color="green">
Expand Down
18 changes: 9 additions & 9 deletions packages/component-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/component-library",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -92,14 +92,14 @@
"react-dom": "18.3.1"
},
"dependencies": {
"@react-email/button": "^0.0.15",
"@react-email/container": "^0.0.12",
"@react-email/head": "^0.0.9",
"@react-email/html": "^0.0.8",
"@react-email/img": "^0.0.8",
"@react-email/preview": "^0.0.9",
"@react-email/section": "^0.0.12",
"@react-email/text": "^0.0.8",
"@react-email/button": "0.0.15",
"@react-email/container": "0.0.12",
"@react-email/head": "0.0.9",
"@react-email/html": "0.0.8",
"@react-email/img": "0.0.8",
"@react-email/preview": "0.0.9",
"@react-email/section": "0.0.12",
"@react-email/text": "0.0.8",
"@types/lodash": "4.14.198",
"lodash": "4.17.21",
"lottie-react": "2.4.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/core-domain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/core-domain",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/core",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/logger/init-logger.mts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const mainLogger = winston.createLogger({
winston.format.timestamp(),
winston.format.colorize({ colors, message: false }),
winston.format.printf(({ level, message, pkgId, timestamp }) => {
return `${timestamp} [${level}] [${label(pkgId)}]: ${message}`
return `${timestamp} [${level}] [${label(pkgId as PkgIdentifier)}]: ${message}`
}),
),
}),
Expand All @@ -67,7 +67,7 @@ mainLoggerConfigs?.file &&
winston.format.timestamp(),
winston.format.uncolorize(),
winston.format.printf(({ level, message, pkgId, timestamp }) => {
return `${timestamp} [${level}] [${label(pkgId)}]: ${message}`
return `${timestamp} [${level}] [${label(pkgId as PkgIdentifier)}]: ${message}`
}),
),
}),
Expand Down
32 changes: 16 additions & 16 deletions packages/create-moodlenet/bin/defaultCorePackages.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
export const defaultCorePackages = {
'core': '^0.9.0',
'arangodb': '^0.9.0',
'crypto': '^0.9.0',
'http-server': '^0.9.0',
'organization': '^0.9.0',
'system-entities': '^0.9.0',
'email-service': '^0.9.0',
'react-app': '^0.9.0',
'extensions-manager': '^0.9.0',
'simple-email-auth': '^0.9.0',
'openid': '^0.9.0',
'ed-resource': '^0.9.0',
'collection': '^0.9.0',
'web-user': '^0.9.0',
'ed-meta': '^0.9.0',
'moodle-lms-integration': '^0.9.0',
'core': '0.9.4',
'arangodb': '0.9.4',
'crypto': '0.9.4',
'http-server': '0.9.4',
'organization': '0.9.4',
'system-entities': '0.9.4',
'email-service': '0.9.4',
'react-app': '0.9.4',
'extensions-manager': '0.9.4',
'simple-email-auth': '0.9.4',
'openid': '0.9.4',
'ed-resource': '0.9.4',
'collection': '0.9.4',
'web-user': '0.9.4',
'ed-meta': '0.9.4',
'moodle-lms-integration': '0.9.4',
}
2 changes: 1 addition & 1 deletion packages/create-moodlenet/bin/install.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ installing moodlenet@${myPkgJson.version} core packages in ${installDir}
may take some time...
`)

await execa('npm', ['install'], {
await execa('npm', ['install', '--legacy-peer-deps'], {
cwd: installDir,
stdout: process.stdout,
}).catch(err => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-moodlenet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/create",
"version": "4.3.0",
"version": "4.3.5",
"license": "AGPL-3.0",
"type": "module",
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/crypto",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -31,10 +31,10 @@
"ulidx": "2.2.1"
},
"peerDependencies": {
"@moodlenet/core": "^0.9.0"
"@moodlenet/core": "0.9.4"
},
"devDependencies": {
"@moodlenet/core": "^0.9.0",
"@moodlenet/core": "0.9.4",
"@types/argon2": "0.15.0",
"@types/node": "17.0.35",
"typescript": "5.4"
Expand Down
18 changes: 9 additions & 9 deletions packages/ed-meta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/ed-meta",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand All @@ -26,23 +26,23 @@
"dist/"
],
"dependencies": {
"@moodlenet/component-library": "^0.9.0",
"@moodlenet/key-value-store": "^0.9.0",
"@moodlenet/component-library": "0.9.4",
"@moodlenet/key-value-store": "0.9.4",
"formik": "2.2.9",
"yup": "0.32.11"
},
"peerDependencies": {
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@moodlenet/core": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0"
"@moodlenet/core": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4"
},
"devDependencies": {
"@lingui/macro": "3.14.0",
"@moodlenet/core": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0",
"@moodlenet/core": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4",
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@types/node": "17.0.35",
Expand Down
30 changes: 15 additions & 15 deletions packages/ed-resource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moodlenet/ed-resource",
"version": "0.9.0",
"version": "0.9.4",
"publishConfig": {
"access": "public"
},
Expand All @@ -26,10 +26,10 @@
"dist/"
],
"dependencies": {
"@moodlenet/component-library": "^0.9.0",
"@moodlenet/core-domain": "^0.9.0",
"@moodlenet/key-value-store": "^0.9.0",
"@moodlenet/simple-file-store": "^0.9.0",
"@moodlenet/component-library": "0.9.4",
"@moodlenet/core-domain": "0.9.4",
"@moodlenet/key-value-store": "0.9.4",
"@moodlenet/simple-file-store": "0.9.4",
"formik": "2.2.9",
"moment": "2.29.4",
"xbytes": "1.8.0",
Expand All @@ -39,19 +39,19 @@
"peerDependencies": {
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@moodlenet/core": "^0.9.0",
"@moodlenet/ed-meta": "^0.9.0",
"@moodlenet/http-server": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0"
"@moodlenet/core": "0.9.4",
"@moodlenet/ed-meta": "0.9.4",
"@moodlenet/http-server": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4"
},
"devDependencies": {
"@lingui/macro": "3.14.0",
"@moodlenet/core": "^0.9.0",
"@moodlenet/ed-meta": "^0.9.0",
"@moodlenet/http-server": "^0.9.0",
"@moodlenet/react-app": "^0.9.0",
"@moodlenet/system-entities": "^0.9.0",
"@moodlenet/core": "0.9.4",
"@moodlenet/ed-meta": "0.9.4",
"@moodlenet/http-server": "0.9.4",
"@moodlenet/react-app": "0.9.4",
"@moodlenet/system-entities": "0.9.4",
"@mui/icons-material": "5.14.9",
"@mui/material": "5.14.9",
"@storybook/addon-actions": "7.4.2",
Expand Down
1 change: 1 addition & 0 deletions packages/ed-resource/src/webapp/ResourceHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const useResourceBaseProps = ({ resourceKey }: myProps) => {

.then(res => {
if (!res) {
setResource(null)
return
}
// res.state.value === 'Autogenerating-Meta' && schedulePolling()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { MainResourceCard } from '../../organisms/MainResourceCard/MainResourceC
import './Resource.scss'

export type ResourceProps = {
isCreating: boolean
saveState: SaveState
mainLayoutProps: MainLayoutProps
mainResourceCardSlots: MainResourceCardSlots
Expand All @@ -61,6 +62,7 @@ export type ResourceProps = {
}

export const Resource: FC<ResourceProps> = ({
isCreating,
mainLayoutProps,
resourceContributorCardProps,

Expand Down Expand Up @@ -256,7 +258,7 @@ export const Resource: FC<ResourceProps> = ({
uploadProgress !== undefined ||
(autofillState !== undefined && autofillState !== 'ai-completed')

const contributorCard = isPublished && (
const contributorCard = !isCreating && (
<ResourceContributorCard {...resourceContributorCardProps} key="contributor-card" />
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const useResourcePageProps = ({ resourceKey }: ResourcePageHookArg) => {
extraDetailsItems: [],
}
const resourceProps: ProxiedResourceProps = {
isCreating,
saveState,
mainLayoutProps,
mainResourceCardSlots,
Expand Down
Loading