透過您的圖書館登入
IP:3.147.28.12
  • 學位論文

Moodle教學平台程式測驗題型之設計

A Design of the Program Quiz Question in Moodle

指導教授 : 王德譽
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


Moodle 是一套全世界很多學校採用的線上學習平台,內建有例如是非、選擇、填充、計算等非常多種線上測驗題型。然而,對於資訊課程中非常重要的程式測驗題型卻無法提供。 因此,本研究利用 Moodle 開放原始碼、模組化的特性,設計線上程式測驗題型模組,此模組目前可支援 Shell Script, Python, PHP, Ruby, Perl 五種直譯語言,C, C++, Java 三種編譯程式語言,新增其他程式語言也只要在 PHP 程式碼中加入該語言的編譯及輸出方式即可,擴展性非常高。為讓使用者方便編輯程式,本模組以 CodeMirror 設計程式編輯介面,對於不同的程式語言,關鍵字或保留字自動以不同顏色呈現,而且可以使用 TAB 進行內縮編輯,方便老師出題及學生作答。 作答結果對錯則使用綠紅不同的顏色回饋,同時也回饋程式執行訊息,以利使用者除錯。另外,考慮到線上程式測驗題型進行自動評分時,系統必須對使用者輸入的程式碼進行編譯或執行,若不做安全防護,使用者很容易於作答時輸入惡意程式,破壞或癱瘓系統。 因此,本研究設計三項安全防護,一為使用 Linux 架設 Moodle,並在 Linux 系統中建立一個子系統,子系統只提供程式驗證需要的命令及工具,程式驗證時使用 chroot 導向到此子系統中執行,與實際系統完全隔離,且以用戶 apache 有限的權限執行,以保護系統的安全。二為程式執行時利用 Linux 的 timeout 功能限制程式執行的秒數,管線處理及 head 命令限制程式執行結果輸出,以避免無窮迴圈及惡意存入對系統的破壞。三為每次程式驗證都隨機產生獨立的驗證檔,驗證檔位置及檔名由解答及學生答題內容雜湊產生,以確保作答互不影響,且保護作答資料的安全。 本研究設計的 Moodle 線上程式測驗系統,已實際使用於朝陽資工系實際授課班級多學期,順利完成測驗及評分,並經過惡意破壞測試,證實本系統的實用性、可行性以及安全性。

關鍵字

程式測驗 chroot Moodle Linux

並列摘要


Moodle is an online learning platform adopted by many schools worldwide; it is integrated with several online test question types such as right and wrong, multiple choice, fill in the blanks and calculation. However, it is unable to provide the program test question type, which is of extreme importance to information course. Therefore, this research utilizes the open source code and modularization characteristics of Moodle to design the online program test question type module. This module is currently capable of supporting five interpreted languages including Shell Script, Python, PHP, Ruby and Perl and three compiled programing languages including C, C++ and Java. For the addition of other programing languages, you only need to add the compiling and outputting methods for that language in the PHP program code; therefore, it features extremely high degree of expansion. For the convenience of users to edit the program, this module used CodeMirror to design the interface for the program edit, where the keywords or reserved words are shown in different colors automatically for different programing languages. TAB may also be used to proceed with indented edit, making it convenient for teachers to draw up the questions and for the students to answer. Green and red colors are applied as the feedback for the right and wrong answers, while also feedback the program execution message in order for the users to debug. Moreover, considering when the online program test question type proceeds with the automatic evaluation, the system must edit or execute the program code entered by the user, if safety measure is not carried out, the user may easily enter malicious program when answering, thereby destructing or paralyzing the system. Therefore, this research designed three safety preventions. The first is using Linux to setup Moodle, and establish a subsystem in Linux system, where the subsystem only provides required orders and tools for program verification. chroot is applied to guide to this subsystem for execution during program verification, which is completely isolated from the actual system, and is executed based on the limited rights of the user apache in order to protect the safety of the system. The second is utilizing the timeout function of Linux to restrict the seconds for the program execution when executing the program, pipeline process and head command to restrict the output of program execution, so as to avoid destruction on the system by infinite loop and malicious input. The third is that an independent verification file is produced randomly for each program verification, where the location and name of the verification file is produced as a result of the combination of the solution and the student’s answer, to ensure the answers do not affect each other and protect the safety of the answering data. The Moodle online program testing system designed by this research has actually already been applied to Department of Computer Science & Information Engineering lectures at Chaoyang University of Technology for several semesters, successfully completed testing and evaluation, and has passed malicious destruction test, proving the practicality, feasibility and safety of this system.

並列關鍵字

program quiz chroot Moodle Linux

參考文獻


[4] "Indiabix:aptitude questions and answers" http://www.indiabix.com
[17] "Javascript" https://www.javascript.com
[24] "Application Programming Interface" https://www.api.org
[27] G. Carter, LDAP System Administration. ORELLY, 1re ed., 2003.
[1] "Collegiate programming examination committee" http://cpe.cse.nsysu.edu.tw/index.php

延伸閱讀