Aaron Wu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: 'CMS 比賽平台管理與使用 | 建北電資網管傳承' image: https://hackmd.io/_uploads/rJpAHerNn.png disqus: hackmd --- ###### tags: `建北電資網管傳承` :::info 本筆記由建電一三學術長吳亞倫製作 若有相關疑慮,可以寄信到 [aaronwu0218@gmail.com](mailto:aaronwu0218@gmail.com) 或是 Discord `AaW#2549` 詢問 ::: CMS 比賽平台管理與使用 === ## 文件 官方文件:https://cms.readthedocs.io/en/ 一份寫得不錯的文件(我是根據他裝的):https://hackmd.io/@erichung0906/cms ## 架設 我是根據這一篇文章,使用docker架設的: https://hackmd.io/@erichung0906/cms 安裝完成之後,會預設導入一場比賽以及測試用使用者。 cms一樣是使用docker架設。不過,由於是私人寫的docker-compose檔案,所以 `docker-compose.yml` 不規則很多。 在底下,有兩個 docker-compose 文件。`docker-compose.yml`會安裝、啟動cms系統並且啟動一場比賽以及計分板。而`docker-compose.empty.yml`則不會啟動比賽,只會啟動後台以及計分板。 ![](https://hackmd.io/_uploads/rJuQPacv2.png) 其中,最重要的是第41行的地方,其中的指令為`cmsResourceService -a <CONTEST_ID>`。其中,`<CONTEST_ID>`要置換成CMS要啟動的比賽的ID。例如,在截圖當中,可以看到 `<CONTEST_ID>` 為 `3`,而這代表的是2023上機考的ID。`<CONTEST_ID>` 可以透過admin頁面的網址看到。 ![](https://hackmd.io/_uploads/rkfd0lTOh.png) 而如果要用`docker-compose.empty.yml`啟動的話,則要使用以下指令: ``` docker-compose -f docker-compose.empty.yml up -d ``` 之後,再使用以下指令啟動指定比賽: ``` docker exec cms cmsResourceService -a <CONTEST_ID> ``` ## 比賽控制與管理 ### 終端機操作(CLI) CMS 有許多東西必須在終端機以指令方式操作。 #### 啟動 / 切換比賽 ``` vim docker-compose.yml ``` 將第41行的`cmsResourceService -a <CONTEST_ID>` 中 `<CONTEST_ID>` 置換成對的 ID。 ``` docker-compose up -d ``` ##### 單純啟動比賽 ``` docker exec cms cmsResourceService -a <CONTEST_ID> ``` #### 建立使用者 如果要大量建立使用者,可以修改`CreateByAaW` 資料夾當中的 `cms_user.csv`,然後再用`createUserFromCsv.sh`建立。 指令: ``` cd ~/cms/CreateByAaW ./createUserFromCsv.sh ``` #### 將使用者加到比賽中 以下指令可以將`cms_user.csv` 中的所有使用者加到特定比賽當中: ##### 1. 修改 `addUserToContestCsv.sh` ``` cd ~/cms/CreateByAaW vim addUserToContestCsv.sh ``` 將第8行 `-c` 後面的數字改成比賽 ID,然後`:q`退出`vim`,執行指令: ``` ./addUserToContestCsv.sh ``` #### 刪除個人計分板 進到cms裡面 ``` docker exec -it cms bash ``` 如要刪除使用者名稱為`userA`的計分板: ``` cmsRWSHelper delete user userA ``` #### 其他指令 請閱讀官方文件:https://cms.readthedocs.io/ ### 後台操作(GUI) #### problem ![](https://hackmd.io/_uploads/S1qCrdYwn.png) 按 create new task ![](https://hackmd.io/_uploads/r1nmLuYDn.png) 下面是題目簡稱、中文全名 statements 放題目敘述的 pdf(正常比賽的樣子,記得要先做好 LaTeX 模板) ![](https://hackmd.io/_uploads/HkyRvuYD3.png) 聯集給分 ![](https://hackmd.io/_uploads/r1RbddYPn.png) group min for 子題 ``` [[第一組分數, 子題測資數量], [第二組分數, 子題測資數量]] ``` <br> ![](https://hackmd.io/_uploads/Sk1dO_twn.png) 上傳.zip 裡面只有編號規律的檔案(可以透過input file names template那邊更改你的檔案名稱格式) ##### 互動題 基本上有多種不同的,可以參考[這一篇](/cA70QEPVRROxvTxYujMTcw) 基本上互動題要準備兩個檔案:header 和 grader.cpp 並且在這裡上傳: ![](https://hackmd.io/_uploads/ryt_H-pOn.png) 這邊上傳的header使用者都可以include的到,另外,grader.cpp會和使用者上傳的程式一起編譯。 而checker則為一個編譯過的執行黨,用來進行連續給分之類的,可以自行設計。 #### user cms的使用者從後台建立出來之後, ![](https://hackmd.io/_uploads/S1WPkqYw2.png) 修改介面 ![](https://hackmd.io/_uploads/SJ5p1cKw3.png) 這邊可以將使用者加入比賽中(participation) ##### participant 要藏起來讓別人試用:hidden 超級使用者(可以再開賽前測機):unrestricted #### contest #### anouncement ## cms-ranking-archiver 將比賽計分板放到社網的工具。 https://github.com/CKEFGISC/cms-ranking-archiver 指令: ```bash ./rws-archiver.py --noflags https://iscoj.fg.tp.edu.tw/cms/ranking/ ``` ## public resources https://iscoj.fg.tp.edu.tw/cms/rankings/xxx 放在/srv/cms裡面的 - add user faces(他真的叫這個) - /srv/cms/heads - 裡面放 user_id.png/jpg 就會顯示了 - add team icon - /srv/cms/flags - 裡面放 team_code.png/jpg - 記得要先在admin頁面create team - 然後在比賽中為user指定team

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully