hit-moodle / moodle-mod_hotquestion Goto Github PK
View Code? Open in Web Editor NEWHelp teachers to collect questions from students in or out of classroom.
Home Page: https://github.com/hit-moodle/moodle-mod_hotquestion/wiki
Help teachers to collect questions from students in or out of classroom.
Home Page: https://github.com/hit-moodle/moodle-mod_hotquestion/wiki
The post time of questions is printed ugly. It should be changed to:
now
if it is posted just now.2 hours and 40 mins ago
if it was posted less than 24 hours agoFULL DATE
if it has been posted for more than 24 hoursThe patch should be on the following line of code in view.php:
$a->time = userdate($question->time).' ('.get_string('early', 'assignment', format_time(time() - $question->time)) . ')';
Now we have only like button for questions. Add dislike button and record two counters: likes & dislikes
现在的刷新机制是整个HTML代码块替换。替换后本来绑定了点击事件的元素丢失,所以又进行了重新绑定。
一个避免重复绑定的方案是利用JavaScript事件冒泡:
为需要监听的元素的父级元素(不会因刷新被替换的那个节点)绑定点击事件,当其中的元素被点击时捕获目标元素,判断如果是刷新按钮,则执行刷新流程。其余不做处理。
Add an option for given roles (e.g. teachers) being able to delete questions.
As @daveyboond points out elsewhere, failing to add a question, or successfully adding a question when $ajax is false, results in a database error. This is because you are trying to redirect to view.php?id=$cm->id, but you haven't set $cm anywhere. You need to use $hq->cm->id as per the following patch.
diff --git a/view.php b/view.php
index ff2471c..80ed2e9 100644
--- a/view.php
+++ b/view.php
@@ -76,10 +76,10 @@ if (has_capability('mod/hotquestion:ask', $context)) {
$mform = new hotquestion_form(null, array($hq->instance->anonymouspost, $hq->cm));
if ($fromform=$mform->get_data()) {
if (!$hq->add_new_question($fromform)) {
- redirect('view.php?id='.$cm->id, get_string('invalidquestion', 'hotquestion'));
+ redirect('view.php?id='.$hq->cm->id, get_string('invalidquestion', 'hotquestion'));
}
if (!$ajax) {
- redirect('view.php?id='.$cm->id, get_string('questionsubmitted', 'hotquestion'));
+ redirect('view.php?id='.$hq->cm->id, get_string('questionsubmitted', 'hotquestion'));
}
}
}
安装到2.6+上,Clean主题中,菜单失效
能够正常使用,但是管理菜单无法显示二级菜单,其他主题暂时没有测试
Could moodleform provides more flexible layout of forms?
As discussed in our email conversation, an ability to allow HTML5 desktop notification for given roles and a predefined heat threshold, e.g. pop up the 3 most on voted questions on the lecturer's desktop during his presentation (in a non obtrusive way).
Thanks ;-)
@7lemon ,ajax做得很帅!现在需要一个刷新按钮,只刷那个表格,否则用户还得刷新整个页面才能看到最新的问题后投票
只有当前round才有投票的意义
Ability for posters to edit questions in a given timeframe (e.g. 1 minute)
renderer.php uses get_string('early', 'assignment',...) to get the word "early", to add to the posting time. For example: "(16 mins 25 secs early)"
This is not correct English. The word should be "ago", e.g. "(16 mins 25 secs ago)"
I think you need to add a new string to the local lang file to deal with this.
现在的匿名提问并不是真的,数据库里还会记录用户id,只是在显示的时候显示为匿名。应该将其改为真匿名,不然不厚道。
When using the current version of Hot Question in github in Moodle 2.4.3+ and Moodle 2.5.1+, with debugging set to developer, lines 122 and 131 cause a Strict Standards error.
Adding:
$formatoptions = new stdClass();
$a = new stdClass();
at about lines 110 and 111 will fix the errors.
将提问、投票操作AJAX化,不需刷新就显示最新结果。
界面整体实现遵从moodle 2.0的render机制:http://docs.moodle.org/en/Development:Output_renderers
AMOS的源码是个好参考:https://github.com/mudrd8mz/moodle-local_amos
When using the current version of Hot Question in Moodle 2.4.3+ or Moodle 2.5.1+ and you are in a Hot Question activity, the Administration block links to Course Administration, Switch role to..., My profile settings, and Site administration do not work. Other links do.
When using the current github version of Hot Question with debugging set to developer, line 86 of mod_form.php causes a setType error. It can be fixed by adding: $mform->setType('id', PARAM_INT); on line 87.
As a teacher, I would like to remove some topics from the list and I am unable to.
Also as a student, I would like to remove one of my posts (topics) and I am unable to.
Please update the module to make it work with Moodle 2.1. Submitting a question doesn't do anything.
I really would like to test it. Could be quite useful here.
Thank you!
This is a nice plugin. Some people would like it to be available for Moodle 2.2 and 2.3 branches.
If it were possible.
Thanks
Add an option for automatically refreshing the hot question activity. Probably also only for customizable roles to not stress out the server too much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.