Addhelpbutton in moodle - authentication

I am using Moodle 2.3
I am trying to add help button to my self registration form in moodle. I am making changed in
/login/signup_form.php page.
I am using:
$mform->addHelpButton('country','country','moodle');
This creates a help icon on the page. But clicking on the icon it loads the help information on the same page. The pop up doesn't work. No JavaScript errors found in firebug.
Plz help

You need to on ajax/javascript setting from the admin.
Site administration > Appearance > AJAX and Javascript

You should also add an entry to lang/en/moodle.php
For example
In course/edit_form.php I added the following field
// Course Champion$mform->addElement('text', 'champion', 'Champion', get_string('champion'), 'size="256"');
// New field$mform->addHelpButton('champion','courseChampion');
// Field help$mform->setDefault('champion', 'Firstname Lastname');
Then in lang/en/moodle.php I added the help information for that field.
$string['courseChampion'] = 'Course Champion';
$string['courseChampion_help'] = 'Enter the firstname and lastname of the champion.';

In moodle.php under /root/lang/en, add the following string:
$string['country_help'] = 'Your text here';

Related

FullCalendar Scheduler eventMouseover for Resources

My resource list is a list of users for my scheduler. I would like to show a tooltip when hovering over them that displays user specific information. I can do this easily for events with the eventMouseover but can someone help me do this for resources?
I have all of the user info I just do not know how to make the tooltip appear.
I solved this using the resourceRender function http://fullcalendar.io/docs/resource_rendering/resourceRender/
function resourceRenderCallback(resourceObj, labelTds, bodyTds){
var title = 'Name: ' + resourceObj.title;
labelTds.attr('title', title);
}
From here you can add whatever you desire to title. Another possibility is
labelTds.on('hover', function(){console.log('hover');});
which would allow any jquery event to be triggered for the resource

Drupal 7 - Print PDF and Panelizer

Hi guys ,
I'm currently working on a Drupal project which use the Panelizer module by overriding the default node display. The panel for this content type is made width a lot of rules and specifications in order to display some specific content (like views) according some fields.
Now I need to print in PDF the same content that is displayed by the panelizer module but in another display (in one column ), so I cloned the display I use and rearranged it to display what I want.Then I want to use this display width the print module but I didn't managed to do that.
Any idea how can I do that ?
I just can't use the default node render, because I would miss some informations dues to the specifications used in the panel, and I can't print the panelized content because it's not the same display.
I read this thread but how can I say to the print module to use the "print" display I cloned instead of the default one ?
Any suggestions or ideas will be appreciated or if you have another idea for doing that you're welcome :)
Thank you !
In your print pdf template you can load the node then create a view with the display and finally render it : drupal_render(node_view(node_load($node->nid), "name of your display")) ;
Another way is to alter node entity info, telling that 'print' view can be panelized, i.e.
/**
* Implements hook_entity_info_alter().
*/
function mymodule_entity_info_alter(&$entity_info) {
$entity_info['node']['view modes']['print']['custom settings'] = TRUE;
...
}
After that, you go to panelizer settings of your content type(s), and set whatever you want for the print view mode

Make Text Field item as Read Only in APEX 5.0

I have some text field page items on my APEX 5.0 page and I want to make the textboxes as read only/non-editable. During the page load I want to use these text boxes for only the data display on the page and should be non-editable.
Can somebody advice on how to do that? What attributes need to set for this?
This answer is a bit late to the party, but I found myself confronted to this problem and I wanted to share the solution I came up with.
In fact you just need to create your item as a text area, let say P1_Text_Area and you give it a readonly attribute using JavaScript. Write thoses 2 lines in the "Function and Global Variable Declaration" of your page:
var disItem = document.getElementById('P1_Text_Area');
disItem.readOnly = true;
Hope this helps someone in need.
in item properties find the
Read Only group
and set Read Only Condition Type as Always
or the option that suits to you
You can use disabled + save session state ==> read only

How to find the element position using helium?

I am new at helium automation tool, I am trying to automate google login page
Link: https://www.google.com.bd/?gws_rd=cr,ssl&ei=zi5rVfScH4yfugTkv4EY
In this page I want helium to click the sign in button
I know the syntax can be as following
click("Sign in");
click(Button("OK"));
click(Point(200, 300));
click(ComboBox("File type").getTopLeft().withOffset(50, 0));
My question is how I can use the point and comboBox option for the above sign in button.
Thanks in advance.
Use click function:
from helium import *
click('login in')
write("your usrname", into="field name")#input field
write("your pwd", into="field name")#input field
click('login')
Sometimes you should verify bot check manully.

angularJS dynamic login page

My code is here: http://plnkr.co/edit/2WDK0b
Is it possible that when I enter an existing username, the message in the "help-block" span will change dynamically?
Just wrap your existing checking code in a function in the controller. Like $scope.checkUsername = function() { //your existing code }
Now on your username input put ng-change="checkUsername()" and then it will work.
Before you get too much further make sure to read the validation bits from the Angular Form's guide: http://docs.angularjs.org/guide/forms
Here's a fiddle of your code working: http://plnkr.co/edit/LwMJGq?p=preview Although I think the logic for the name checking needs a bit of work.