moodle

Moodle Course Total Grade

白昼怎懂夜的黑 提交于 2019-12-25 20:04:05
问题 I want to display Course Total Grades like this: if Quiz total = 1 then Course Total = 74 if Quiz total = 2 then Course Total = 74 again if Quiz total = 3 then Course Total = 74 again if Quiz total = 4 then Course Total = 77 if Quiz total = 5 then Course Total = 80 if Quiz total = 6 then Course Total = 83 ...... and so on until Quiz total =34 I can't think of any formula that can give me the desired result. Any suggestions on how to achieve that? Can I change anything in the code maybe? 回答1:

Moodle Course Total Grade

余生长醉 提交于 2019-12-25 20:02:15
问题 I want to display Course Total Grades like this: if Quiz total = 1 then Course Total = 74 if Quiz total = 2 then Course Total = 74 again if Quiz total = 3 then Course Total = 74 again if Quiz total = 4 then Course Total = 77 if Quiz total = 5 then Course Total = 80 if Quiz total = 6 then Course Total = 83 ...... and so on until Quiz total =34 I can't think of any formula that can give me the desired result. Any suggestions on how to achieve that? Can I change anything in the code maybe? 回答1:

What is the correct context id of Moodle block

丶灬走出姿态 提交于 2019-12-25 08:04:29
问题 What is the correct context id of Moodle block, block_html . case1 In block_html.php file $this->context->id inside get_content function gives 122 case2 I create a new page named view.php . Here I try $instance = $DB->get_record('block_instances', array('id' => 57)); $blockname = 'html'; $block = block_instance($blockname, $instance); echo $block->context->id; and this gives 98 . case3 $context = context_block::instance($cmid); echo $context->id gives 7 What should I use as context id of

creating moodle users and register them on courses programatically

蓝咒 提交于 2019-12-25 07:07:50
问题 I need to create users and register users on moodle from the outside. The Moodle database is really complex and it have like 0 documentation. So far I understand that the mdl_users have the users, but I dont get what to query there, and the courses are a headache. 回答1: I see you add "php" to your tags, so I'll give you the php answer, but the query work in any mysql. $servername = 'localhost'; $username = 'username'; $password = 'password'; $dbname = 'moodle'; $u_moodle = 'theusernameyouwant'

creating moodle users and register them on courses programatically

依然范特西╮ 提交于 2019-12-25 07:07:27
问题 I need to create users and register users on moodle from the outside. The Moodle database is really complex and it have like 0 documentation. So far I understand that the mdl_users have the users, but I dont get what to query there, and the courses are a headache. 回答1: I see you add "php" to your tags, so I'll give you the php answer, but the query work in any mysql. $servername = 'localhost'; $username = 'username'; $password = 'password'; $dbname = 'moodle'; $u_moodle = 'theusernameyouwant'

Moodle Turnitin: add functionality to insert extra text in assignments

假装没事ソ 提交于 2019-12-25 05:37:05
问题 Some universities have a Blue Card scheme enabling students with specific learning difficulties (SpLDs) to flag their work with a blue card, so the tutor will mark it with due consideration. We needed a way of making it easier for students to flag their work with a blue card, and I have come up with the following script, which goes into the Additional HTML section in Site Administration in Moodle, and works with the Turnitin plugin. (See my other post for a script that works with the Moodle

Moodle Add a new block as Admin for all users , to appear on all pages

馋奶兔 提交于 2019-12-25 05:26:10
问题 I have a created a simple custom block that outputs Html. I want to add it in front page context with page->context "Display throughout the entire site". I googled and found the procedure : As an administrator, turn on the editing on the front page and add the block you wish to make sticky. For Where this block appears>Page contexts, choose 'Display throughout the entire site'. Decide other settings according to your preference and save. The block will now appear on all pages of your Moodle.

Moodle Student list with Groups and Course

萝らか妹 提交于 2019-12-25 04:22:16
问题 I am using moodle2.4.6. I want a list of user with their groups and their courses. 回答1: You will need to do an SQL query to get this information. Assuming you are using the default 'mdl_' prefix for tables, you will need to join together the following tables: mdl_user - the details of the users mdl_user_enrolments - (user_enrolments.userid = user.id) which course enrolments the user has mdl_enrol - (enrol.id = user_enrolments.enrolid) details of which enrolment instances these are mdl_course

Moodle Student list with Groups and Course

有些话、适合烂在心里 提交于 2019-12-25 04:22:11
问题 I am using moodle2.4.6. I want a list of user with their groups and their courses. 回答1: You will need to do an SQL query to get this information. Assuming you are using the default 'mdl_' prefix for tables, you will need to join together the following tables: mdl_user - the details of the users mdl_user_enrolments - (user_enrolments.userid = user.id) which course enrolments the user has mdl_enrol - (enrol.id = user_enrolments.enrolid) details of which enrolment instances these are mdl_course

How do I delete course enrolments in moodle in bulk?

只谈情不闲聊 提交于 2019-12-25 04:08:33
问题 Moodle has a built in per course reset ability. I want to reset all my courses. 回答1: Sorry to bring this old post back but after a long struggle I finally got that code to work. I've tested it on a Moodle 1.9.7 enviroment <?php require('../config.php'); require_once('reset_form.php'); $courseids = array(8,9,11); foreach ($courseids as &$value) { $data->MAX_FILE_SIZE = 8097152; $data->reset_start_date = 1251781200; $data->reset_events = 1; $data->reset_logs = 1; $data->reset_notes = 1; $data-