MacroViz

多媒體設計、數位學習、英語學習、日語學習

批改學生作業時可按照學號排序

MacroViz原創文章,轉貼請註明出處,並請留下訊息,謝謝。

本文重點:如何修改moodle使之可以支援「批改學生作業時可按照學號排序」功能,適用於moodle1.61版

一般來說,學校教務選課系統多以學生學號為帳號,匯入到moodle時,大部分也是會以相同的帳號跟密碼匯入。然而moodle所提供的繳交作業模組,並不支援帳號排序,造成老師們批改作業時的小小困擾,因此本文就針對如何修改出該功能作一說明。

用Dreamweaver MX 2004 或 8 開啟 \moodle\mod\assignment\lib.php, 大概在1011行~1028行處,發現如下程式碼:

        $tablecolumns = array(‘picture’, ‘fullname’, ‘grade’, ‘comment’, ‘timemodified’, ‘timemarked’, ‘status’);
        $tableheaders = array(", get_string(‘fullname’), get_string(‘grade’), get_string(‘comment’, ‘assignment’), get_string(‘lastmodified’).’ (‘.$course->student.’)', get_string(‘lastmodified’).’ (‘.$course->teacher.’)', get_string(‘status’));

        require_once($CFG->libdir.’/tablelib.php’);
        $table = new flexible_table(‘mod-assignment-submissions’);
                       
        $table->define_columns($tablecolumns);
        $table->define_headers($tableheaders);
        $table->define_baseurl($CFG->wwwroot.’/mod/assignment/submissions.php?id=’.$this->cm->id.’&currentgroup=’.$currentgroup);
               
        $table->sortable(true, ‘lastname’);//sorted by lastname by default
        $table->collapsible(true);
        $table->initialbars(true);
       
        $table->column_suppress(‘picture’);
        $table->column_suppress(‘fullname’);
       
        $table->column_class(‘picture’, ‘picture’);

將 picture 改成 username,就可以讓moodle在批改作業時,按照該班選課同學之學號排序了:

        $tablecolumns = array(‘username‘, ‘fullname’, ‘grade’, ‘comment’, ‘timemodified’, ‘timemarked’, ‘status’, ‘status’);
        $tableheaders = array(get_string(‘username’),get_string(‘fullname’), get_string(‘grade’), get_string(‘comment’, ‘assignment’), get_string(‘lastmodified’).’ (‘.$course->student.’)', get_string(‘lastmodified’).’ (‘.$course->teacher.’)', get_string(‘status’));

        require_once($CFG->libdir.’/tablelib.php’);
        $table = new flexible_table(‘mod-assignment-submissions’);
                       
        $table->define_columns($tablecolumns);
        $table->define_headers($tableheaders);
        $table->define_baseurl($CFG->wwwroot.’/mod/assignment/submissions.php?id=’.$this->cm->id.’&currentgroup=’.$currentgroup);
               
        $table->sortable(true, ‘username‘);//sorted by lastname by default
        $table->collapsible(true);
        $table->initialbars(true);
       
        $table->column_suppress(‘username‘);
        $table->column_suppress(‘fullname’);

        $table->column_class(‘username‘, ‘username‘);

PS.

  1. 因為Dreamweaver MX 2004 之後版本,避開了Unicode BOM的問題,因此可放心在Windows環境下編輯Unicode編碼的PHP,如果是使用Fedora Linux的人,直接用gEdit編輯就可以了。
  2. 要求學生繳交作業時可以以學號.DOC,學號.PPT等方繳交,可以讓後續處理更方便。
posted by 野部 聖広 in Moodle平台,數位學習 and have Comments (2)

moodle裡匯入大量中文帳號時問題解決

moodle雖然已經中文化了,可是當匯入批次帳號時,當人名等出現中文時,並無法成功匯入,此時的解決辦法,就是將帳號的CSV檔案,另存成Unicode。然而,基於某些原因,以Notepad或UltraEditor存檔的Unicode,仍然無法正常匯入Moodle。此時,只要改用Dreamweaver MX 2004 或 8 以後之版本另存新檔便可改善。

posted by 野部 聖広 in Moodle平台,數位學習 and have No Comments

如何安裝Moodle

  1. Step One: 先到此下載Appserv 2.4.5 http://www.appservnetwork.com/
  2. Step Two: 到此下載Moodle 1.5.3 http://download.moodle.org/
  3. Step Three: 安裝 Appserv至C:\Appserv,包含 Apache, PHP, MySQL, phpmyadmin,安裝前要先確認電腦裡面是否有既有的WWW Server,如IIS等要先關掉或要錯開Port,例如將Apache裝到8080 port,或將IIS改到8080 Port。
  4. Step Four: 在IE輸入下列網址,管理MySQL資料庫 http://localhost/phpmyadmin
  5. Step Five: 增加資料庫,名稱:moodle Step Six: 將下載moodle壓縮檔解開,放到 C:\AppServ\www\moodle Step Seven: 在IE輸入下列網址,開始安裝Moodle http://localhost/moodle
  6. Step Eight: 選擇語系為中文,按照步驟安裝,就可以開始使用了。
posted by 野部 聖広 in Moodle平台,數位學習 and have No Comments