moodle

Loop within STACK question in moodle using jsxgraph

旧巷老猫 提交于 2021-02-11 12:36:28
问题 I am trying to create a moodle-STACK question with an interactive element via jsxgraph . Within the [[jsxgraph]] ... [[/jsxgraph]] tags, I am plotting a curve with two databases, each with 6 elements. Since I would like students to add error bars for both scales, I added a loop within the jsxgraph-element : var plot = function() { var j, xr0, yr0, xr1, yr1, xr2, yr2, err1, err2; board.suspendUpdate(); for (j=0; j<6;j++) { const v1 = Number(input1.Value()); const v2 = Number(input2.Value());

Creating a LTI provider for Moodle

余生长醉 提交于 2021-01-29 02:34:58
问题 I'm trying to create a LTI provider for Moodle. The things that I need from Moodle - course name, students and teachers, as well as enabling a single sign on (getting the session, token, cookie...) I did a research and saw that Moodle 3 supports LTI v2, which is basically a why to communicate through REST API with Moodle, but didn't see an API ref for the optional endpoints, or code samples (looking for nodejs, but every other language will be welcome) Does anyone has experience with it?

Use isotope latex-package inside Rnw (r-exams)

有些话、适合烂在心里 提交于 2021-01-28 21:02:53
问题 I want to load and use isotope package in my .Rnw file: \exname{foo} \extype{schoice} \exsolution{0001} \usepackage{isotope} \begin{question} Foo \isotope[A][Z]{H}\ bar \begin{answerlist} \item a \item b \item c \item d \end{answerlist} \end{question} But when I render it into Moodle's XML ( exams2moodle ) the \isotope disappear and appears only Foo bar . I'm using MathML rendering. How can I load and use correctly? 回答1: This short answer is: There is no way (that I know of) of rendering the

Get course contents using webservice

喜欢而已 提交于 2021-01-27 18:30:27
问题 I am using Moodle 3.1+. I am trying to get the course contents using webservice. I have created a course with activity 'lesson'. Now when I try to get the contents of the course using webservice 'core_course_get_contents', I am getting the following response. [{"id":36,"name":" 0","visible":1,"summary":"","summaryformat":1,"modules":[{"id":18,"url":"http:\/\/localhost\/moodle\/mod\/lesson\/view.php?id=18","name":"Lesson1","instance":1,"visible":1,"modicon":"http:\/\/localhost\/moodle\/theme\

Where are the log files located in Moodle?

丶灬走出姿态 提交于 2021-01-27 07:33:14
问题 I need to locate where the logging data is stored in Moodle. In the Moodle database there is a table called 'log' where log data is stored. However, I can get Moodle reports showing logging data that is definitely NOT stored in this table. I am using Moodle version 2.7.8. 回答1: In the Moodle version I am using (2.7.8) you have three possibilities to log your data (called 'log stores'): Standard log : This is the default possibility. All the log data will be saved to the database table

get_records_sql returns only one result using inner join in moodle

眉间皱痕 提交于 2021-01-24 10:51:57
问题 I have used following code for getting category and corresponding course detail in MOODLE global $DB; $catlist = $DB->get_records_sql( 'SELECT ca.id,ca.name,ca.coursecount, c.id as course_id , c.category, c.fullname, c.shortname , c.summary , c.format, c.startdate , c.timecreated FROM {course_categories} as ca inner join {course} as c on ca.id = c.category WHERE ca.parent > ? and ca.visible = ? and c.visible = ? ', array('0','1','1')); echo "<pre>";print_r($catlist); echo "</pre>"; When i

get_records_sql returns only one result using inner join in moodle

拟墨画扇 提交于 2021-01-24 10:51:16
问题 I have used following code for getting category and corresponding course detail in MOODLE global $DB; $catlist = $DB->get_records_sql( 'SELECT ca.id,ca.name,ca.coursecount, c.id as course_id , c.category, c.fullname, c.shortname , c.summary , c.format, c.startdate , c.timecreated FROM {course_categories} as ca inner join {course} as c on ca.id = c.category WHERE ca.parent > ? and ca.visible = ? and c.visible = ? ', array('0','1','1')); echo "<pre>";print_r($catlist); echo "</pre>"; When i

get_records_sql returns only one result using inner join in moodle

烂漫一生 提交于 2021-01-24 10:50:48
问题 I have used following code for getting category and corresponding course detail in MOODLE global $DB; $catlist = $DB->get_records_sql( 'SELECT ca.id,ca.name,ca.coursecount, c.id as course_id , c.category, c.fullname, c.shortname , c.summary , c.format, c.startdate , c.timecreated FROM {course_categories} as ca inner join {course} as c on ca.id = c.category WHERE ca.parent > ? and ca.visible = ? and c.visible = ? ', array('0','1','1')); echo "<pre>";print_r($catlist); echo "</pre>"; When i

Sharing a random CSV data set across exercises with exams2moodle()

房东的猫 提交于 2020-12-12 06:47:30
问题 I want to create a Moodle quiz with 300 random replications from 6 exercise templates using exams2moodle() from R/exams. The 6 exercise templates depend on a data set that is randomly generated as a CSV file from a larger data base in the first exercise. The command exams2pdf() does just what I want but I want to reproduce what exams2pdf() does with the exams2moodle() command. However, this just generates a quiz with 300 questions of type 1, 300 of type 2, ..., and 300 of type 6. I don't know

Sharing a random CSV data set across exercises with exams2moodle()

限于喜欢 提交于 2020-12-12 06:46:50
问题 I want to create a Moodle quiz with 300 random replications from 6 exercise templates using exams2moodle() from R/exams. The 6 exercise templates depend on a data set that is randomly generated as a CSV file from a larger data base in the first exercise. The command exams2pdf() does just what I want but I want to reproduce what exams2pdf() does with the exams2moodle() command. However, this just generates a quiz with 300 questions of type 1, 300 of type 2, ..., and 300 of type 6. I don't know