moodle

Email moodle user data after registration

血红的双手。 提交于 2019-12-03 22:39:03
问题 i need to send a custom email to the admin after user registration on my moodle site, but i want it to have all the user iformation displayed, i been searching a lot and found this link, it sends a custom email to the admin with the user name, but i've ben trying to send more info like custom fields added by me or even default fields like the phone but i can't find a way, i hope u help me. 回答1: You could use the 'user_created' event. http://docs.moodle.org/dev/Events_API#Users Haven't tested

Create user using Moodle webservice

北战南征 提交于 2019-12-03 21:34:59
I have tried to create a new user on the Moodle by web service api. I tried with a example that i found on the github and with another php code In the both i receive the same response: "Missing required key in single structure: users" the response: { "exception":"invalid_parameter_exception", "errorcode":"invalidparameter", "message":"Invalid parameter value detected", "debuginfo":"Missing required key in single structure: users" } I try to change the object by a array, but the error continues. my code: $functionname = 'core_user_create_users'; $user1 = new stdClass(); $user1->id = 1; $user1-

How to store a file in Moodle so that it is accessible for an external application?

好久不见. 提交于 2019-12-03 21:26:35
I need to store a file in Moodle. This is not really a problem, it is explained here . The problem is that this file has to be accessible for everyone. Hence, there has to be a URL, e.g. www.mymoodlesite.com/temp/myfile.txt or the like, which one can enter in ones browser and access the file. I thought of copying the file into the moodledata/temp folder, but then I do not have a URL in order to access the file.. Thanks for your help in advance! Finally I could solve my problem :-) I used a filemanager like this: $mform->addElement('filemanager', 'my_filemanager', 'Upload a file', null, array(

SQL query for Courses Enrolment on Moodle

青春壹個敷衍的年華 提交于 2019-12-03 19:15:16
问题 I was looking for the proper SQL queries for retrieving all students enrolled in a certain course, or all courses a certain student has enrolled in, on Moodle . I have found a few solutions from the Internet, and most of them suggest joining these tables: context, role_assignments, course, user, role But then when I looked at the database, I found that there is a table named user_enrolments , and it seems to me that I could get the results by joining the following tables: user_enrolments,

Understanding Moodle $context

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: From Moodle doc : A context is a space in Moodle where roles can be assigned. I understand that a context is a logical space used to manage Moodle objects. I developed a custom block plugin with a file upload where I use file_prepare_draft_area and file_save_draft_area_files functions.There is a $context parameter that must be passed and I am don't really know what context should I pass ? This mean, I guess, in which logical space should I put my block plugin uploaded files ? In my opinion, the most logical would be store the uploaded files

is there any API exists for Moodle? [closed]

為{幸葍}努か 提交于 2019-12-03 03:25:00
I want to create a customized front end for Moodle. Does anyone know that from where I can get API for this? or any other help? [Edit: I have written on, moodle theme modification which we did at http://www.iank.it/category/e-learning/ for http://www.edupristine.com/ca ] It will be very tiresome to create a complete new frontend for moodle, I would suggest choose a theme which looks closest to what you want and then start modifying it. You will have to understand moodle's database and tables structure and also Moodle database Manipulation API. After this you can straight jump into tinkering

Getting JSON Object by calling a URL with parameters in PHP

回眸只為那壹抹淺笑 提交于 2019-12-03 03:16:20
I'm trying to get json data by calling moodle url: https://<moodledomain>/login/token.php?username=test1&password=Test1&service=moodle_mobile_app the response format of moodle system is like this: {"token":"a2063623aa3244a19101e28644ad3004"} The result I tried to process with PHP: if ( isset($_POST['username']) && isset($_POST['password']) ){ // test1 Test1 // request for a 'token' via moodle url $json_url = "https://<moodledomain>/login/token.php?username=".$_POST['username']."&password=".$_POST['password']."&service=moodle_mobile_app"; $obj = json_decode($json_url); print $obj->{'token'}; //

fatal: &#039;origin&#039; does not appear to be a git repository

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've a repository moodle on my Github account which I forked from the official repository. I then cloned it on my local machine. It worked fine. I created several branches (under the master branch). I made several commits and it worked fine. I don't know how I'm getting the following error when I do : git push origin master fatal: 'origin' does not appear to be a git repository fatal: The remote end hung up unexpectedly How do I resolve the error without effecting my repository on Github? I'm using Ubuntu 12.10 The contents of my .git/config

How to remove “cluster-40926” from my dataroot in moodle

匿名 (未验证) 提交于 2019-12-03 02:42:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Path of moodledata in Moodle is /nas/wp/www/cluster-40926/securityorg/test_moodle. Here is the code $dir = dirname(__FILE__); echo "Full path to this dir: " . $dir; Output: Full path to this dir: /nas/wp/www/cluster-40926/securityorg/test_moodle But this creates an error "Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting" cluster-40926 folder donot exits so I thnk if I can remove cluster-40926 from the path, problem will be solved. Please help, Thanks in advance 回答1: I cannot find

moodle not showing CSS and theme with linux server

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm experiencing a problem regarding Moodle. I've made an install into a Linux server, but CSS and themes are not displaying so i have only plain text. How can this be possible and how to solve it? Thanks. 回答1: This solution should work. I ran into the same problem after I migrated from local to production and I had to disable Use slash arguments in Sites Administration > Server > HTTP. It is the first item you see on the page. Just deselect it if it is checked and save to see if that helps. 回答2: Today i installed the latest moodle 3.2 on