Skip to content

Frontend MVP for Source Academy Rook #1834

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 159 commits into from
Jul 28, 2021

Conversation

chownces
Copy link
Contributor

@chownces chownces commented Jun 27, 2021

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 linked an issue Jul 11, 2021 that may be closed by this pull request
@martin-henz martin-henz requested a review from angelsl July 19, 2021 05:40
@chownces chownces marked this pull request as ready for review July 19, 2021 06:00
Copy link
Contributor Author

@chownces chownces left a comment

Choose a reason for hiding this comment

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

initial look through (and comments). will fix these soon

Comment on lines 55 to 58
ability:
assessmentOverview.category === 'Mission' || assessmentOverview.category === 'Path'
assessmentOverview.type === 'Missions' || assessmentOverview.type === 'Paths'
? AchievementAbility.CORE
: AchievementAbility.EFFORT,
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

Comment on lines 71 to 75
view: {
coverImage: `${coverImageUrl}/default.png`,
description: assessmentOverview.shortSummary,
completionText: `Grade: ${assessmentOverview.grade} / ${assessmentOverview.maxGrade}`
completionText: `XP: ${assessmentOverview.xp} / ${assessmentOverview.maxXp}`
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and relook this

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

Comment on lines +213 to +214
<a href={Links.githubOrg}>GitHub repositories of the Source Academy</a>. Feel free to
join us!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

requested by prof

@chownces chownces merged commit d6e1d7e into source-academy:multitenant/dev Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants