forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes FOO-1409 flag = none no more client_apps, canvas_quizzes now lives as part of canvas-lms proper inside app/jsx/, which makes the build leaner and leaves us with one less thing to reason about logical changes: - converted from AMD to ES modules - upgraded to recent react + react-router - dropped RSVP in favor of native Promises - used CanvasModal instead of home-grown Dialog - removed dead code; notifications in particular were fishy as there had no dependents at all and did not even show up in the graph - ported tests to Jest, added more unit ones and two integration ones - removed "config.onError" and now throws errors where appropriate - disabled console statements in non-dev :: test plan :: - create a (old-school) quiz containing all types of questions - as 3 distinct students, take the quiz and try to randomize your answers at this point it's helpful to have a reference to compare the screens; I replicated the quiz on my production sandbox for this - go to /courses/:id/quizzes/:id/submissions/:id/log - verify it looks OK - click on a specific question in the stream and verify the question inspector widget works OK - go back to stream and push "View table" - verify the table and its controls are OK - go to /courses/:id/quizzes/:id/statistics - verify it looks OK - click on ? in the discrimination index chart and verify it displays a dialog with help content - click on "X respondents" in one of the charts and verify it displays a dialog with the respondent names - verify the interactive charts do interact as expected (no logic changed here so just a quick glance) - link to "View in SpeedGrader" for essay-like questions works Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Simon Williams <[email protected]> QA-Review: Simon Williams <[email protected]> Product-Review: Simon Williams <[email protected]>
- Loading branch information
Showing
461 changed files
with
10,670 additions
and
46,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/canvas_quizzes/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (C) 2021 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import React from 'react' | ||
import { | ||
BrowserRouter, | ||
HashRouter, | ||
Switch, | ||
Route, | ||
} from 'react-router-dom' | ||
|
||
import AnswerMatrixRoute from '../routes/answer_matrix' | ||
import AppRoute from '../routes/app' | ||
import EventStreamRoute from '../routes/event_stream' | ||
import QuestionRoute from '../routes/question' | ||
|
||
export default function App(props) { | ||
const matches = window.location.pathname.match(/(.*\/log)/) | ||
const baseUrl = (matches && matches[0]) || '' | ||
const Router = props.useHashRouter ? HashRouter : BrowserRouter | ||
|
||
return ( | ||
<Router basename={baseUrl}> | ||
<Switch> | ||
<Route path="/questions/:id"> | ||
<AppRoute> | ||
<QuestionRoute {...props} /> | ||
</AppRoute> | ||
</Route> | ||
|
||
<Route path="/answer_matrix"> | ||
<AppRoute> | ||
<AnswerMatrixRoute {...props} /> | ||
</AppRoute> | ||
</Route> | ||
|
||
<Route path="/"> | ||
<AppRoute> | ||
<EventStreamRoute {...props} /> | ||
</AppRoute> | ||
</Route> | ||
|
||
<Route path="*"> | ||
<AppRoute /> | ||
</Route> | ||
</Switch> | ||
</Router> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (C) 2021 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import Backbone from 'backbone' | ||
import Event from '../models/event' | ||
import fromJSONAPI from '../../shared/models/common/from_jsonapi' | ||
import config from '../config' | ||
import PaginatedCollection from '../mixins/paginated_collection' | ||
|
||
export default Backbone.Collection.extend({ | ||
model: Event, | ||
// eslint-disable-next-line object-shorthand | ||
constructor: function() { | ||
PaginatedCollection(this) | ||
return Backbone.Collection.apply(this, arguments) | ||
}, | ||
|
||
url() { | ||
return config.eventsUrl | ||
}, | ||
|
||
parse(payload) { | ||
return fromJSONAPI(payload, 'quiz_submission_events') | ||
} | ||
}) |
Oops, something went wrong.