CodeJudger操作手冊
  • Code Judger 平台介紹
  • 1 Code Judger 特色
    • 1.1 TQC+認證題庫
    • 1.2 答題方式與技巧
  • 2 【教師】主控台
    • 2.1 題目管理
      • 2.1.1 建立新題目
      • 2.1.2 編輯題目
      • 2.1.3 題目加入流程圖
    • 2.2 題組管理
      • 2.2.1 建立新題組
      • 2.1.2 編輯題組
    • 2.3 考卷管理
    • 2.4 課程管理
  • 3 【教師】我的課程
    • 3.1 課程資訊
    • 3.2 同步編輯器
    • 3.3 練習題組
      • 3.3.1 新增/編輯 練習題組
      • 3.3.2 練習統計
    • 3.4 考試總管
      • 3.4.1 新增考試
      • 3.4.2 開始考試
      • 3.4.3 考試成績單
    • 3.4 統計資訊
  • 4 【學生】我的課程
    • 4.1 課程資訊
    • 4.2 練習題目
      • 4.2.1 作答方式
    • 4.3 考  試
      • 4.3.1 考試成績
  • 5 購買方案
  • 6 全校授權客制服務
    • 6.1 Code Judger與校務系統整合服務API
  • 7 版本更新記錄
    • 20220310
    • 20210922
    • 20210816
    • 20210510
    • 20210324
    • 20210112
    • 20201210
    • 20200427
    • 20191030
    • 20190320
    • 20181031
    • 20180426
    • 20180402
    • 20180313
  • 8 常見問答集
    • 建議使用的瀏覽器
    • 程式語言環境
    • 線上程式編輯器
  • Python 教學
    • 0 Python 初探
      • 0.1 Python 學習資源
      • 0.2 Python IDE 介紹
      • 0.3 Spyder 小試身手
      • 0.4 Python 語法初探
    • 1 變數與輸出入
    • 2 運算式、判斷式
    • 3 迴圈
    • 4 進階控制流程
    • 5 函式
    • 6 串列操作
    • 7 數組、字典、集合
    • 8 字串處理
    • 9 檔案處理
Powered by GitBook
On this page
  • Code Judger與校務系統整合服務API
  • Group 1. 帳號登入 API
  • 傳入帳號資訊至Code Judger [POST]
  • Group 2. 新增課程及修課學生名單 API
  • 傳入課程及修課學生名單至Code Judger [POST]
  • Group 3. 取得課程學生成績 API
  • 提供帳號資訊至Code Judger,獲得學生成績 [POST]

Was this helpful?

  1. 6 全校授權客制服務

6.1 Code Judger與校務系統整合服務API

Previous6 全校授權客制服務Next7 版本更新記錄

Last updated 4 years ago

Was this helpful?

FORMAT: 1.0

Code Judger與校務系統整合服務API

(Code Judger and school system integration web service API, CJ_school_API)

  • 此CJ_school_API為Code Judger全校授權學校之加購客制化服務,讓校務系統與Code Judger進行溝通

  • 方便學校將資訊、校務等系統的資訊與Code Judger雙向連動

  • 共計有3支API,其功能分別為:

    1. 由校務系統新增老師及學生帳號資訊至Code Judger

    2. 由校務系統新增課程及修課學生名單至Code Judger

    3. 取得Code Judger的課程小考成績

  • 以下API開頭網址皆使用[

Group 1. 帳號登入 API

新增老師及學生帳號資訊[]

傳入帳號資訊至Code Judger [POST]

  • POST的參數

    • user_account: 老師的帳號或是學生的學號 (required, String)

    • user_type: 使用者身份 TEACHER/STUDENT (required, String)

    • user_name: 使用者姓名 (required, String)

    • access_token: 認證碼 (required, String)

    • time_stamp: 時間戳 (required, String)

    • institution: 單位代號 (required, String)

備註:

  1. 身份為老師時,請將user_type改成TEACHER;身份為學生時,請將user_type改成STUDENT

  2. user_account與access_token在與學校溝通後建置

  • 回傳參數

    • status: 狀態,沒問題的話為OK (required, String)

    • url: 回傳OK後導到此url就進入系統 (required, String)

範例

代號為peter的王小明老師要登入

  • user_account : peter@tqc.mail.edu.tw

  • user_type: TEACHER

  • user_name: 王小明

  • access_token:sha1(xxxxxxxx_1234567890)

  • time_stamp: 1234567890

  • institution: 13

POST

  • URL:

  • BODY:

    user_account=peter@tqc.mail.edu.tw&user_type=TEACHER&user_name=王小明&access_token=sha1(xxxxxxxx_1234567890)&time_stamp=1234567890&institution=13

回傳結果

{
    "status": "OK",
    "url": "https://123.codejudger.com/ewfdskwe;drfjwe;ijfjwewfjlwefjlkwejfljwelfjweljflwjefowejfoiwejfwolefefwojweo"
}

Group 2. 新增課程及修課學生名單 API

傳入課程及修課學生名單至Code Judger [POST]

  • POST的參數

    • user_account: 老師的帳號或是學生的學號 (required, String)

    • user_name: 使用者姓名 (required, String)

    • access_token: 認證碼 (required, String)

    • time_stamp: 時間戳 (required, String)

    • institution: 單位代號 (required, String)

    • course_number: 學校指定的課程代碼,必須一個課程只有唯一一個代碼 (required, String)

    • course_name: 課程名稱 (required, String)

    • student_accounts: 學生學號,必須為陣列 (required, Array)

    • student_names: 學生名字,必須為陣列 (required, Array)

  • 回傳參數

    • status: 狀態,沒問題的話為OK (required, String)

範例

代號為peter的王小明老師要加入課號為1091_B10942A的資管大一程式語言(Python)課程,下面要新增學號為B97901022的張曉明同學和學號為B97901023的王陽明同學

  • user_account : peter@tqc.mail.edu.tw

  • user_name: 王小明

  • access_token:sha1(xxxxxxxx_1234567890)

  • time_stamp: 1234567890

  • institution: 13

  • course_number:1091_B10942A

  • course_name:資管大一程式語言(Python)

  • student_accounts[0] = B97901022@tqc.mail.edu.tw

  • student_accounts[1] = B97901023@tqc.mail.edu.tw

  • student_names[0] = 張曉明

  • student_names[1] = 王陽明

POST

  • URL:

  • BODY:

    user_account=peter@tqc.mail.edu.tw&user_name=王小明&access_token=sha1(xxxxxxxx_1234567890)&time_stamp=1234567890&institution=13&course_number=1091_B10942A&course_name=資管大一程式語言(Python)&student_accounts[0]=B97901022@tqc.mail.edu.tw&student_accounts[1]=B97901023@tqc.mail.edu.tw&student_names[0]=張曉明&student_names[1]=王陽明

回傳結果

{
    "status": "OK"
}

備註:

  1. 如果此帳號不存在,開新的帳號為老師帳號,帳號相同不會重複開

  2. 如果此課程不存在,開新的課程加入老師帳號底下,課程代碼相同不會重複開

  3. 如王老師要同時新增完 資管大一程式語言(Python),又想新增 資管大一程式語言(C++),代碼為1091_B10942A,將上面的course_number和course_name分別改成1091_B10943A和資管大一程式語言(C++)即可

  4. 可再依學校需求增加「開課日期區間」或是加入「學年」、「學期」

Group 3. 取得課程學生成績 API

提供帳號資訊至Code Judger,獲得學生成績 [POST]

  • POST的參數

    • user_account: 老師的帳號或是學生的學號 (required, String)

    • access_token: 認證碼 (required, String)

    • time_stamp: 時間戳 (required, String)

    • institution: 單位代號 (required, String)

    • course_number: 學校指定的課程代碼,必須一個課程只有唯一一個代碼 (required, String)

  • 回傳參數

    • status: 狀態,沒問題的話為OK (required, String)

    • chapter: 章節陣列

      • exam: 測驗陣列

        • exam_title: 測驗題目

        • scores: 陣列

          • account: 學生帳號

          • points: 成績

範例

代號為peter的王小明老師要取得課程代碼為1091_B10942A的小考資料

  • user_account : peter@tqc.mail.edu.tw

  • access_token:sha1(xxxxxxxx_1234567890)

  • time_stamp: 1234567890

  • institution: 13

  • course_number:1091_B10942A

POST

  • URL:

  • BODY:

    user_account=peter@tqc.mail.edu.tw&access_token=sha1(xxxxxxxx_1234567890)&time_stamp=1234567890&institution=13&course_number=1091_B10942A

回傳結果

{
  "status" : "OK",
  "chapter" : [
    {
    "exam" : [
        {
        "exam_title" : "第1次小考",
        "scores" : [
            {
              "account" : "B97901022@tqc.mail.edu.tw",
              "points" : "80"
            },
            {
              "account" : "B97901023@tqc.mail.edu.tw",
              "points" : "60"
            }
          ]
        },
        {
        "exam_title" : "第2次小考",
        "scores" : [
            {
              "account" : "B97901022@tqc.mail.edu.tw",
              "points" : "100"
            },
            {
              "account" : "B97901023@tqc.mail.edu.tw",
              "points" : "70"
            }
          ]
        }
      ]
    }
  ]
}

新增課程及修課學生名單[]

提供帳號資訊[]

https://123.codejudger.com/],實際網址依全校授權學校需求建置
https://123.codejudger.com/api/v1/auth/login?user_account={user_account}&user_type={user_type}&user_name={user_name}&access_token={access_token}&time_stamp={time_stamp}&institution={institution}
https://123.codejudger.com/api/v1/auth/login
https://123.codejudger.com/api/v2/course/import?user_account={user_account}user_name={user_name}&access_token={access_token}&time_stamp={time_stamp}&institution={institution}&course_number={course_number}&course_name={course_name}&student_accounts={student_accounts}&student_names={student_names}
https://123.codejudger.com/api/v2/course/import
https://chu.codejudger.com/api/v2/course/export_exams?user_account={user_account}&user_type={user_type}&user_name={user_name}&access_token={access_token}&time_stamp={time_stamp}&institution={institution}
https://123.codejudger.com/api/v2/course/import