moodle

Logging into Moodle via external site

隐身守侯 提交于 2019-12-07 12:49:54
问题 I'm setting up a Moodle environment and I need users to be able to login via an external site using their credentials from that site. Ideally they would go to the website, login in, and then click a button that will send them to Moodle along with their account information. Once they get to Moodle, Moodle will check to see if the account information already exists. If so it will login, otherwise it will create the account and login. I already have the Moodle environment set up, as well as the

How to include external JavaScript on my Moodle page?

ⅰ亾dé卋堺 提交于 2019-12-07 05:13:27
问题 In Moodle, while we use $PAGE->requires->js_init_call() to include a JS function defined in our plugin's module.js file, how can I include external Javascript resources , which we normally include in the <head> tags like: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>mypage</title> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="http://yui.yahooapis

PHP xmlrpc extension and MAMP

ぐ巨炮叔叔 提交于 2019-12-07 03:20:45
问题 I am trying to get the xmlrpc extension to work for php5 in MAMP (1.8.4). I checked what version of PHP 5 was installed: $ /Applications/MAMP/bin/php5/bin/php -v PHP 5.2.11 (cli) (built: Dec 12 2009 13:19:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies I downloaded the PHP 5.2.11

How to add a block to the center of a page in Moodle?

雨燕双飞 提交于 2019-12-06 12:41:48
问题 I wanted to display a comment block below the activity rather than on the left or right side bars. It was a lot easier than I thought. I've added code for center-post which will add a block at the bottom of the main content. It could easily be modified to have a centre-pre for displaying at the top of the main content. 回答1: In /theme/yourthemename/config.php Add 'centre-post' to the regions() array for each page layout where it is required. Eg for modules only added it to 'incourse' layout //

moodle “Can not initialise PHP session, please verify that your browser accepts cookies.”

二次信任 提交于 2019-12-06 10:25:01
I'm trying to install MOODLE locally and i face this problem Can not initialize PHP session, please verify that your browser accepts cookies. I'm trying to enable cookie (I'm using chrome) following these steps https://support.google.com/accounts/bin/answer.py?hl=en&answer=61416 and I also tried to config php.ini http://support.qualityunit.com/021373-How-To-Enable-Session-Support-for-PHP but still can't solve it anyone can help me? php configuration <br/> session Session Support enabled Registered save handlers files user Registered serializer handlers php php_binary wddx Directive Local Value

Create XML file with python by iterating over lists

女生的网名这么多〃 提交于 2019-12-06 08:58:07
问题 I am trying to get an xml file that looks like this so that I can import it into a moodle gradebook: <results> <result> <student>1</student> <assignment>100</assignment> <score>0</score> </result> <result> <student>1</student> <assignment>101</assignment> <score>4</score> </result> <result> <student>1</student> <assignment>102</assignment> <score>10</score> </result> <result> <student>2</student> <assignment>100</assignment> <score>0</score> </result> <result> <student>2</student> <assignment

Use window.print content to download a web page as pdf

佐手、 提交于 2019-12-06 06:31:45
问题 I would like to have a link that when is clicked, automatically starts the download of the printable version of the web page. I'm using Moodle. The content I want it's exactly the same If I download the page using ctrl + p and saving as pdf or using <a href=\"whatever.htm\" onClick=\"window.print();return false\">Download web page</a> I want exactly that content because using this way, the header, sidebar and footer is removed. I don't want css. I'm not using this because this doesn't work in

Moodle 2.0 with Nginx backend

匆匆过客 提交于 2019-12-06 05:17:54
Hello I am looking for a tutorial on how to configure a server for Moodle 2.0 with nginx as the server and PHP-FPM or FastCGI with mySQL as the backend. Sorry if I am confusing these terms bit of a server architecture noob. Probably would run it on Ubuntu/Debian machine found a tutorial for older versions of Moodle with older PHP and PostgreSQL compiled from source. This would slow down my deployment plans and seems deprecated. Also would prefer MySQL over Postgres based on my experience level with MySQL. Can anyone out there make some updated suggestions? I wrote a documentation for Nginx and

Understanding Moodle $context

时光怂恿深爱的人放手 提交于 2019-12-06 04:57:03
问题 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,

Logging into Moodle via external site

删除回忆录丶 提交于 2019-12-06 02:25:45
I'm setting up a Moodle environment and I need users to be able to login via an external site using their credentials from that site. Ideally they would go to the website, login in, and then click a button that will send them to Moodle along with their account information. Once they get to Moodle, Moodle will check to see if the account information already exists. If so it will login, otherwise it will create the account and login. I already have the Moodle environment set up, as well as the login site. The Moodle site is not allowed to access the database on the login site, and the users