Skip to content
Draft
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 @@ -5,6 +5,7 @@ import { CopyProjectService } from '../../services/copyProjectService';
import { TeacherProjectService } from '../../services/teacherProjectService';
import { TeacherDataService } from '../../services/teacherDataService';
import { UtilService } from '../../services/utilService';
import { newProjectTemplate } from '../newProjectTemplate';
import * as angular from 'angular';
import * as $ from 'jquery';

Expand Down Expand Up @@ -133,7 +134,7 @@ class MainAuthoringController {
}

showRegisterNewProjectView() {
this.project = this.ProjectService.getNewProjectTemplate();
this.project = newProjectTemplate;
this.showCreateProjectView = true;
this.$timeout(() => {
document.getElementById('newProjectTitle').focus();
Expand Down
133 changes: 133 additions & 0 deletions src/assets/wise5/authoringTool/newProjectTemplate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
export const newProjectTemplate = {
nodes: [
{
id: 'group0',
type: 'group',
title: 'Master',
startId: 'group1',
ids: ['group1']
},
{
id: 'group1',
type: 'group',
title: $localize`First Lesson`,
startId: 'node1',
ids: ['node1'],
icons: {
default: {
color: '#2196F3',
type: 'font',
fontSet: 'material-icons',
fontName: 'info'
}
}
},
{
id: 'node1',
type: 'node',
title: $localize`First Step`,
components: [],
constraints: [],
showSaveButton: false,
showSubmitButton: false,
transitionLogic: {
transitions: []
}
}
],
constraints: [],
startGroupId: 'group0',
startNodeId: 'node1',
navigationMode: 'guided',
layout: {
template: 'starmap|leftNav|rightNav'
},
metadata: {
title: ''
},
notebook: {
enabled: false,
label: $localize`Notebook`,
enableAddNew: true,
itemTypes: {
note: {
type: 'note',
enabled: true,
enableLink: true,
enableAddNote: true,
enableClipping: true,
enableStudentUploads: true,
requireTextOnEveryNote: false,
label: {
singular: $localize`note`,
plural: $localize`notes`,
link: $localize`Notes`,
icon: 'note',
color: '#1565C0'
}
},
report: {
enabled: false,
label: {
singular: $localize`report`,
plural: $localize`reports`,
link: $localize`Report`,
icon: 'assignment',
color: '#AD1457'
},
notes: [
{
reportId: 'finalReport',
title: $localize`Final Report`,
description: $localize`Final summary report of what you learned in this unit`,
prompt: $localize`Use this space to write your final report using evidence from your notebook.`,
content: $localize`<h3>This is a heading</h3><p>This is a paragraph.</p>`
}
]
}
}
},
teacherNotebook: {
enabled: true,
label: $localize`Teacher Notebook`,
enableAddNew: true,
itemTypes: {
note: {
type: 'note',
enabled: false,
enableLink: true,
enableAddNote: true,
enableClipping: true,
enableStudentUploads: true,
requireTextOnEveryNote: false,
label: {
singular: $localize`note`,
plural: $localize`notes`,
link: $localize`Notes`,
icon: 'note',
color: '#1565C0'
}
},
report: {
enabled: true,
label: {
singular: $localize`teacher notes`,
plural: $localize`teacher notes`,
link: $localize`Teacher Notes`,
icon: 'assignment',
color: '#AD1457'
},
notes: [
{
reportId: 'teacherReport',
title: $localize`Teacher Notes`,
description: $localize`Notes for the teacher as they're running the WISE unit`,
prompt: $localize`Use this space to take notes for this unit`,
content: $localize`<p>Use this space to take notes for this unit</p>`
}
]
}
}
},
inactiveNodes: []
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export const canChangePathOptions = [
{ value: true, text: $localize`True` },
{ value: false, text: $localize`False` }
];

export const howToChooseAmongAvailablePathsOptions = [
{ value: 'random', text: $localize`Random` },
{ value: 'workgroupId', text: $localize`Workgroup ID` },
{ value: 'firstAvailable', text: $localize`First Available` },
{ value: 'lastAvailable', text: $localize`Last Available` },
{ value: 'tag', text: $localize`Tag` }
];

export const transitionCriterias = [
{
value: 'score',
text: $localize`Get a specific score on a component`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'scores', text: $localize`Scores(s)` },
{ value: 'scoreId', text: $localize`Score ID (Optional)` }
]
},
{
value: 'choiceChosen',
text: $localize`Choose a specific choice on a component`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'choiceIds', text: $localize`Choices` }
]
},
{
value: 'tag',
text: $localize`Have Tag Assigned To Workgroup`,
params: [{ value: 'tag', text: $localize`Tag` }]
}
];

export const whenToChoosePathOptions = [
{ value: 'enterNode', text: $localize`Enter Node` },
{ value: 'exitNode', text: $localize`Exit Node` },
{ value: 'scoreChanged', text: $localize`Score Changed` },
{ value: 'studentDataChanged', text: $localize`Student Data Changed` }
];
Original file line number Diff line number Diff line change
@@ -1,60 +1,22 @@
import { Component, OnInit } from '@angular/core';
import { TeacherDataService } from '../../../../services/teacherDataService';
import { TeacherProjectService } from '../../../../services/teacherProjectService';
import * as authoringOptions from './node-advanced-path-authoring-options';

@Component({
selector: 'node-advanced-path-authoring',
templateUrl: 'node-advanced-path-authoring.component.html',
styleUrls: ['node-advanced-path-authoring.component.scss']
})
export class NodeAdvancedPathAuthoringComponent implements OnInit {
canChangePathOptions = [
{ value: true, text: $localize`True` },
{ value: false, text: $localize`False` }
];
howToChooseAmongAvailablePathsOptions = [
{ value: 'random', text: $localize`Random` },
{ value: 'workgroupId', text: $localize`Workgroup ID` },
{ value: 'firstAvailable', text: $localize`First Available` },
{ value: 'lastAvailable', text: $localize`Last Available` },
{ value: 'tag', text: $localize`Tag` }
];
canChangePathOptions = authoringOptions.canChangePathOptions;
howToChooseAmongAvailablePathsOptions = authoringOptions.howToChooseAmongAvailablePathsOptions;
items: any[];
node: any;
nodeId: string;
nodeIds: string[];
transitionCriterias = [
{
value: 'score',
text: $localize`Get a specific score on a component`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'scores', text: $localize`Scores(s)` },
{ value: 'scoreId', text: $localize`Score ID (Optional)` }
]
},
{
value: 'choiceChosen',
text: $localize`Choose a specific choice on a component`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'choiceIds', text: $localize`Choices` }
]
},
{
value: 'tag',
text: $localize`Have Tag Assigned To Workgroup`,
params: [{ value: 'tag', text: $localize`Tag` }]
}
];
whenToChoosePathOptions = [
{ value: 'enterNode', text: $localize`Enter Node` },
{ value: 'exitNode', text: $localize`Exit Node` },
{ value: 'scoreChanged', text: $localize`Score Changed` },
{ value: 'studentDataChanged', text: $localize`Student Data Changed` }
];
transitionCriterias = authoringOptions.transitionCriterias;
whenToChoosePathOptions = authoringOptions.whenToChoosePathOptions;

constructor(
private ProjectService: TeacherProjectService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ConfigService } from '../../services/configService';
import { SpaceService } from '../../services/spaceService';
import { TeacherProjectService } from '../../services/teacherProjectService';
import { UtilService } from '../../services/utilService';
import { newProjectTemplate } from '../newProjectTemplate';

class NotebookAuthoringController {
$translate: any;
Expand Down Expand Up @@ -38,12 +39,12 @@ class NotebookAuthoringController {
this.reportIdToAuthoringNote = {};

if (this.project.notebook == null) {
const projectTemplate = this.ProjectService.getNewProjectTemplate();
const projectTemplate = newProjectTemplate;
this.project.notebook = projectTemplate.notebook;
}

if (this.project.teacherNotebook == null) {
const projectTemplate = this.ProjectService.getNewProjectTemplate();
const projectTemplate = newProjectTemplate;
projectTemplate.teacherNotebook.enabled = false;
this.project.teacherNotebook = projectTemplate.teacherNotebook;
}
Expand Down Expand Up @@ -99,7 +100,7 @@ class NotebookAuthoringController {
}

addReportNote() {
const projectTemplate = this.ProjectService.getNewProjectTemplate();
const projectTemplate = newProjectTemplate;
if (this.project.notebook.itemTypes.report.notes == null) {
this.project.notebook.itemTypes.report.notes = [];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
export const graphTypes = [
{
value: 'line',
text: $localize`Line Plot`
},
{
value: 'column',
text: $localize`Column Plot`
},
{
value: 'scatter',
text: $localize`Scatter Plot`
}
];

export const roundingOptions = [
{
value: null,
text: $localize`No Rounding`
},
{
value: 'integer',
text: $localize`Integer (example 1)`
},
{
value: 'tenth',
text: $localize`Tenth (exapmle 0.1)`
},
{
value: 'hundredth',
text: $localize`Hundredth (example 0.01)`
}
];

export const symbols = [
{
value: 'circle',
text: $localize`Circle`
},
{
value: 'square',
text: $localize`Square`
},
{
value: 'triangle',
text: $localize`Triangle`
},
{
value: 'triangle-down',
text: $localize`Triangle Down`
},
{
value: 'diamond',
text: $localize`Diamond`
}
];

export const seriesTypes = [
{
value: 'line',
text: $localize`Line`
},
{
value: 'scatter',
text: $localize`Point`
}
];

export const lineTypes = [
{
value: 'Solid',
text: $localize`Solid`
},
{
value: 'Dash',
text: $localize`Dash`
},
{
value: 'Dot',
text: $localize`Dot`
},
{
value: 'ShortDash',
text: $localize`Short Dash`
},
{
value: 'ShortDot',
text: $localize`Short Dot`
}
];

export const xAxisTypes = [
{
value: 'limits',
text: $localize`Limits`
},
{
value: 'categories',
text: $localize`Categories`
}
];
Loading