Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
152d129
upgrade user-list and user-info
exidy80 Dec 7, 2024
59c8914
got version/buiddate working on welcome screen; fixed deprecations in…
exidy80 Dec 8, 2024
d9f2d91
additional changes related to user subsystem upgrade
exidy80 Dec 8, 2024
d111093
used router service instead of deprecated this.transitionTo
exidy80 Dec 8, 2024
a663e2e
cleaned up a few more deprecations in models
exidy80 Dec 8, 2024
186e946
move radiogroup to ui folder
exidy80 Dec 9, 2024
a81ac3b
move checkboxlist to ui folder
exidy80 Dec 9, 2024
d1b929c
Move errorbox to UI folder
exidy80 Dec 9, 2024
8ef45f2
move wordcloudContainer to ui folder
exidy80 Dec 9, 2024
d6fc200
remove unneeded .gitkeep files
exidy80 Dec 9, 2024
14061be
move radio-filter to ui folder
exidy80 Dec 9, 2024
b031400
Merge branch 'develop' of https://github.com/mathematicalthinking/enc…
exidy80 Dec 12, 2024
41969c4
fixed some models and some bad syntax
exidy80 Dec 12, 2024
168b67f
upgrade some routes, route templates, and related components (assignm…
exidy80 Dec 14, 2024
130c75f
remove unused vendor imports
exidy80 Dec 30, 2024
9c93966
simplified admin filter name; deleted unneeded file
exidy80 Dec 30, 2024
01e9f16
categories filtering in problems (popup menu still in progress)
exidy80 Jan 3, 2025
6c6f380
categories menu almost working
exidy80 Jan 3, 2025
ec79c9d
refactored category filtering and menu
exidy80 Jan 5, 2025
2c9d28a
simplify categories menu
exidy80 Jan 5, 2025
cc5e6c4
don't mutate argument
exidy80 Jan 5, 2025
027b634
remove some commens
exidy80 Jan 6, 2025
d9284e6
got problems (new and existing) to show up
exidy80 Jan 7, 2025
b280a8a
updated routing for problem view, edit, and assign
exidy80 Jan 18, 2025
157e235
fix my-select and put into UI folder
exidy80 Jan 23, 2025
e66f6bd
updated permissions services & usage
exidy80 Jan 26, 2025
a959916
refactor problem-info, problem-new, category-menu. Add tabs to proble…
exidy80 Jan 28, 2025
7d68a85
connected with problem subsystem upgrade
exidy80 Jan 28, 2025
509cdd5
problem-utils service
exidy80 Jan 29, 2025
5762015
fix error in problem list 'more' menu
exidy80 Feb 10, 2025
606df06
simplify permissions and make currentUser service more useful
exidy80 Feb 10, 2025
6432d36
upgrade top layer of assignment subsystem.
exidy80 Mar 4, 2025
a491709
upgrade to workspace reports
exidy80 Mar 21, 2025
395eb2c
fix more menu on problem list
exidy80 Mar 23, 2025
60ecb1c
fixed tests
exidy80 Mar 25, 2025
b60e186
upgrade reports fix
exidy80 Mar 26, 2025
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
14 changes: 0 additions & 14 deletions MODULE_REPORT.md

This file was deleted.

9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ If you run into the following error while running tests:

## Client `/app`

EnCOMPASS uses Ember for the client and was recently migrated to Ember Octane from v2.14. Portions are not fully migrated.
EnCOMPASS uses Ember for the client and was recently migrated to Ember Octane from v2.14. Portions are not fully migrated. See [UPGRADE_NOTES](./UPGRADE_NOTES.md) for more information.

### workflow

Expand All @@ -90,9 +90,6 @@ EnCOMPASS uses Ember for the client and was recently migrated to Ember Octane fr

Ember is switching to Glimmer for its component engine. Components that have their templates (.hbs files) in `app/components` have been migrated. Their classes (.js files) will look like native JS classes. Components with templates in `app/templates/components` have not been migrated and still use Classic Ember component classes. I tried to combine similar components when possible.

- `admin-problem-filter` and `admin-workspace-filter` could be comined
- `problem-filter` and `workspace-filter` could be combined

### mixins

usage of mixins (found in `app/mixins`) are deprecated - they still work for classic components but should be refactored away
Expand Down Expand Up @@ -122,9 +119,7 @@ Each route has a corresponding template that gets rendered. It should be in the

Libraries that are not managed by npm are added in the `/vendor` directory and configured into the bundle in `/ember-cli-build.js` including:

1. selectize input library (see `app/components/selectize-input.js`)
2. typeahead library (see `app/components/twitter-typeahead.js`)
3. selection libraries (`vendor/image-tagging.js` and `vendor/selection-highlighting.js`) that are used in `app/components/workspace-submission.js`
- selection libraries (`vendor/image-tagging.js` and `vendor/selection-highlighting.js`) that are used in `app/components/workspace-submission.js`

### `/helpers`

Expand Down
136 changes: 122 additions & 14 deletions UPGRADE_NOTES.md

Large diffs are not rendered by default.

Empty file removed app/components/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion app/components/admin-filter.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id='admin-workspace-filter'>
<div id='admin-filter'>
<!-- Main Dropdown -->
<div class='choose-filter-admin'>
<span class='filter-text'>Find by</span>
Expand Down
2 changes: 1 addition & 1 deletion app/components/admin-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Admin filter expects the subOptions to be an object with the following structure
val2: {type: 'checkbox', options: [{value, icon, label}, {value, icon, label, etc...]}
*/

export default class AdminWorkspaceFilterComponent extends Component {
export default class AdminFilterComponent extends Component {
@service('utility-methods') utils;
@service inputState;
@tracked dropdownSelections = [];
Expand Down
10 changes: 5 additions & 5 deletions app/components/answer-new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Input id='answer' required='true' @type='hidden' @value={{answer}} />
</div>
{{#each this.briefSummaryErrors as |error|}}
<ErrorBox
<Ui::ErrorBox
@error={{error}}
@resetError={{action (mut this.briefSummaryErrors) null}}
@showDismiss={{true}}
Expand All @@ -42,7 +42,7 @@
/>
</div>
{{#each this.explanationErrors as |error|}}
<ErrorBox
<Ui::ErrorBox
@error={{error}}
@resetError={{action (mut this.explanationErrors) null}}
@showDismiss={{true}}
Expand Down Expand Up @@ -119,21 +119,21 @@
{{/if}}
</fieldset>
{{#if this.isMissingRequiredFields}}
<ErrorBox
<Ui::ErrorBox
@error='Please provide all required fields.'
@showDismiss={{true}}
@resetError={{action (mut this.isMissingRequiredFields) null}}
/>
{{/if}}
{{#if this.overSizedFileError}}
<ErrorBox
<Ui::ErrorBox
@error={{this.overSizedFileError}}
@showDismiss={{true}}
@resetError={{action (mut this.overSizedFileError) null}}
/>
{{/if}}
{{#if this.isExplanationTooLarge}}
<ErrorBox
<Ui::ErrorBox
@error={{this.tooLargeExplanationMsg}}
@showDismiss={{true}}
@resetError={{action (mut this.isExplanationTooLarge) null}}
Expand Down
13 changes: 9 additions & 4 deletions app/components/assignment-info-student.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{{/if}}
</section>
{{#each this.loadAnswerErrors as |error|}}
<ErrorBox
<Ui::ErrorBox
@error={{error}}
@showDismiss={{true}}
@resetError={{action 'removeErrorFromArray' 'loadAnswerErrors' error}}
Expand Down Expand Up @@ -80,12 +80,17 @@
{{/if}}
{{#if this.showReviseButton}}
<button
class='edit-assignment-button' type="button" {{action 'reviseAssignmentResponse'}}
class='edit-assignment-button'
type='button'
{{action 'reviseAssignmentResponse'}}
>Revise <i class='fas fa-edit'></i></button>
{{/if}}
{{#if this.showRespondButton}}
<button class='save-assign-btn' type="button" {{action 'beginAssignmentResponse'}}>Share
Your Ideas
<button
class='save-assign-btn'
type='button'
{{action 'beginAssignmentResponse'}}
>Share Your Ideas
<i class='fas fa-lightbulb'></i></button>
{{/if}}

Expand Down
43 changes: 25 additions & 18 deletions app/components/assignment-info-teacher.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
name='daterange'
id='assignedDate'
@type='date'
@value={{(format-date @assignment.assignedDate 'YYYY-MM-DD')}} {{on "change" (action 'updateAssignedDate')}}
@value={{(format-date @assignment.assignedDate 'YYYY-MM-DD')}}
{{on 'change' (action 'updateAssignedDate')}}
/>
{{else}}
<p class='label'>
Expand All @@ -41,7 +42,8 @@
id='dueDate'
name='daterange'
@type='date'
@value={{(format-date @assignment.dueDate 'YYYY-MM-DD')}} {{on "change" (action 'updateDueDate')}}
@value={{(format-date @assignment.dueDate 'YYYY-MM-DD')}}
{{on 'change' (action 'updateDueDate')}}
/>
{{else}}
<p class='label'>
Expand All @@ -54,16 +56,12 @@
</div>
{{! Class, Problem }}
<div class='section-details'>
{{!-- {{#if this.showSectionInput}}
<SelectizeInput @inputId="assn-new-section-select" @initialOptions={{this.sectionOptions}} @initialItems={{this.initialSectionItem}} @onItemAdd={{action "updateSelectizeSingle"}} @onItemRemove={{action "updateSelectizeSingle"}} @maxItems={{1}} @labelField="name" @valueField="id" @searchField="name" @propToUpdate="section" @placeholder="Search for a section by name" @model="section" @store={{this.store}} />
{{else}} --}}
<p>
Class:
<LinkTo @route='sections.section' @model={{@section.id}}>
<span>{{@section.name}}</span>
</LinkTo>
</p>
{{!-- {{/if}} --}}
</div>
<div class='section-details'>
<p>
Expand All @@ -72,10 +70,6 @@
<span>{{@problem.title}}</span>
</LinkTo>
</p>
{{!-- {{#if this.showProblemInput}}
<SelectizeInput @store={{this.store}} @inputId="assn-new-problem-select" @initialOptions={{this.problemOptions}} @initialItems={{this.initialProblemItem}} @onItemAdd={{action "updateSelectizeSingle"}} @onItemRemove={{action "updateSelectizeSingle"}} @maxItems={{1}} @labelField="title" @valueField="id" @searchField="title" @propToUpdate="problem" @placeholder="Search for a problem by title" @isAsync={{true}} @model="problem" @queryParamsKey="query" @searchCriterion="title" @topLevelQueryParams="searchBy" @preload={{this.problemsPreloadValue}} />
{{else}} --}}
{{!-- {{/if}} --}}
</div>
<div class='workspace-details'>
<p class='labelP'>
Expand Down Expand Up @@ -109,14 +103,15 @@
@section={{@section}}
@problem={{@problem}}
@onCancel={{action (mut showLinkedWsForm) false}}
@store={{this.store}}
@handleResults={{action 'handleCreatedLinkedWs'}}
/>
{{/if}}
{{#if this.showAddLinkedWsBtn}}
<button
data-test='add-linked-ws'
class='add-linkedworkspaces-btn' type="button" {{action (mut showLinkedWsForm) true}}
class='add-linkedworkspaces-btn'
type='button'
{{action (mut showLinkedWsForm) true}}
>
Add Linked Workspaces
<i class='fas fa-plus-circle'></i>
Expand Down Expand Up @@ -152,14 +147,15 @@
@section={{@section}}
@problem={{@problem}}
@onCancel={{action (mut showParentWsForm) false}}
@store={{this.store}}
@handleResults={{action 'handleCreatedParentWs'}}
/>
{{/if}}
{{#if this.showAddParentWsBtn}}
<button
data-test='add-parent-ws'
class='add-parent-workspace-btn' type="button" {{action (mut showParentWsForm) true}}
class='add-parent-workspace-btn'
type='button'
{{action (mut showParentWsForm) true}}
>Add Parent Workspace <i class='fas fa-plus-circle'></i></button>
{{/if}}
{{#if this.showNoParentWsMsg}}
Expand Down Expand Up @@ -188,7 +184,9 @@
{{#if this.showEditButton}}
<button
data-test='edit-assignment'
class='edit-assignment-button' type="button" {{action 'editAssignment'}}
class='edit-assignment-button'
type='button'
{{action 'editAssignment'}}
>
Edit Assignment
<i class='fas fa-edit'></i>
Expand All @@ -197,19 +195,28 @@
{{#if this.isEditing}}
<button
class='save-assign-btn'
data-test='assn-save' type="button" {{action 'updateAssignment'}}
data-test='assn-save'
type='button'
{{action 'updateAssignment'}}
>
Save Assignment
<i class='fas fa-save'></i>
</button>
<button
class='cancelEditBtn'
data-test='assn-cancel' type="button" {{action 'stopEditing'}}
data-test='assn-cancel'
type='button'
{{action 'stopEditing'}}
>
Cancel
<i class='fas fa-times'></i>
</button>
<button data-test='trash-assn' class='right' type="button" {{action 'showDeleteModal'}}>
<button
data-test='trash-assn'
class='right'
type='button'
{{action 'showDeleteModal'}}
>
<i class='fa fa-trash' aria-hidden='true'></i>
</button>
{{/if}}
Expand Down
22 changes: 14 additions & 8 deletions app/components/assignment-info-teacher.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import $ from 'jquery';
import moment from 'moment';

export default class AssignmentInfoTeacherComponent extends ErrorHandlingComponent {
@service store;
@service router;
@service currentUser;
@service('sweet-alert') alert;
@service('assignment-permissions') permissions;
@service('utility-methods') utils;
@tracked formattedDueDate = null;
@tracked formattedAssignedDate = null;
@tracked isEditing = false;
Expand All @@ -21,6 +27,11 @@ export default class AssignmentInfoTeacherComponent extends ErrorHandlingCompone
@tracked showLinkedWsForm = false;
@tracked areSubmissionsExpanded = true;
@tracked cachedProblem = [];

get user() {
return this.currentUser.user;
}

get showProblemInput() {
return this.isEditing && this.canEditProblem;
}
Expand All @@ -45,11 +56,6 @@ export default class AssignmentInfoTeacherComponent extends ErrorHandlingCompone
get allGroupsHaveWs() {
return this.groupsWithoutWorkspaces.length === 0;
}
@service store;
@service router;
@service('sweet-alert') alert;
@service('assignment-permissions') permissions;
@service('utility-methods') utils;

get hasLinkedWorkspaces() {
return this.args.assignment.linkedWorkspaces.length > 0;
Expand Down Expand Up @@ -86,7 +92,7 @@ export default class AssignmentInfoTeacherComponent extends ErrorHandlingCompone
this.args.assignment,
'createdBy'
);
return this.args.currentUser.id === creatorId;
return this.user.id === creatorId;
}

get isDirty() {
Expand All @@ -103,7 +109,7 @@ export default class AssignmentInfoTeacherComponent extends ErrorHandlingCompone
}

get canEdit() {
const isAdmin = this.args.currentUser.isAdmin;
const isAdmin = this.user.isAdmin;
const isClean = this.isClean;
const isYourOwn = this.isYourOwn;

Expand Down Expand Up @@ -140,7 +146,7 @@ export default class AssignmentInfoTeacherComponent extends ErrorHandlingCompone
}

get canEditDate() {
const isAdmin = this.args.currentUser.isAdmin;
const isAdmin = this.user.isAdmin;
const canEdit = this.canEdit;
const isBeforeAssignedDate = this.isBeforeAssignedDate;
return isAdmin || (canEdit && isBeforeAssignedDate);
Expand Down
38 changes: 21 additions & 17 deletions app/components/assignment-info.hbs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<h2 class="info-header">Assignment Details</h2>
<div class="clear"></div>
{{#each this.initialLoadErrors as |error|}}
<p class="error-message">{{error}}</p>
{{/each}}
{{#if @currentUser.isStudent}}
<AssignmentInfoStudent @assignment={{@assignment}} @problem={{this.currentProblem}} @section={{this.currentSection}} @answerList={{@assignment.answers.content}} />
<h2 class='info-header'>Assignment Details</h2>
<div class='clear'></div>
{{#if @isStudent}}
<AssignmentInfoStudent
@assignment={{@assignment}}
@problem={{@currentProblem}}
@section={{@currentSection}}
@answerList={{@answers}}
@onAnswerCreated={{@onAnswerCreated}}
/>
{{else}}
<AssignmentInfoTeacher @groups={{@groups}} @sections={{@sections}} @assignment={{@assignment}} @currentUser={{@currentUser}} @studentList={{@assignmentStudents}} @section={{this.currentSection}} @problem={{this.currentProblem}} @linkedWorkspaces={{@assignment.linkedWorkspaces.content}} @parentWorkspace={{@assignment.parentWorkspace.content}} />
{{/if}}








<AssignmentInfoTeacher
@groups={{@groups}}
@sections={{@sections}}
@assignment={{@assignment}}
@studentList={{@assignmentStudents}}
@section={{@currentSection}}
@problem={{@currentProblem}}
@linkedWorkspaces={{@linkedWorkspaces}}
@parentWorkspace={{@parentWorkspace}}
/>
{{/if}}
22 changes: 0 additions & 22 deletions app/components/assignment-info.js

This file was deleted.

Loading
Loading