{"id":49,"date":"2022-03-09T10:56:00","date_gmt":"2022-03-09T02:56:00","guid":{"rendered":"http:\/\/www.cnee.com.cn\/wp\/?p=49"},"modified":"2022-05-09T11:12:25","modified_gmt":"2022-05-09T03:12:25","slug":"moodl%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e7%bb%93%e6%9e%84%e5%bc%80%e5%8f%91%e8%a7%84%e8%8c%83","status":"publish","type":"post","link":"http:\/\/www.cnee.com.cn\/wp\/?p=49","title":{"rendered":"MOODL\u7684\u6570\u636e\u5e93\u7ed3\u6784\u5f00\u53d1\u89c4\u8303"},"content":{"rendered":"\n

\u672c\u6587\u6863\u63cf\u8ff0Moodle\uff08\u9b54\u706f\uff09\u6570\u636e\u5e93\u7ed3\u6784\u5f00\u53d1\u89c4\u8303\u3002<\/p>\n\n\n\n

\u4e3a\u4e86\u5e2e\u52a9\u60a8\u521b\u5efa\u7b26\u5408\u8fd9\u4e9b\u89c4\u8303\u7684\u6570\u636e\u8868\uff0c\u5efa\u8bae\u60a8\u4f7f\u7528\u5185\u7f6e\u7684\u6570\u636e\u5e93\u5b9a\u4e49\uff08XMLDB\uff09\u7f16\u8f91\u5668\u3002<\/p>\n\n\n\n

1 \u6bcf\u4e2a\u8868\u90fd\u5fc5\u987b\u6709\u4e00\u4e2a\u81ea\u52a8\u9012\u589e\u7684id\u5b57\u6bb5\uff08INT10\uff09\u4f5c\u4e3a\u4e3b\u952e\u3002<\/p>\n\n\n\n

2 \u5305\u542b\u6bcf\u4e2a\u6a21\u5757\u3010module\u3011\u5b9e\u4f8b\u3010instances\u3011\u7684\u4e3b\u8868\u5fc5\u987b\u4e0e\u6a21\u5757\uff08\u4f8b\u5982\u5c0f\u90e8\u4ef6\u3010widget\u3011\uff09\u5177\u6709\u76f8\u540c\u7684\u540d\u79f0\uff0c\u5e76\u4e14\u81f3\u5c11\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5\uff1a<\/p>\n\n\n\n

id -\u5982\u4e0a\u6240\u8ff0<\/p>\n\n\n\n

course -\u6a21\u5757\u5b9e\u4f8b\u6240\u5c5e\u8bfe\u7a0b\u7684id<\/p>\n\n\n\n

name -\u6a21\u5757\u5b9e\u4f8b\u7684\u5168\u540d<\/p>\n\n\n\n

3\u4e0e\u5305\u542b\u201cthings\u201d\u4fe1\u606f\u7684\u6a21\u5757\u76f8\u5173\u8054\u7684\u5176\u4ed6\u8868\u5e94\u547d\u540d\u4e3awidget_things\uff08\u6ce8\u610f\u590d\u6570\u5f62\u5f0f\uff09\u3002<\/p>\n\n\n\n

4\u4e00\u822c\u6765\u8bf4\uff0c\u6838\u5fc3\u8868\u7684\u8868\u540d\u5e94\u8be5\u4f7f\u7528\u4e00\u4e2a\u975e\u590d\u6570\u5355\u8bcd\uff0c\u800c\u4e24\u4e2a\u5355\u8bcd\u7684\u8868\u540d\u53ea\u80fd\u662f\u6700\u540e\u4e00\u4e2a\u5355\u8bcd\u91c7\u7528\u590d\u6570\uff0c\u4f8b\u5982course\u3001course_categories\u3002\u53ea\u6709\u4fdd\u7559\u5b57\u3010reserved words\u3011\u4f8b\u5916\uff0c\u4f8b\u5982files\u3002\uff08\u7531\u4e8e\u5386\u53f2\u539f\u56e0\uff0c\u76ee\u524d\u6709\u4e9b\u8868\u540d\u4e0d\u9075\u5b88\u8fd9\u79cd\u89c4\u8303\uff0c\u4f46\u8fd9\u79cd\u60c5\u51b5\u540e\u7eed\u4f1a\u6539\u53d8\uff09<\/p>\n\n\n\n

5 \u8868\u540d\u548c\u5217\u540d\u5e94\u907f\u514d\u5728\u4efb\u4f55\u6570\u636e\u5e93\u4e2d\u4f7f\u7528\u7684\u4fdd\u7559\u5b57\u3010reserved words\u3011\u3002\u8bf7\u5728\u521b\u5efa\u4e4b\u524d\u68c0\u67e5\u5b83\u4eec\u3002\u8868\u540d\u6700\u591a\u53ef\u5305\u542b28\u4e2a\u5b57\u7b26\uff0c\u5217\u540d\u6700\u591a\u53ef\u5305\u542b30\u4e2a\u5b57\u7b26\u3002<\/p>\n\n\n\n

6 \u5217\u540d\u5e94\u8be5\u59cb\u7ec8\u662f\u5c0f\u5199\u3001\u7b80\u5355\u548c\u7b80\u77ed\u7684\uff0c\u9075\u5faa\u4e0e\u53d8\u91cf\u540d\u76f8\u540c\u7684\u89c4\u5219\u3002<\/p>\n\n\n\n

7 \u5728\u53ef\u80fd\u7684\u60c5\u51b5\u4e0b\uff0c\u5305\u542b\u5bf9\u53e6\u4e00\u4e2a\u8868\uff08\u4f8b\u5982\u5c0f\u90e8\u4ef6\u3010widget\u3011\uff09\u7684id\u5b57\u6bb5\u7684\u5f15\u7528\u7684\u5217\u5e94\u8be5\u79f0\u4e3awidgetid\u3002\uff08\u8bf7\u6ce8\u610f\uff0c\u6b64\u7ea6\u5b9a\u662f\u65b0\u7684\uff0c\u5728\u4e00\u4e9b\u65e7\u8868\u4e2d\u6ca1\u6709\u9075\u5faa\uff09<\/p>\n\n\n\n

8\u5e03\u5c14\u5b57\u6bb5\u5e94\u5b9e\u73b0\u4e3a\u5305\u542b0\u62161\u7684\u5c0f\u6574\u6570\u5b57\u6bb5\uff08\u4f8b\u5982INT4\uff09\uff0c\u4ee5\u4fbf\u4ee5\u540e\u5728\u5fc5\u8981\u65f6\u6269\u5c55\u503c\u3002<\/p>\n\n\n\n

9\u5927\u591a\u6570\u8868\u90fd\u5e94\u8be5\u6709\u4e00\u4e2atimemodified\u5b57\u6bb5\uff08INT10\uff09\uff0c\u8be5\u5b57\u6bb5\u7528PHP\u7684time() \u51fd\u6570\u83b7\u5f97\u7684\u5f53\u524d\u65f6\u95f4\u6233\u66f4\u65b0\u5b57\u6bb5\u503c\u3002<\/p>\n\n\n\n

10\u59cb\u7ec8\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u5b9a\u4e49\u4e00\u4e2a\u9ed8\u8ba4\u503c\uff08\u5e76\u4f7f\u5176\u5408\u7406\uff09<\/p>\n\n\n\n

11\u6bcf\u4e2a\u8868\u540d\u90fd\u5e94\u8be5\u4ee5\u6570\u636e\u5e93\u524d\u7f00\uff08$CFG->prefix\uff09\u5f00\u5934\u3002\u5728\u5f88\u591a\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4f1a\u81ea\u52a8\u4e3a\u60a8\u89e3\u51b3\u3002\u6b64\u5916\uff0c\u5728Postgres\u4e0b\uff0c\u6bcf\u4e2a\u7d22\u5f15\u7684\u540d\u79f0\u4e5f\u5fc5\u987b\u4ee5\u524d\u7f00\u5f00\u5934\u3002<\/p>\n\n\n\n

12\u4e3a\u4e86\u4fdd\u8bc1\u8de8\u6570\u636e\u5e93\u7684\u517c\u5bb9\u6027\uff0c\u8bf7\u9075\u5faa\u4ee5\u4e0b\u5173\u4e8eAS\u5173\u952e\u5b57\u4f7f\u7528\u7684\u7b80\u5355\u89c4\u5219\uff08\u5f53\u7136\uff0c\u53ea\u6709\u5728\u9700\u8981\u5728sql\u8bed\u53e5\u4e2d\u4e3a\u8868\u3001\u5b57\u6bb5\u6307\u5b9a\u522b\u540d\u7684\u65f6\u5019\uff09\uff1a<\/p>\n\n\n\n