Skip to content
Merged
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
@@ -1,7 +1,7 @@
<h2 mat-dialog-title i18n>Add New Component</h2>
<h2 mat-dialog-title i18n>Add New Activity</h2>
<mat-dialog-content>
<p class="flex flex-wrap justify-start items-center gap-2">
<span i18n>Select the component type you want to add or</span>
<span i18n>Select the activity you want to add or</span>
<button mat-raised-button color="primary" (click)="goToImportComponent()" i18n>
import from another unit
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="flex flex-col gap-2">
<span i18n style="color: red">Close the JSON view to save the changes</span>
<mat-form-field class="w-full">
<mat-label i18n>Edit Component JSON</mat-label>
<mat-label i18n>Edit Activity JSON</mat-label>
<textarea
matInput
cdkTextareaAutosize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
color="primary"
class="topButton enable-in-translation"
(click)="showRubricAuthoring = !showRubricAuthoring"
matTooltip="Edit Component Rubric"
matTooltip="Edit activity rubric"
i18n-matTooltip
matTooltipPosition="above"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { FormsModule } from '@angular/forms';
imports: [FormsModule, MatFormFieldModule, MatInputModule],
selector: 'edit-component-width',
template: `<mat-form-field>
<mat-label i18n>Component Width</mat-label>
<mat-label i18n>Activity Width</mat-label>
<input
matInput
type="number"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<mat-form-field>
<mat-label i18n>Component</mat-label>
<mat-label i18n>Activity</mat-label>
<mat-select
[(ngModel)]="connectedComponent.componentId"
(ngModelChange)="connectedComponentComponentIdChanged()"
Expand All @@ -17,7 +17,7 @@
>
<span>{{ componentIndex + 1 }}. {{ component.type }} </span>
@if (component.id === componentId) {
<span i18n>(This Component)</span>
<span i18n>(This activity)</span>
}
</mat-option>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import { MatTooltipModule } from '@angular/material/tooltip';
template: `<div
class="connected-components-label-div flex flex-row justify-start items-center gap-5"
>
<label i18n>Connected Components</label>
<label i18n>Connected Activities</label>
<button
mat-raised-button
color="primary"
(click)="addConnectedComponent()"
matTooltip="Add Connected Component"
matTooltip
matTooltip="Add connected activity"
i18n-matTooltipPosition="above"
>
<mat-icon>add</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class EditConnectedComponentsComponent implements OnInit {
automaticallySetConnectedComponentFieldsIfPossible(connectedComponent: any): void {}

deleteConnectedComponent(index: number): void {
if (confirm($localize`Are you sure you want to delete this connected component?`)) {
if (confirm($localize`Are you sure you want to delete this connected activity?`)) {
this.connectedComponents.splice(index, 1);
this.connectedComponentChanged();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@if (componentContent.dynamicPrompt?.enabled) {
<div>
<div class="reference-component-div flex flex-row flex-wrap justify-start items-center gap-5">
<mat-label class="bold" i18n>Reference Component:</mat-label>
<mat-label class="bold" i18n>Reference Activity:</mat-label>
<select-step-and-component
[referenceComponent]="componentContent.dynamicPrompt.referenceComponent"
[thisComponentId]="componentId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</mat-form-field>
</div>
<div class="reference-component flex flex-row flex-wrap justify-start items-center gap-5">
<mat-label class="bold" i18n>Reference Component:</mat-label>
<mat-label class="bold" i18n>Reference Activity:</mat-label>
<select-step-and-component
[referenceComponent]="componentContent.questionBank.referenceComponent"
[thisComponentId]="componentId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@if (importType === 'step') {
<h5 i18n>Choose a unit from which to import step(s).</h5>
} @else {
<h5 i18n>Choose a unit from which to import component(s).</h5>
<h5 i18n>Choose a unit from which to import activities.</h5>
}
<mat-tab-group mat-stretch-tabs="false">
<mat-tab label="My Units" i18n-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ChooseImportUnitComponent {
) {}

ngOnInit(): void {
this.importType = history.state.importType;
this.importType = history.state.importType ?? 'step';
this.target = history.state;
this.myProjects = this.configService.getAuthorableProjects();
this.subscriptions.add(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<mat-form-field>
<mat-label i18n>Component</mat-label>
<mat-label i18n>Activity</mat-label>
<mat-select [(ngModel)]="componentId" (ngModelChange)="componentChanged()">
@for (component of components; track component; let componentIndex = $index) {
<mat-option
Expand All @@ -8,7 +8,7 @@
>
<span>{{ componentIndex + 1 }}. {{ component.type }}</span>
@if (component.id === thisComponentId) {
<span i18n>(This Component)</span>
<span i18n>(This activity)</span>
}
</mat-option>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<mat-error i18n> Step Title is required </mat-error>
}
</mat-form-field>
<h5 i18n>Select components to add to your new step (optional):</h5>
<h5 i18n>Select activities to add to your new step (optional):</h5>
<div class="flex flex-col md:flex-row">
<div class="initial-components notice-bg-bg flex items-start md:w-1/3 lg:w-1/4">
@if (initialComponents.length == 0) {
<div class="mat-small" i18n>No components added</div>
<div class="mat-small" i18n>No activities added</div>
}
@if (initialComponents.length > 0) {
<div class="component-list w-full" cdkDropList (cdkDropListDropped)="drop($event)">
Expand All @@ -23,7 +23,7 @@ <h5 i18n>Select components to add to your new step (optional):</h5>
mat-icon-button
(click)="deleteComponent(i)"
i18n-aria-label
aria-label="Delete component"
aria-label="Delete activity"
>
<mat-icon class="secondary-text">close</mat-icon>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="flex justify-start items-center">
<h2 mat-dialog-title i18n>Component Info</h2>
<h2 mat-dialog-title i18n>Activity Info</h2>
<div class="flex grow"></div>
<component-type-selector
[componentType]="componentType"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<h2 mat-dialog-title i18n>Preview Component</h2>
<h2 mat-dialog-title i18n>Preview Activity</h2>
@if (canSaveStarterState) {
<mat-divider />
<save-starter-state
class="notice-bg-bg"
[component]="component"
[starterState]="starterState"
/>
<save-starter-state class="notice-bg-bg" [component]="component" [starterState]="starterState" />
}
<mat-divider />
<mat-dialog-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ import { EditConstraintRemovalCriteriaComponent } from '../edit-constraint-remov
export class ComponentConstraintAuthoringComponent extends ConstraintAuthoringComponent {
constraintActions = [
new ConstraintAction('', $localize`Please Choose an Action`),
new ConstraintAction('makeThisComponentNotVisible', $localize`Make This Component Not Visible`)
new ConstraintAction('makeThisComponentNotVisible', $localize`Make This Activity Not Visible`)
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<mat-label>{{ param.text }}</mat-label>
<mat-select [(ngModel)]="criteria.params.componentId" (ngModelChange)="saveProject()">
<mat-option [value]="''">
<span class="red" i18n>Please Choose a Component</span>
<span class="red" i18n>Please Choose an Activity</span>
</mat-option>
@for (
component of getComponents(criteria.params.nodeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class EditConstraintRemovalCriteriaComponent implements OnInit {
protected componentIdToIsSelectable: { [componentId: string]: boolean } = {};
private componentParam: RemovalCriteriaParam = new RemovalCriteriaParam(
'componentId',
$localize`Component`
$localize`Activity`
);
@Input() constraint: any;
@Input() criteria: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h4 i18n>Create Branching Structure</h4>
formGroup.controls['criteria'].value === SCORE_VALUE ||
formGroup.controls['criteria'].value === CHOICE_CHOSEN_VALUE
) {
<p class="strong" i18n>Reference component:</p>
<p class="strong" i18n>Reference activity:</p>
<div class="flex flex-wrap gap-2">
<select-step
[nodeId]="formGroup.controls['nodeId'].value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4 class="title" i18n>Edit Branching Structure</h4>
formGroup.controls['criteria'].value === SCORE_VALUE ||
formGroup.controls['criteria'].value === CHOICE_CHOSEN_VALUE
) {
<p class="strong" i18n>Reference component:</p>
<p class="strong" i18n>Reference activity:</p>
<div class="flex flex-wrap gap-2">
<select-step
[nodeId]="formGroup.controls['nodeId'].value"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h5 i18n>Choose the component(s) that you want to import, then select Submit.</h5>
<h5 i18n>Choose the activities that you want to import, then select Submit.</h5>
<p class="flex flex-wrap justify-start items-center gap-2">
<strong i18n>Selected unit: {{ project?.metadata.title }}</strong>
<button
Expand Down Expand Up @@ -50,7 +50,7 @@ <h6>{{ item.stepNumber }}: {{ item.node.title }}</h6>
mat-raised-button
color="primary"
(click)="previewNode(item.node)"
matTooltip="Preview component"
matTooltip="Preview activity"
matTooltipPosition="above"
i18n-matTooltip
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function ngOnInit() {
);
expect(previewStepButton).toBeTruthy();
const previewComponentButton = await loader.getHarness(
MatButtonHarness.with({ selector: '[mattooltip="Preview component"]' })
MatButtonHarness.with({ selector: '[mattooltip="Preview activity"]' })
);
expect(previewComponentButton).toBeTruthy();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h5 i18n>Milestone Satisfy Criteria</h5>
</mat-select>
</mat-form-field>
<mat-form-field class="width-200">
<mat-label i18n>Component ID</mat-label>
<mat-label i18n>Activity ID</mat-label>
<mat-select
[(ngModel)]="satisfyCriteria.componentId"
(ngModelChange)="save()"
Expand Down Expand Up @@ -205,7 +205,7 @@ <h5 i18n>Milestone Satisfy Criteria</h5>
satisfyCriteria.componentId
)
"
matTooltip="Copy Node ID and Component ID to Milestone"
matTooltip="Copy Node ID and Activity ID to Milestone"
i18n-matTooltip
>
<mat-icon>content_copy</mat-icon>
Expand Down Expand Up @@ -253,7 +253,7 @@ <h5 i18n>Location {{ locationIndex + 1 }}</h5>
</mat-select>
</mat-form-field>
<mat-form-field class="width-200">
<mat-label i18n>Component ID</mat-label>
<mat-label i18n>Activity ID</mat-label>
<mat-select [(ngModel)]="location.componentId" (ngModelChange)="save()">
@for (
component of getComponents(location.nodeId);
Expand Down Expand Up @@ -455,7 +455,7 @@ <h5 i18n>
</mat-select>
</mat-form-field>
<mat-form-field class="width-300">
<mat-label i18n>Component ID</mat-label>
<mat-label i18n>Activity ID</mat-label>
<mat-select
[(ngModel)]="satisfyCriteria.componentId"
(ngModelChange)="save()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class MilestonesAuthoringComponent {
nodeId: string,
componentId: string
): void {
const message = $localize`Are you sure you want to copy the Node ID and Component ID to the rest of this Milestone?`;
const message = $localize`Are you sure you want to copy the Node ID and Activity ID to the rest of this Milestone?`;
if (confirm(message)) {
this.setNodeIdAndComponentIdToAllSatisfyCriteria(milestone, nodeId, componentId);
this.setNodeIdAndComponentIdToAllLocations(milestone, nodeId, componentId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<button
mat-icon-button
color="primary"
matTooltip="Add component"
matTooltip="Add activity"
matTooltipPosition="after"
(click)="addComponent()"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class AddComponentButtonComponent {
@Input() insertAfterComponentId: string = null;
@Output() newComponentsEvent: EventEmitter<any> = new EventEmitter<any>();
@Input() node: Node;
protected tooltipText = $localize`Add component`;
protected tooltipText = $localize`Add activity`;

constructor(
private createComponentService: CreateComponentService,
Expand All @@ -48,7 +48,7 @@ export class AddComponentButtonComponent {
private updateUI(): void {
this.firstComponent = this.node.getComponentPosition(this.insertAfterComponentId) === 0;
if (this.node.components.length > 0 && !this.firstComponent) {
this.tooltipText = $localize`Add component after`;
this.tooltipText = $localize`Add activity after`;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ export class NodeAdvancedPathAuthoringComponent implements OnInit {
protected transitionCriterias = [
{
value: 'score',
text: $localize`Get a specific score on a component`,
text: $localize`Get a specific score on an activity`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'componentId', text: $localize`Activity 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`,
text: $localize`Choose a specific choice on an activity`,
params: [
{ value: 'nodeId', text: $localize`Node ID` },
{ value: 'componentId', text: $localize`Component ID` },
{ value: 'componentId', text: $localize`Activity ID` },
{ value: 'choiceIds', text: $localize`Choices` }
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mat-icon-button
(click)="$event.stopPropagation(); copy()"
(keydown)="$event.stopPropagation()"
matTooltip="Copy component"
matTooltip="Copy activity"
matTooltipPosition="above"
i18n-matTooltip
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</button>
</div>
@if (components.length === 0 && !isGroupNode) {
<p i18n>This step does not have any components.</p>
<p i18n>This step does not have any activities.</p>
<add-component [node]="node" (newComponentsEvent)="highlightComponents($event)" />
}
<div
Expand Down Expand Up @@ -62,7 +62,7 @@
mat-icon-button
(click)="$event.stopPropagation(); deleteComponent($event, i + 1, component)"
(keydown)="$event.stopPropagation()"
matTooltip="Delete Component"
matTooltip="Delete activity"
matTooltipPosition="above"
i18n-matTooltip
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function deleteComponent() {
confirmSpy.and.returnValue(true);
clickComponentDeleteButton(component2.id);
expect(confirmSpy).toHaveBeenCalledWith(
`Are you sure you want to delete this component?\n\n2. MultipleChoice`
`Are you sure you want to delete this activity?\n\n2. MultipleChoice`
);
expect(saveProjectSpy).toHaveBeenCalled();
expect(teacherProjectService.idToNode[nodeId1].components).toEqual([component1, component3]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class NodeAuthoringComponent implements OnInit {
event.stopPropagation();
if (
confirm(
$localize`Are you sure you want to delete this component?\n\n${componentNumber}. ${component.type}`
$localize`Are you sure you want to delete this activity?\n\n${componentNumber}. ${component.type}`
)
) {
this.deleteComponentsOnServer([this.node.deleteComponent(component.id)]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h2 mat-dialog-title i18n>Select Peer Grouping</h2>
<mat-dialog-content class="dialog-content-scroll">
<p i18n>Choose a Peer Grouping to use for this component:</p>
<p i18n>Choose a Peer Grouping to use for this activity:</p>
@if (peerGroupings.length === 0) {
<p i18n>(There are no Peer Groupings. Please create a new one.)</p>
}
Expand Down
Loading
Loading