David Joy eb8c97ee86 fix: Ensure lmsWebUrl is loaded in useExamRedirect (#87)
The sequence.lmsWebUrl variable is loaded as part of the course blocks API.  The status of that API’s request is stored in courseStatus.

The useEffect hook in useExamRedirect didn’t ensure that courseStatus was equal to “loaded”.  This meant that if the sequence loaded first, it might attempt to redirect to sequence.lmsWebUrl even though that variable is still undefined.

When global.location.assign() is given `undefined` as a value, it tacks it onto the end of the URL and calls it a day.  After that, we’ve got a badly formed URL.
2020-06-17 14:07:14 -04:00
2019-12-18 14:33:24 -05:00

|Build Status| |Coveralls| |npm_version| |npm_downloads| |license|

frontend-app-learning
=========================

Please tag **@edx/teaching-and-learning** on any PRs or issues.  Thanks.

Introduction
------------

React app for edX learning.

.. |Build Status| image:: https://api.travis-ci.org/edx/frontend-app-learning.svg?branch=master
   :target: https://travis-ci.org/edx/frontend-app-learning
.. |Coveralls| image:: https://img.shields.io/coveralls/edx/frontend-app-learning.svg?branch=master
   :target: https://coveralls.io/github/edx/frontend-app-learning
.. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-app-learning.svg
   :target: @edx/frontend-app-learning
.. |npm_downloads| image:: https://img.shields.io/npm/dt/@edx/frontend-app-learning.svg
   :target: @edx/frontend-app-learning
.. |license| image:: https://img.shields.io/npm/l/@edx/frontend-app-learning.svg
   :target: @edx/frontend-app-learning
Description
No description provided
Readme AGPL-3.0 34 MiB
Languages
JavaScript 84.9%
TypeScript 13.2%
SCSS 1.7%
Makefile 0.1%