Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brightspace-hmc/siren-sdk

Package Overview
Dependencies
Maintainers
2
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightspace-hmc/siren-sdk - npm Package Compare versions

Comparing version 2.130.0 to 2.131.0

2

package.json
{
"name": "@brightspace-hmc/siren-sdk",
"version": "2.130.0",
"version": "2.131.0",
"type": "module",

@@ -5,0 +5,0 @@ "description": "",

@@ -5,2 +5,5 @@ import { Actions, Classes, Rels } from '../../hypermedia-constants.js';

const HUMAN_GENERATED = 0;
const AI_INSPIRED = 3;
const actions = {

@@ -270,2 +273,6 @@ delete: 'delete-folder',

isAiInspired() {
return this._entity && this._entity.hasClass(Classes.assignments.aiInspired);
}
/**

@@ -464,2 +471,22 @@ * @returns {bool} If the assignment type is set to individual assignment

/**
* @summary Formats action and fields if assignment has been ai inspired
* @param {object} isAiInspired whether this assignment has been ai inspired
* @returns {object} action and fields for updating isAiInspired
*/
_formatUpdateAiInspiredAction(isAiInspired) {
if (typeof isAiInspired === 'undefined') return;
if (!this._hasAiInspiredChanged(isAiInspired)) return;
const action = this._entity.getActionByName(Actions.assignments.updateName);
if (!action) {
return;
}
const fields = [
{ name: 'aiHumanOrigin', value: isAiInspired ? AI_INSPIRED : HUMAN_GENERATED },
];
return { action, fields };
}
/**
* Sets the submission type of the assignment

@@ -919,2 +946,3 @@ * @param {number} submissionType Submission type - see SUBMISSIONTYPE_T under https://docs.valence.desire2learn.com/res/dropbox.html#attributes for more info

const updateAllowTextSubmissionAction = this._formatUpdateAllowTextSubmissionAction(assignment.allowTextSubmission);
const updateIsAiInspiredAction = this._formatUpdateAiInspiredAction(assignment.isAiInspired);

@@ -935,3 +963,4 @@ const sirenActions = [

updateNotificationEmailAction,
updateAllowTextSubmissionAction
updateAllowTextSubmissionAction,
updateIsAiInspiredAction
];

@@ -1026,2 +1055,6 @@

_hasAiInspiredChanged(aiInspired) {
return aiInspired !== this.isAiInspired();
}
_hasInstructionsChanged(instructions) {

@@ -1028,0 +1061,0 @@ return instructions !== this.instructionsHtml();

@@ -202,2 +202,3 @@ import { Actions, Classes, Rels } from '../../hypermedia-constants.js';

[this.url(), contentWebLink.url],
[this.descriptionRichText(), contentWebLink.descriptionRichText],
[this.isExternalResource(), contentWebLink.isExternalResource]

@@ -204,0 +205,0 @@ ];

@@ -353,3 +353,4 @@ export const Rels = {

annotationDisabled: 'disabled',
collection: 'collection'
collection: 'collection',
aiInspired: 'ai-inspired'
},

@@ -356,0 +357,0 @@ associations: {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc