1
0
Fork 0
Commit Graph

393 Commits (Bug546-Lixiaofeng)

Author SHA1 Message Date
Hui Lan 29ffada7eb Login.py: improve comments. 2022-11-03 22:28:25 +08:00
Hui Lan d3a796428d account_service.py: module re is no longer necessary. 2022-11-03 22:21:34 +08:00
Lan Hui 702205940c Login.py: must convert warn to string before comparing to OK 2022-11-03 22:06:24 +08:00
Lan Hui f0b5adc5e4 Login.py: fix function name 2022-11-03 22:02:32 +08:00
Hui Lan 3cfec31c3f Login.py: add missing colon 2022-11-03 22:00:47 +08:00
Hui Lan 286e884dd8 Refactor Wu Yuhan's code 2022-11-03 21:59:12 +08:00
吴宇涵 59d95d8e9f account_service.py: 导入re库使用正则匹配过滤了注册时用户名的非法字符 2022-10-21 11:07:20 +08:00
吴宇涵 5844eab6d5 account_service.py: 添加注册时用户名的非法字符过滤 2022-10-21 10:44:39 +08:00
Lan Hui ecc354bc0d Refactor: use better function 2022-08-02 12:33:41 +08:00
Lan Hui 1d8671c5c7 Refactor: use better function name 2022-08-02 12:30:27 +08:00
Lan Hui 8cb34e56ba Refactor: remove duplicate code block 2022-08-02 12:26:18 +08:00
Lan Hui b5dacb9ad2 Improve comments 2022-08-02 11:52:40 +08:00
Lan Hui 47e745e774 Use better variable name (use articleContent instead of txt, and use camelCase) 2022-08-02 11:45:21 +08:00
Lan Hui 1dfe370983 Use better variable names 2022-08-02 11:39:35 +08:00
Lan Hui c15746bbb2 Resolve conflicts 2022-08-02 11:00:33 +08:00
mrlan b745da4c90 Merge pull request 'IMPROVE-WangWeiLong' (#35) from IMPROVE-WangWeiLong into master
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/35
2022-07-31 09:11:53 +08:00
Lan Hui 0098fa8746 Prevent attribute injection 2022-07-29 15:26:19 +08:00
Lan Hui 828cef406c Escape user input first 2022-07-29 15:22:42 +08:00
徐幸 2c1bc98833 Bug422-XuXing (#46)
增加了返回上一篇的按钮及相关功能的实现,当点击下一篇文章跳转至下一篇时,页面中会增加一个返回上一篇按钮,点击返回上一篇按钮后可以回到上一篇。

Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/46
Co-authored-by: 徐幸 <2567198082@qq.com>
Co-committed-by: 徐幸 <2567198082@qq.com>
2022-07-21 23:13:33 +08:00
Lan Hui e9eb604a22 Improve spacing and indentation. 2022-07-20 17:10:03 +08:00
Lan Hui 9beb1ad1d2 Make up the enclosing >. 2022-07-20 17:09:04 +08:00
Lan Hui 8998d6e4af Improve spacing. 2022-07-20 17:08:07 +08:00
Lan Hui 8747f35fd8 Make up the enclosing >. 2022-07-20 17:07:09 +08:00
Lan Hui fdb432031f Better indentation. 2022-07-20 17:06:11 +08:00
Lan Hui 1401870591 Use Chinese UI language. 2022-07-20 17:04:34 +08:00
Lan Hui 1ca90bb2a9 Remove superfluous 'jjj'. 2022-07-20 17:00:13 +08:00
Lan Hui ea19658212 Merge branch 'Improvement-Stewart' 2022-07-20 16:57:31 +08:00
Lan Hui 50a1093781 Remove loop.index0, as it is hard to understand. 2022-07-18 19:51:23 +08:00
陈靖毅 c21659ba7e Bug477 重构 and 增加功能 (#48)
Co-authored-by: cjybyjk <cjybyjk@zjnu.edu.cn>
Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/48
Co-authored-by: 陈靖毅 <cjybyjk@zjnu.edu.cn>
Co-committed-by: 陈靖毅 <cjybyjk@zjnu.edu.cn>
2022-07-18 16:00:08 +08:00
邱忠辉 9d420acd8b [REFACTOR] user_service.py: Added id to user name, word and frequency for click to execute AJAX request in JS (#30)
1. Add jquery.js and word_operation.js to the static folder.

2. Changed the return type of the familiar, unfamiliar and deleteword methods of user_service.py.
    ```
    original: return redirect(url_for('userpage', username=username))
    now: return "success"
    ```
3. In order to get elements in JS to make ajax requests we add ids in userpage_get.html for familiar, unfamiliar, delete buttons and so on.

4. When the user's word book was retrieved, the list returned was already sorted in descending order of frequency, so redundant code was removed in userpage_get.html.

Co-authored-by: PeterQiu <www.1392993990@qq.com>
Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/30
Co-authored-by: 邱忠辉 <1392993990@qq.com>
Co-committed-by: 邱忠辉 <1392993990@qq.com>
2022-07-18 13:29:04 +08:00
stewy 6823c10043 improved 2022-06-14 13:25:42 +08:00
stewy ee44372848 improved 2022-06-14 12:37:28 +08:00
蒋乐天 041cbd97fc 更新 'app/static/js/highlight.js' 2022-06-13 21:32:49 +08:00
lin b53e7031e5 Bug412-JiangLetian 2022-06-13 11:40:20 +08:00
李凯 4817557099 更新 'app/Article.py' 2022-06-11 23:20:41 +08:00
李凯 e40ebac452 更新 'app/static/css/bootstrap.css' 2022-06-11 23:08:29 +08:00
miaochenshuo 260f62967b 修复 Bug394 2022-06-05 23:36:55 +08:00
Hui Lan 5976f758a0 Remove pyc files. 2022-02-05 23:01:01 +08:00
Hui Lan 18684ada6b build.sh: deploy the new code 2022-02-05 22:59:45 +08:00
Lan Hui f675870401 templates/mainpage_get.html: Use more appropriate word. 将'登出'按钮改为'退出' -- 陈天乐 2022-01-27 20:15:26 +08:00
Lan Hui 8dab62df7e templates/mainpage_get.html: fix typo -- 陈天乐 2022-01-27 20:12:10 +08:00
mrlan c43e4c3f7c Merge pull request 'Use named style for sqlite3 execute()' (#22) from Hui-SaferSQL into master
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/22
2022-01-27 17:09:29 +08:00
Lan Hui 18dfad910b Use named style for sqlite3 execute() 2022-01-27 17:01:03 +08:00
Lan Hui 788bca8873 templates/signup.html: user name must not be empty. Bug reported and fixed by 丁宇超. For more details, see http://118.25.96.118/bugzilla/show_bug.cgi?id=347 and http://118.25.96.118/kanboard/?controller=BoardViewController&action=show&project_id=183 2022-01-27 13:02:27 +08:00
Lan Hui 42356c222d templates/mainpage_get.html: remove superfluous () 2022-01-27 12:48:25 +08:00
Lan Hui edb801b95e Show the expiry notice if the account has expired. 2022-01-27 12:45:09 +08:00
Lan Hui 718b98ef02 Login.py: use password instead of psd because psd may cause confusion. 2022-01-27 12:28:41 +08:00
Lan Hui 0c923f7db2 Login.py: simplify md5. 2022-01-27 12:24:20 +08:00
Lan Hui d4c1b1fdcc Login.py: update expiry date. 2022-01-27 11:57:40 +08:00
Lan Hui a94a333366 Remove redundant css files. 2022-01-27 11:49:41 +08:00
Lan Hui ba2ff7dee2 Remove music player js because that is not the focus of EnglishPal. If people want to listen music, they have better options than EnglishPal. 2022-01-27 11:40:58 +08:00
Lan Hui b0d80096d6 templates/userpage_get.html: change the position and order of the checkboxes. 2022-01-27 11:27:26 +08:00
Lan Hui 4d2dd2b68e Repalce old app folder with SoftArch王炫/english-pal-master/app/ 2022-01-26 21:10:09 +08:00
Hui Lan 246ddcc62a Remove HOME_PAGE as we use URL now. 2021-12-03 09:18:34 +08:00
Hui Lan f8a5cc2a40 test: use localhost to test 2021-12-03 09:16:18 +08:00
Hui Lan 3c118a53e2 add conftest.py 2021-12-03 09:08:45 +08:00
Lan Hui ffc33852ae main.py: make sure the key articleID exists. 2021-09-05 20:51:28 +08:00
Lan Hui 91ca6fe33b Merge branch 'BugFix300' of http://121.4.94.30:3000/mrlan/EnglishPal into BugFix300 2021-09-05 20:44:55 +08:00
Hui Lan 02a5d4bd47 main.py: fix bug300: http://118.25.96.118/bugzilla/show_bug.cgi?id=300 2021-09-05 20:42:18 +08:00
Hui Lan 2a509f83cc Merge branch 'master' of http://121.4.94.30:3000/mrlan/EnglishPal into BugFix293 2021-08-31 21:27:37 +08:00
Hui Lan f8acf03acc main.py: let the user have a small chance to get a much more difficult article than his vocabulary level. 2021-08-31 21:25:17 +08:00
mrlan 6754930707 Merge pull request 'BugFix293' (#14) from BugFix293 into master
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/14
2021-08-30 08:31:56 +08:00
Hui Lan baf333678a main.py and build.sh: shuffle the articles first before select one, relax selection range, keep the database
main.py:

- shuffle the articles first before select one

- relax selection range (see the function call within_range)

build.sh:

- keep the database wordfreqapp.db so that the user could login again next time after the program is rebuilt.

Hui
2021-08-30 08:18:47 +08:00
Hui Lan 868104da6c main.py: let the range be more flexible. 2021-08-30 07:43:41 +08:00
Lan Hui 5e322f067b requirements.txt includes dependencies of the program. difficulty.py is modified in this fix. Not sure why build.sh is included. 2021-08-20 19:27:44 +08:00
Hui Lan c6b620b272 app/main.py: flash a message after deleting a word (use bootstrap alerts -- it seems that dismissable alert does not work, so forget about it.). 2021-08-02 19:27:22 +08:00
Hui Lan aace6c033e app/main.py: flash a message after deleting a word (use bootstrap alerts -- make the alert dismissable 2). 2021-08-02 19:24:00 +08:00
Hui Lan c3dcc62879 app/main.py: flash a message after deleting a word (use bootstrap alerts -- make the alert dismissable). 2021-08-02 19:21:41 +08:00
Hui Lan 3d5130d68d app/main.py: flash a message after deleting a word (use bootstrap alerts -- add additional content, e.g., a bolder congratulations). 2021-08-02 19:17:54 +08:00
Hui Lan 08bb7e0c40 app/main.py: flash a message after deleting a word (use bootstrap alerts). 2021-08-02 19:11:53 +08:00
Hui Lan 4773a6d131 app/main.py: flash a message after deleting a word from the new word list (put f in the right place). 2021-08-02 17:26:35 +08:00
Hui Lan 8abbf458a2 app/main.py: flash a message after deleting a word from the new word list (fix error - import get_flashed_messages). 2021-08-02 17:10:05 +08:00
Hui Lan f5086732f3 app/main.py: flash a message after deleting a word from the new word list (fix error). 2021-08-02 17:07:01 +08:00
Hui Lan 451feb7bba app/main.py: flash a message after deleting a word from the new word list. 2021-08-02 16:52:02 +08:00
Hui Lan b6209bdde6 app/main.py: the secnd line and after (if any) should also show. 2021-08-01 22:10:23 +08:00
Hui Lan d08d8a8594 app/main.py: use a container for the front page. 2021-08-01 22:03:27 +08:00
Hui Lan 6e56c1b418 app/main.py: use smaller, ligter font for source. 2021-08-01 21:25:13 +08:00
Hui Lan c71b156203 app/main.py: larger font for article title. 2021-08-01 21:22:45 +08:00
Hui Lan 7043518721 app/main.py: use lighter color for article date. 2021-08-01 21:12:15 +08:00
Hui Lan 0efd2b420b app/main.py: light grey background for the article. 2021-08-01 21:09:38 +08:00
Hui Lan 81e1e795be app/main.py: use container, and use a button for logout. 2021-08-01 20:25:58 +08:00
Hui Lan 58383a51ad app/main.py: use buttons for all words (strange?). 2021-07-31 21:51:48 +08:00
Hui Lan c40f9b61a3 app/main.py: use buttons instead of links for familiar, unfamiliar and delete (for all words). 2021-07-31 21:43:42 +08:00
Hui Lan e65b443f01 app/main.py: use buttons instead of links for familiar, unfamiliar and delete. 2021-07-31 21:41:55 +08:00
Hui Lan 61a848e7d4 app/main.py: use alert for total number of articles. 2021-07-31 21:30:19 +08:00
Hui Lan bef218953b app/main.py: adjust badge color. 2021-07-31 21:22:09 +08:00
Hui Lan 20386033bc app/main.py: green button may look better, more consistent. 2021-07-31 21:18:35 +08:00
Hui Lan aad7f8016e app/main.py: change link to button. 2021-07-31 21:16:38 +08:00
Hui Lan 22af30bc88 app/main.py: move alert bar above 阅读文章并回答问题 (revision). 2021-07-31 21:12:04 +08:00
Hui Lan fbf054d174 app/main.py: move alert bar above 阅读文章并回答问题. 2021-07-31 21:10:27 +08:00
Hui Lan e9c7d0fc00 app/main.py: use a green alert bar. 2021-07-31 21:03:57 +08:00
Hui Lan 1936d2aec5 app/main.py: use alert while showing vocabulary level. 2021-07-31 21:02:17 +08:00
Hui Lan adfc2796da app/main.py: use a different color for badge. 2021-07-31 20:59:08 +08:00
Hui Lan 29f0d02327 app/main.py: bootstrap elements. 2021-07-31 20:54:19 +08:00
Hui Lan c581601bf3 Merge branch 'SPM-Spring2021-2597-占健豪201831990539' of https://github.com/lanlab-org/EnglishPal into BugFix254-Author-ZhanJianhao 2021-07-30 12:18:39 +08:00
Zjh-jc 6d8b30e631 fix the bug (After logging in, jump directly to the vocabulary, not to the article.) 2021-07-22 00:11:06 +08:00
Hui Lan c3dfcba4d0 app/static/wordfreqapp.sql: one article on taking photos.
Now we have 50 articles to choose from.
2021-07-17 10:47:12 +08:00
Hui Lan c04bd016d0 app/static/wordfreqapp.sql: one more article 2021-07-17 09:39:51 +08:00
Hui Lan 57451717ee app/README.md: delete. 2021-07-16 20:10:06 +08:00
Hui Lan 09bd6b9ddf build.sh: remove redundant build.sh in app/. 2021-07-16 19:20:31 +08:00
Hui Lan 317c12e827 wordfreqapp.sql: more articles. 2021-07-16 18:30:32 +08:00
Hui Lan 2584de860d main.py: article count. 2021-07-16 18:13:07 +08:00
Hui Lan fa8fd4e414 (1) test_page_position.py: reduce the number of click_by_random. (2) Jenkinsfile: trigger build after each push. 2021-07-14 21:29:32 +08:00
Hui Lan b13df92bf7 (1) test_page_position.py: reduce the number of click_by_random. (2) Jenkinsfile: trigger build after each push. 2021-07-14 21:22:56 +08:00
Hui Lan cfb8dc6c78 test_page_position.py: let it pass for now (temporary fix). 2021-07-14 18:55:16 +08:00
Hui Lan bbb0c5396e test_page_position.py: change click order. 2021-07-14 18:50:34 +08:00
Hui Lan 5c7096a96b test_add_word.py: do not print many things out. 2021-07-14 18:47:55 +08:00
Hui Lan 1786651aa5 test_add_word.py: use a longer word 2021-07-14 18:06:12 +08:00
Hui Lan 5ce9b6167c test_*.py: use FIREFOX instead of CHROME 2021-07-14 17:50:38 +08:00
Hui Lan e9358a627f Learn english smartly. 2021-07-13 12:56:05 +08:00
Hui Lan 7f69d9a14d test scripts: change port from 5000 to 91. 2021-07-13 12:46:31 +08:00
Hui Lan 905e85f201 Merge branch 'SPM-Spring2021-2597-占健豪201831990539' of https://github.com/lanlab-org/EnglishPal 2021-07-13 11:46:37 +08:00
Hui Lan d431c0cb4b update .gitignore to ignore the folder .idea 2021-07-13 11:19:35 +08:00
mmmmmkj ad52e5a90b
change the password 2021-06-23 00:36:34 +08:00
mmmmmkj 515128caab
upload the test code of the function called delete 2021-06-23 00:33:19 +08:00
张小飞 b53b5ed4c3 修改main.py,使得主页显示English Pal -(SPM-Spring2021-2599-张小飞201831990641) 2021-06-22 12:35:01 +08:00
张小飞 10fd9afa6f 修改访问端口,避免和其他组冲突,同时修改main.py,主页显示 English Pal(SPM-Spring2021-2599-张小飞201831990641) 2021-06-22 12:24:34 +08:00
Zjh-jc 2ee854285c Test the page position after clicking the Familiar or Unfamiliar button. 2021-06-17 09:51:53 +08:00
Zjh-jc f7629f4d1c Test the page position after clicking the Familiar or Unfamiliar button. 2021-06-17 09:41:33 +08:00
Zjh-jc 006a144ec0 Test the page position after clicking the Familiar or Unfamiliar button. 2021-06-17 09:21:13 +08:00
Zjh-jc b17ef9c331 Solve the problem of page position jump after clicking the familiar or unfamiliar button 2021-06-16 02:17:30 +08:00
张小飞 46dc9328cf 在test_add测试文件里添加输出语句,寻找测试不通过的原因 2021-06-13 11:10:56 +08:00
张小飞 d6e64e3465 删除test_login.py中添加的代码,添加test_login_security_fix.py用来检验bug是否修复 2021-06-11 15:16:28 +08:00
张小飞 d21dfc8da3 Merge branch 'master' of https://github.com/lanlab-org/EnglishPal into SPM-Spring2021-2599-张小飞201831990641 2021-06-09 22:58:30 +08:00
张小飞 fdb3259e3c 修改测试代码里的端口和master统一为91 2021-06-09 21:44:47 +08:00
张小飞 a9b2bc6fee 和新的master分支合并 2021-06-09 21:39:13 +08:00
张小飞 be0c9f1c8b 修改test_next_eassy.py,修复语法错误 2021-06-09 20:57:09 +08:00
张小飞 ebfd780497 添加wordfreqapp.sql文件,用于生成数据库 2021-06-09 20:39:48 +08:00
Lan Hui 90ab0be3d6 app/test/test_next_essay.py: click Next 5 times. 2021-06-09 09:17:19 +08:00
Lan Hui 783a0b22e1 app/test/test_next_essay.py: correct the variable name 'differ'. 2021-06-09 08:05:30 +08:00
Lan Hui f4a6921297 app/test/test_add_word_and_essay_does_not_change.py: remove unnecessary test. 2021-06-08 21:48:38 +08:00
Lan Hui 68e8102e12 Add app/static/wordfreqapp.sql for reconstructing the database. 2021-06-08 21:29:39 +08:00
张小飞 f44a4ce90f 修改app\test\test_login.py添加若干代码,测试bug是否修复 2021-06-04 14:58:29 +08:00
张小飞 3aaaa90c6a 修改app\test\test_login.py添加若干代码,测试bug是否修复 2021-06-04 12:22:53 +08:00
张小飞 ae6c44e942 修改app\test\test_login.py访问端口 2021-06-04 12:01:19 +08:00
张小飞 03446abe22 修改测试文件中访问端口,删除jenkinsfile中不必要的阶段 2021-06-01 11:35:23 +08:00
张小飞 8c8866548b 修改gitignore,不在推送数据库文件wordfreqapp.db 2021-06-01 09:49:44 +08:00
vicky-ZhuWenqi 643e0c4eee
Update pickle_idea.py
在生词簿每个单词后面,加上两个按钮,熟悉与不熟悉。如果点熟悉,就将生词簿中该单词后面记录的添加次数减一,直至减为0,就将该单词从生词簿中移除;如果点不熟悉,就将生词簿中该单词后面记录的添加次数加一。
2021-05-31 08:48:03 +08:00
vicky-ZhuWenqi 9b7b5279db
Update main.py
添加熟悉和不熟悉按钮功能,如果点熟悉,就将生词簿中该单词后面记录的添加次数减一,直至减为0,就将该单词从生词簿中移除;如果点不熟悉,就将生词簿中该单词后面记录的添加次数加1。
2021-05-31 08:46:34 +08:00
ArrayYang 0379c7e978 添加删除单词功能
用户登录后可以删除自己已经认识的单词
2021-05-30 21:30:18 +08:00
张小飞 aa182609ae 1.修改main.py文件中的verify_user函数 2.在UseSqlite.py文件中的Sqlite3Template类下添加了三个函数instructions_with_parameters do_with_parameters operate_with_parameters 2021-05-29 21:39:28 +08:00
张小飞 5d87bb8bae 添加数据库文件app/static/wordfreqapp.db,同时修改了gitignore文件使得数据库文件可以上传至远程仓库 2021-05-29 21:01:39 +08:00
Hui Lan 843ed03d4f Publish EnglishPal source code 2021-04-06 16:22:03 +08:00