若使用NetBeans出現如下執行錯誤及對話盒:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - .......
One or more projects were compiled with errors
[ ] Always run without asking
<Run Anyway> <Cancel>
建議對話盒選擇Cancel取消,稍微加減空格更動原始碼,再重新編譯執行看看。
這似乎是NetBeans工具一直以來的bug,起因在預編程式碼的快取管理上有問題。
但是,因為回報時無法規律性的重現問題,很難根除。
網上建議有幾種處置法,可試看看,然後重新編譯執行:
1.加減空格更動原始碼,重新儲存
2.右鍵點選【專案名/Properties/Categories: Build/Compiling: [ ] Compile on save】
關閉此[儲存時立即編譯]選項
3.右鍵點選【專案名/Clean】清除快取
4.退出NetBeans,利用檔案總管刪除如下快取索引目錄,再重新啟動NetBeans
C:\Windows\Users\用戶名/.netbeans/var/cache/index/s*/java/*/classes
或
C:\Users\用戶名\AppData\Local\NetBeans\Cache\版本\index\
Uncompilable source code when using NetBeans IDE
how to retrieve the peer comments from a moodle workshop activity
Moodle 教學平台提供工作坊(Workshop)活動可由同學互評給分。
在工作坊中,每份上傳作業(Submission)可由同學打分數及給評語(PeerComment)。
若想取得一份上傳作業的所有評語,則必須逐一擷取,無法集中一目了然。
以下展示如何利用 Moodle 外掛模組 Ad-hoc database queries 擷取所有評語的作法。
1.下載外掛: 下載合適自己Moodle版本的隨意資料庫查詢外掛
Reports: Ad-hoc database queries
https://moodle.org/plugins/pluginversions.php?plugin=report_customsql
2.安裝外掛: 【管理/網站管理/外掛/安裝外掛:】
外掛套件類型: 網站報告
ZIP包裹: report_customsql_moodle27_2014061800.zip
銘謝: V
點選【從這ZIP壓縮檔安裝外掛】
3.建立查詢: 【管理/網站管理/報表/Ad-hoc database queries:】
點選【Add a new query】
Query Name: 工作坊查詢
Description:
## 由提交id=2097找評分id及評語
SELECT a.id as aid,g.id as gid,g.peercomment
FROM `mdl_workshop_assessments` as a join `mdl_workshop_grades` as g join `mdl_workshop_submissions` as s
WHERE g.assessmentid=a.id and a.submissionid=2097
GROUP BY aid,gid
Query SQL:
SELECT a.id as aid,g.id as gid,g.peercomment
FROM {workshop_assessments} as a join {workshop_grades} as g join {workshop_submissions} as s
WHERE g.assessmentid=a.id and a.submissionid=:submissionid
GROUP BY aid,gid
點選【Verify the SQL text and update the form】作測試
點選【儲存變更】
4.使用查詢: 【管理/網站管理/報表/Ad-hoc database queries:】
點選【工作坊查詢】
輸入查詢參數submissionid: xxx
點選【Run Report】
取得所有評分同學給某份上傳作業(submissionid=xxx)的評語(peercomment)
註1: 工作坊某份上傳作業的提交編號(submissionid)可由如下工作坊操作簡單取得:
由【工作坊的成績報告】,找到某份上傳作業,滑鼠停留其上,可顯示其網址如下:
http://moodle_site/mod/workshop/submission.php?cmid=1344&id=2097
其中,id=2097即為提交編號
註2: 安裝外掛若遇如下錯誤
外掛套件類型位置/moodle_data/wwwRoot/moodle/xxx/yyy 是不可寫入的
表示目錄權限受SELinux管制無法寫入,可利用管理員身份以如下指令開放目錄可寫:
# chcon -t public_content_rw_t /moodle_data/wwwRoot/moodle/xxx/yyy
參考:
1. Moodle資料庫工作坊資料表大綱:
http://examulator.com/er/components/workshop.html
workshop: id,...
workshop_submissions: id,workshopid,...
workshop_assessments: id,submissionid,...
workshop_grades: assessmentid, peercomment,...
2. Moodle也可安裝管理人(Adminer)外掛,方便資料表瀏覽及查詢測試:
https://moodle.org/plugins/pluginversions.php?plugin=local_adminer
【管理/網站管理/主機/Moodle管理人】
--以下為測試例子--
## 由課程簡稱找工作坊id=232
SELECT w.id, w.name
FROM `mdl_workshop` as w join `mdl_course` as c
WHERE w.course=c.id and c.shortname='課名簡稱'
## 由工作坊id找提交id=2097
SELECT s.id, s.title
FROM `mdl_workshop_submissions` as s join `mdl_workshop` as w
WHERE s.workshopid=w.id and w.id=232
## 由提交id=2097找評分id
SELECT a.id
FROM `mdl_workshop_assessments` as a join `mdl_workshop_submissions` as s
WHERE a.submissionid=s.id and s.id=2097
## 由提交id=2097找評分id及評語
SELECT a.id as aid,g.id as gid,g.peercomment
FROM `mdl_workshop_assessments` as a join `mdl_workshop_grades` as g join `mdl_workshop_submissions` as s
WHERE g.assessmentid=a.id and a.submissionid=2097
GROUP BY aid,gid
訂閱:
意見 (Atom)
Linked Lists from C to Java
「 C Pointer Concepts in Java 」一文提到 Java 沒有指標型別 (pointer type) ,但有參照型別 (reference type) 的設計。在遇到須要處理鏈結清單 (linked list)、圖形 (graph) 等資料結構時,Java ...