Skip to content

Frontend MVP for Source Academy Rook #1878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 161 commits into from
Aug 3, 2021

Conversation

chownces
Copy link
Contributor

Description

Frontend MVP for Source Academy Rook

Status:

  • To get feedback on UI
  • Need to set up auth providers (Google, Github)
  • Frontend mockups not updated yet
  • 'Paths' logic is yet to be refactored
  • Assessment 'Grade' has not been fully removed
  • To relook at course 'viewability' for admins (it is currently disabled for all when viewable == false)
  • Check that achievements are working properly

Note: To temporarily disable the create course button for deployment

Changelog (Knight --> Rook):

  • Added multitenant functionality

    • UI for running multiple courses concurrently on our new backend
    • Users can now create new courses, or enroll in multiple courses
  • Updated frontend routing

    • There are now 3 main possible deployment configurations:
      1. Source Academy @ NUS: uses the backend
        • Playground and Sourcecast are now hidden behind the login and are no longer publicly accessible
        • The new SICPJS feature is also hidden behind the login
      2. Playground-only: does not use the backend
        • No notable changes in routing
        • The new SICPJS feature is publicly accessible
      3. Source Academy with GitHub Classroom: an extension of 1 and 2
        • Enables the GitHub Classroom functionality in either deployment
        • Publicly accessible in either deployment
  • Updates to setting of course configuration

    • Previously, the game and achievements were disabled via environment variables in the frontend
    • Now, they are persisted in the backend by course. Different courses can enable/ disable different features at the same time
  • New admin panel for course admins

    • Course settings such as course name, user management and toggling of features can now be done in this new admin panel
    • Hardcoded to allow upserts of up to 1000 users at a time
  • Changes to testcase types

    • Not much change to the behaviour of these types on the frontend, the changes were mostly due to backend refactoring
    • Previously: Public, Hidden and Private
    • Now: Public, Opaque and Secret
  • 'Grade' metric has been deprecated. Assessments will now solely use XP for grading.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How to test

To be tested with the new backend (source-academy/backend#775)

Checklist

  • I have tested this code
  • I have updated the documentation

chownces added 30 commits June 12, 2021 14:11
@chownces chownces requested a review from angelsl July 28, 2021 10:09
@chownces
Copy link
Contributor Author

Accidentally merged in the previous PR ==. Reissuing it here

assessmentOverview.category === 'Mission' || assessmentOverview.category === 'Path'
assessmentOverview.type === 'Missions' || assessmentOverview.type === 'Paths'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need the achievements team to remove this hardcode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may need a new assessment flag: "Show in achievements?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be removing this categorisation as discussed. Probably in #1886

Comment on lines +92 to +95
if (data.length + users.length > 1000) {
setInvalidCsvMsg('Please limit each upload to 1000 entries!');
hasInvalidInput = true;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still hardcoded to 1000 per upload for now. will be relooked when the super user rights are implemented

Copy link
Contributor

@angelsl angelsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good mostly, just a few minor issues

assessmentOverview.category === 'Mission' || assessmentOverview.category === 'Path'
assessmentOverview.type === 'Missions' || assessmentOverview.type === 'Paths'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may need a new assessment flag: "Show in achievements?"

? numGraded === 0
? 'none'
: numGraded === numQuestions
? 'graded'
: 'grading'
: 'excluded';

const courseId: () => string = () => {
const id = store.getState().session.courseId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me very very sad...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok but in all seriousness, we can merge for now but when we get the course ID in the route, it would be good to pass it in as a parameter rather than accessing a global singleton like that

@angelsl
Copy link
Contributor

angelsl commented Aug 1, 2021

I left quite a few comments but I think the main issues are

  • avoid accessing the Redux store via the store global as far as possible (this should be resolved once the course ID is in the URL, future PR)
  • avoid hardcoding NUS and NUS-specific terms in new text (this one we can do in a future PR, it's fine)
  • avoid using connected components for new components, use hooks e.g. useSelector instead
  • also, any typos

Copy link
Contributor

@angelsl angelsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SA@NUS: Help not customizable User profile cannot be closed on mobile
3 participants