Skip to content
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

Campaigns POC #38

Open
wants to merge 14 commits into
base: campaigns
Choose a base branch
from

Conversation

HolecekM
Copy link
Collaborator

Description

  • add campaigns to server
    • each campaign (located in /campaigns) consists of steps, defined in its meta.json
    • a step can either be a page (yet to be implemented, currently has static content) or a challenge
    • a challenge again consists of 1..n tasks (reuses the existing model)
    • using enforce_order, students can be disallowed from solving challenges and tasks out of order
    • using show_locked, they can still at least be shown the challenges that they cannot solve yet
  • challenges can (nullably) now be tied to campaigns and thus, the GET /api/challenges endpoint will NOT include ones that have this association
  • new API endpoints:
    • GET /api/campaigns for a list of campaigns (without challenges, tasks and pages)
    • GET /api/campaigns/:id for one campaign detail including everything (including challenge running status)
  • new UI:
    • #campaign/:id -> CampaignDetail - overview of the campaign
    • #campaign/:cid/:sid-> CampaignStep - either a ChallengeDetail or a rendered page
    • added Campaigns section to SideNavBar
    • after submitting a campaign-related task flag successfully, the campaign detail is reloaded (in order to support a scenario of enforce_order && !show_locked)

This is a proof of concept, some documentation is missing and not everything is implemented - we are NOT merging into main but campaigns, where further development will take place.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • user smoke test
  • run_tests.sh

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • (If modifying dashboard client) I have checked my code for lints with
    eslint and formatted it properly using prettier
  • (If modifying dashboard server) I have checked my code for lints with
    pylint and formatted it properly using autopep8

@HappyStoic
Copy link
Collaborator

LGTM, I think it looks nice!

@HolecekM
Copy link
Collaborator Author

HolecekM commented Dec 17, 2024

waiting for #37 to merge to prevent potential double rebases

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.

2 participants