Code Monkey home page Code Monkey logo

cimto's People

Contributors

hashlash avatar zikrullah79 avatar

Watchers

 avatar

Forkers

zikrullah79

cimto's Issues

Gitpod Specific Settings

  • Set ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS based on the gp url [port] from gitpod.
    We can set this to an environment variable on gitpod setup via .gitpod.yml.

Show import progress

From #19

For kujawab, we can show the progress of all "categories" and then the progress for importing all problemsets of each category. But we might need to think about more general format.

Auth

Use token authentication for api

MathJax support

https://www.mathjax.org/

  • Enable MathJax plugin in ckeditor
  • Ensure MathJax is allowed by bleach (or any future sanitizer we used)

It would be preferable to render the tex as "text" (like on math.stackexchange.com) instead of an image.

Move collectstatic from Procfile

We currently run collectstatic on the web process. This is inappropriate (the web process should only run the web server) and might be the cause of slow cold startup. See the gap between the successful collectstatic log with the previous app log differs around 5s:

2023-06-26T09:46:04.949 proxy[<machine-id>] sin [info] Starting machine
2023-06-26T09:46:05.139 app[<machine-id>] sin [info] INFO Starting init (commit: 0b28cec)...
2023-06-26T09:46:05.153 app[<machine-id>] sin [info] INFO Preparing to run: `/cnb/process/web` as 1000
2023-06-26T09:46:05.157 app[<machine-id>] sin [info] INFO [fly api proxy] listening at /.fly/api
2023-06-26T09:46:05.167 app[<machine-id>] sin [info] 2023/06/26 09:46:05 listening on [<ipv6>]:22 (DNS: [fdaa::3]:53)
2023-06-26T09:46:05.186 proxy[<machine-id>] sin [info] machine started in 237.351792ms
2023-06-26T09:46:10.617 proxy[<machine-id>] sin [info] waiting for machine to be reachable on 0.0.0.0:8080 (waited 5.430489732s so far)
2023-06-26T09:46:10.764 app[<machine-id>] sin [info] 1421 static files copied to '/workspace/static', 3643 post-processed.
2023-06-26T09:46:11.121 app[<machine-id>] sin [info] [2023-06-26 09:46:11 +0000] [231] [INFO] Starting gunicorn 20.1.0
2023-06-26T09:46:11.121 app[<machine-id>] sin [info] [2023-06-26 09:46:11 +0000] [231] [INFO] Listening at: http://0.0.0.0:8080 (231)
2023-06-26T09:46:11.121 app[<machine-id>] sin [info] [2023-06-26 09:46:11 +0000] [231] [INFO] Using worker: sync
2023-06-26T09:46:11.123 app[<machine-id>] sin [info] [2023-06-26 09:46:11 +0000] [249] [INFO] Booting worker with pid: 249
2023-06-26T09:46:11.618 proxy[<machine-id>] sin [info] machine became reachable in 6.43199164s

Solution

A possible solution is running another process type that runs collecstatic. We could also provide other process types for other Django admin commands in general.

References:

Section & subsection

Some problemset has their own sections.

Example:

  • OSP Informatika 2022: B1.1-3 (also has shared problem description)
  • IPhO 2021: Q1

This should differ from the shared problem description, mainly in how the problem is numbered and aggregated score points. Both could have a shared description, but we might need to reassess if that is more suitable as a subproblem.

Initial problem model

Basic problem model.

There are some options for the model name:

  • problem (TLX)
  • task (IOI, IGeO)
  • question

Problemset alternative:

  • problemset (TLX, vjudge)
  • worksheet
  • exam (IBO)
  • competition

It seems the most consistent and suitable for now is problemset & problem. Although the OSN problem description on TLX uses the term subtask (just like IOI), subproblem still sounds valid (we wouldn't need that sub- term for now though).

Shared problem description

Some problems might share some descriptions (ex: OSK 2017 no. 15-17).

This could also be beneficial when editing the problem description. Instead of modifying each problem, which is prone to inconsistency, the user could modify only the shared description.

Define allowed HTML tags

For security, we currently only allow some HTML tags (bleach is allowed-list-based), but the editor still uses the default toolbar layout, which might contain tags that are not being allowed. We need to define the allowed tags and configure both CKEditor and bleach with those tags.

References:

Fix kujawab importer image url

From #19

The image URL on kujawab is in the form of a relative URL, which wouldn't work from outside of kujawab site.

Might as well fix other URLs (if there are any).

[admin] Title for problems created from problemset

Automatically fill in the title of the problem form based on the problemset title and the problem number. The format could be something like ": ". It can be set by adding the title URL query param on the "+" add problem link.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.