Commit 6deb237e authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge changes Ib98a90e4,I70d54e89

* changes:
  Bug 1904949: removing old duplicate lang pairs.
  Bug 1899855: Created lang strings for hardcoded string literals in webservices/functions
parents 110b4f19 b63d1eb2
......@@ -260,8 +260,6 @@ $string['groupcategoriespagedescription'] = 'The categories listed here can be a
$string['groupquotas'] = "Group quota for '%s'";
$string['groupfilequotadescription'] = 'Total storage available in the group\'s files area.';
$string['groupadminsforgroup'] = "Group administrators for '%s'";
$string['potentialadmins'] = 'Potential administrators';
$string['currentadmins'] = 'Current administrators';
$string['makeusersintoadmins'] = 'Turn selected regular accounts into administrator accounts';
$string['makeadminsintousers'] = 'Turn selected administrator accounts back into regular accounts';
$string['groupadminsupdated'] = 'Group administrators have been updated';
......@@ -831,7 +829,6 @@ $string['Import'] = 'Import';
$string['bulkimportdirdoesntexist'] = 'The directory %s does not exist.';
$string['unabletoreadbulkimportdir'] = 'The directory %s is unreadable.';
$string['unabletoreadcsvfile'] = 'Unable to read CSV file %s.';
$string['importfilenotreadable'] = 'Unable to read Leap2A file %s.';
$string['importfileisnotazipfile'] = 'Import file %s was not detected as a ZIP file.';
$string['unzipfailed'] = 'Failed to unzip the Leap2A file %s. See the error log for more information.';
$string['importfailedfornusers'] = 'Import failed for %d of %d accounts.';
......@@ -858,7 +855,6 @@ $string['staffusersupdated'] = 'Staff updated';
// Suspended Users
$string['deleteusers'] = 'Delete accounts';
$string['deleteuser'] = 'Delete account';
$string['confirmdeleteusers1'] = 'Are you sure you want to delete the accounts for the selected people?';
$string['exportingnotsupportedyet'] = 'Exporting profiles is not supported yet.';
$string['exportuserprofiles'] = 'Export profiles';
......@@ -1521,7 +1517,6 @@ $string['registerrefusal'] = 'Your account will not be created when you do not c
$string['registerprivacy'] = 'Please read the privacy statement. If you do not consent to it, you cannot create an account on the site.';
$string['registertermsandconditions'] = 'Please read the terms and conditions. If you do not consent to them, you cannot create an account on the site.';
$string['enterreason'] = 'Please enter the reason of refusal here...';
$string['hasrefused'] = 'has refused the privacy statement';
$string['privacylowcase'] = 'privacy statement';
$string['termsandconditionslowcase'] = 'terms and conditions';
$string['hasrefused'] = 'has refused the %s';
......
......@@ -149,7 +149,7 @@ $string['plugin_blocktype_groupinfo_version'] = 'Block type plugin Group info ve
$string['plugin_blocktype_groupmembers_version'] = 'Block type plugin Group members version';
$string['plugin_blocktype_groupviews_version'] = 'Block type plugin Group portfolios version';
$string['plugin_blocktype_html_version'] = 'Block type plugin Some HTML version';
$string['plugin_blocktype_html_version'] = 'Block type plugin PDF version';
$string['plugin_blocktype_pdf_version'] = 'Block type plugin PDF version';
$string['plugin_blocktype_image_version'] = 'Block type plugin Image version';
$string['plugin_blocktype_inbox_version'] = 'Block type plugin Inbox version';
$string['plugin_blocktype_internalmedia_version'] = 'Block type plugin Embedded media version';
......
......@@ -72,7 +72,6 @@ $string['institutionviews'] = 'Institution pages';
$string['institutionviewscollections'] = 'Institution pages and collections';
$string['reallyaddaccesstoemptyview'] = 'Your page contains no blocks. Do you really want to give these people access to the page?';
$string['viewdeleted'] = 'Page deleted';
$string['viewsubmitted'] = 'Page submitted';
$string['deletethisview'] = 'Delete this page';
$string['submitthisviewto1'] = 'Submit this page for assessment to';
$string['submitthiscollectionto1'] = 'Submit this collection for assessment to';
......@@ -134,7 +133,6 @@ $string['listedinpages'] = 'Listed in pages';
$string['public'] = 'Public';
$string['registeredusers'] = 'Registered people';
$string['friends'] = 'Friends';
$string['groups'] = 'Groups';
$string['users'] = 'People';
$string['friend'] = 'Friend';
$string['group'] = 'Group';
......@@ -193,7 +191,6 @@ $string['Createdon'] = 'Created on';
$string['Added'] = 'Added';
$string['share'] = 'Share';
$string['sharedbyme'] = 'Shared by me';
$string['sharewith'] = 'Share with';
$string['whosharewith'] = 'Who do you want to share with?';
$string['accesslist'] = 'Access list';
$string['defaultaccesslistmessage'] = 'Nobody besides you can view your selected pages / collections. Add people to give them access.';
......
<?php
/**
*
* @package mahara
* @subpackage lang
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
defined('INTERNAL') || die();
// for these files: these files htdocs/webservice/functions/mahara_*_external.php
$string['accesskey'] = 'Access Key';
$string['aimscreenname'] = 'AIM screen name';
$string['allowcomments'] = 'Allow comments';
$string['apilevel'] = 'API Level';
$string['approvecomments'] = 'Approve comments';
$string['archiveonrelease'] = 'Do you want to archive this submitted portfolio when it is released?';
$string['authplugins'] = 'Auth plugins include manual, ldap, imap, etc';
$string['authuserfirstname'] = 'First name of the authenticated person';
$string['authuserfullname'] = 'Full name of the authenticated person';
$string['authuserid'] = 'ID of the authenticated person';
$string['authuserlastname'] = 'Last name of the authenticated person';
$string['authuserusername'] = 'Username of the authenticated person';
$string['availfunctions'] = 'Available functions';
$string['blog'] = 'A Journal';
$string['blogaddress'] = 'Journal web address';
$string['blogauthor'] = 'Journal author';
$string['blogcreatetime'] = 'Journal creation time';
$string['blogdesc'] = 'Journal description';
$string['blogid'] = 'Journal ID';
$string['blogmodtime'] = 'Journal modification time';
$string['blogofparent'] = 'Parent journal ID';
$string['blogowner'] = 'Journal owner';
$string['blogowneremail'] = 'Email address of the journal owner';
$string['blogownerid'] = 'ID of the journal owner';
$string['blogownerremusername'] = 'Remote username of the journal owner';
$string['blogownerusername'] = 'Username of the journal owner';
$string['blogpost'] = 'A Journal entry';
$string['blogpostauthor'] = 'Author of journal entry';
$string['blogpostcount'] = 'Number of journal entries';
$string['blogpostcreatetime'] = 'Time the journal entry got created';
$string['blogpostdesc'] = ' Journal entry description';
$string['blogpostdraft'] = 'Journal entry draft mode';
$string['blogpostid'] = 'Journal entry ID';
$string['blogpostmodtime'] = 'Time the journal entry got modified';
$string['blogpostowner'] = 'Owner of journal entry';
$string['blogposts'] = 'Journal entries';
$string['blogpostsids'] = 'IDs of journal entries';
$string['blogposttitle'] = ' Title of journal entry';
$string['blogs'] = 'Journals';
$string['blogscount'] = 'Number of journals';
$string['blogsids'] = 'IDs of Journals';
$string['blogtitle'] = 'Title of journal';
$string['businessnumber'] = 'Business phone number';
$string['city'] = 'Home city of the person';
$string['collections'] = 'Collections';
$string['collectionscount'] = 'Collections count';
$string['context_id'] = 'LTI context ID';
$string['context_label'] = 'LTI context label';
$string['context_title'] = 'LTI context title';
$string['context_type'] = 'LTI context type';
$string['country'] = 'Home country code of the person, such as AU or CZ';
$string['deleteuserid'] = 'ID of the person to delete';
$string['deleteusername'] = 'Username of the person to delete';
$string['displayname'] = 'Display name for person';
$string['displaytitle'] = 'Page display title';
$string['emailaddress'] = 'Email address of the person';
$string['emailvalid'] = 'A valid and unique email address';
$string['ext_lms'] = 'LTI external Learning Management System';
$string['ext_user_username'] = 'LTI external username';
$string['externalfullurl'] = 'Full URL path of the site where the submissions was made.';
$string['favourites'] = 'Favourites';
$string['favshortname'] = 'Favourites shortname';
$string['favsownerid'] = 'Owner ID of the favourites';
$string['favsownerusername'] = 'Username of the favourites owner';
$string['favuserid'] = 'Favourite person ID';
$string['favusername'] = 'Favourite username';
$string['faxnumber'] = 'Fax number';
$string['feedbacknotify'] = 'Comment notifications allowed: ';
$string['feedbacknotifyexplicit'] = 'Comment notifications';
$string['firstname'] = 'The first name(s) of the person';
$string['forcegroupcategory'] = 'Creates the group category if it does not already exist';
$string['forcepasswordchange'] = 'Forcing password change on first login';
$string['fullurl'] = 'Full URL';
$string['functiondocuri'] = 'Function documentation URI';
$string['functionname'] = 'Function name';
$string['groupcaneditroles'] = 'Edit roles allowed are: ';
$string['groupcategory'] = 'Group category - the title of an existing group category';
$string['groupdesc'] = 'Group description';
$string['grouphidden'] = 'Hide group';
$string['groupid'] = 'ID of the group';
$string['groupmemberactions'] = 'Group membership actions';
$string['groupmembership'] = 'Group membership';
$string['groupname'] = 'Group name';
$string['groupparticipationreports'] = 'Participation report';
$string['groupshortname'] = 'Group shortname for API only controlled groups';
$string['grouptype'] = 'Group type:';
$string['grouptypectrl'] = 'Controlled - Group administrators can add people to the group without their consent, and members cannot choose to leave';
$string['grouptypeopen'] = 'Open - People can join the group without approval from group administrators';
$string['grouptypepublic'] = 'Public group';
$string['grouptypereq'] = 'Request - People can send membership requests to group administrators';
$string['grouptypesubmitpage'] = 'Submit pages - Members can submit pages to the group';
$string['hidemembership'] = 'Hide membership';
$string['homenumber'] = 'Home phone number';
$string['icqnumber'] = 'ICQ Number';
$string['idownersubmitportfolio'] = 'Mahara ID of the person submitting their portfolio for assessment';
$string['industry'] = 'Industry';
$string['institution'] = 'Mahara institution';
$string['institutioncontextauthuser'] = 'The institution context of the authenticated person';
$string['institutionforctrlgroups'] = 'Mahara institution - required for API controlled groups';
$string['institutionnameauthuser'] = 'The institution full name context of the authenticated person';
$string['internal'] = 'internal';
$string['introduction'] = 'Introduction of the account owner';
$string['isacollection'] = 'Is a collection';
$string['iscollection'] = 'Does this Mahara ID represent a collection?';
$string['jabberusername'] = 'Jabber/XMPP username';
$string['lastname'] = 'The family name of the person';
$string['launch_presentation_locale'] = 'LTI local of launch presentation';
$string['launch_presentation_return_url'] = 'LTI launch presentation return URL';
$string['lis_person_contact_email_primary'] = 'LTI primary contact email';
$string['lis_person_name_family'] = 'LTI family name of person';
$string['lis_person_name_full'] = 'LTI full name of person';
$string['lis_person_name_given'] = 'LTI first name of person';
$string['lis_person_sourcedid'] = 'LTI source ID of persona';
$string['lock'] = 'Shall the submission be locked from editing?';
$string['locked'] = 'Locked';
$string['lti_message_type'] = 'LTI message type';
$string['lti_version'] = 'LTI version';
$string['mahara'] = 'Mahara';
$string['memberactionexplicit'] = 'Member action: add, or remove';
$string['memberrole'] = 'Member role: ';
$string['memberroleexplicit'] = 'Member role: admin, tutor, member';
$string['memberroleonlyadmin'] = 'Member role: admin ';
$string['memberuserid'] = 'Member ID';
$string['memberusername'] = 'Member username';
$string['mobilenumber'] = 'Mobile phone number';
$string['msnnumber'] = 'MSN Number';
$string['occupation'] = 'Occupation';
$string['officialwebsite'] = 'Official website of the person';
$string['owneremailsubmitportfolio'] = 'Email address of the person submitting their portfolio for assessment';
$string['passwordvalid'] = 'Must be at least 6 characters long. Must be different from the username';
$string['personalwebsite'] = 'Personal website';
$string['plaintxtpassword'] = 'Plain text password consisting of any characters';
$string['portfolioowneremail'] = 'Email address of the portfolio owner';
$string['portfolioownerid'] = 'Mahara ID of the portfolio owner';
$string['portfolioownerusername'] = 'Username of the portfolio owner';
$string['portfolioquery'] = 'Portfolio query filter to apply';
$string['portfolioremoteuser'] = 'Remote username of the portfolio owner';
$string['preferredname'] = 'The preferred name of the account owner';
$string['relativeurl'] = 'Relative URL';
$string['releaseremail'] = 'Email address of the person who releases this submission.';
$string['releaserid'] = 'ID of the person who releases this submission.';
$string['releaserremoteusername'] = 'Remote username of the person who releases this submission.';
$string['releaserusername'] = 'Username of the person who releases this submission.';
$string['remoteuser'] = 'Remote account owner';
$string['remoteuserid'] = 'Remote account owner ID';
$string['remoteusername'] = 'Remote username';
$string['remoteusersconnected'] = 'People Connected Remotely';
$string['remoteusersubmitportfolio'] = 'Remote username of the person submitting their portfolio for assessment';
$string['requestedapilvl'] = 'API level requested';
$string['resource_link_description'] = 'LTI resource link description';
$string['resource_link_id'] = 'LTI resource link ID';
$string['resource_link_title'] = 'LTI resource link title';
$string['roles'] = 'LTI roles';
$string['sitename'] = 'Site name';
$string['siteurl'] = 'Site URL';
$string['skypeusername'] = 'Skype username';
$string['socialprofilevalid'] = 'Social profile needs both the type and URL entered';
$string['storagequota'] = 'Option storage quota';
$string['streetaddress'] = 'Street address of the person';
$string['studentid'] = 'An arbitrary ID code number for the student';
$string['studentidinst'] = 'An arbitrary ID code number perhaps from the institution';
$string['submissionextid'] = 'External ID to which the submission relates.';
$string['submissionextname'] = 'External name to which the submission relates.';
$string['submittedtime'] = 'Time when submitted';
$string['tag'] = 'Tag';
$string['tags'] = 'Tags';
$string['tool_consumer_info_product_family_code'] = 'LTI tool consumer info product family code';
$string['tool_consumer_info_version'] = 'LTI tool consumer info version';
$string['tool_consumer_instance_guid'] = 'LTI tool consumer instance GUID';
$string['tool_consumer_instance_name'] = 'LTI tool consumer instance name';
$string['town'] = 'Home town of the person';
$string['user_id'] = 'LTI ID of person';
$string['useraddress'] = 'Address of the person';
$string['userfavs'] = 'The account owner\'s favourites';
$string['userid'] = 'ID of the account owner';
$string['useridsort'] = 'Ordering by ID. Eithe ascending [asc] or descending [desc]';
$string['username'] = 'Username of the account owner';
$string['usernamesubmitportfolio'] = 'Username of the person submitting their portfolio for assessment';
$string['usernamevalid'] = 'Between 3 and 30 characters long. Letters, numbers and most standard symbols are allowed';
$string['userresultslimit'] = 'Limit of the results';
$string['userresultsoffset'] = 'Offset of the results';
$string['usersautoadded'] = 'Auto-adding people';
$string['userstotalcount'] = 'Total number of results';
$string['view'] = 'A page';
$string['viewcollid'] = 'Collection ID of pages';
$string['viewcreatetime'] = 'Page creation time';
$string['viewdesc'] = 'Page description';
$string['viewfullurl'] = 'Full URL of the page';
$string['viewid'] = 'Page ID';
$string['viewidsubmit'] = 'Mahara ID of the page or collection that was submitted.';
$string['viewmodtime'] = 'Page modification time';
$string['viewnotify'] = 'Shared page notifications allowed: ';
$string['viewoutcomes'] = 'Outcomes associated with this portfolio';
$string['viewrelativeurl'] = 'Page relative URL';
$string['views'] = 'Pages';
$string['viewscount'] = 'Number of pages';
$string['viewsids'] = 'IDs of pages';
$string['viewtitle'] = 'Page title';
$string['viewtype'] = 'Page type';
$string['wwwroot'] = 'Client URN to distinguish remote lockers';
$string['yahoochat'] = 'Yahoo chat';
......@@ -27,7 +27,6 @@ require_once(get_config('docroot') . 'api/xmlrpc/lib.php');
safe_require('artefact', 'blog');
global $WEBSERVICE_OAUTH_USER;
/**
* Class container for core Mahara user related API calls
*/
......@@ -47,10 +46,10 @@ class mahara_blog_external extends external_api {
'users' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the blog owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, 'Username of the blog owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'remoteuser' => new external_value(PARAM_RAW, 'Remote username of the blog owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'email' => new external_value(PARAM_RAW, 'Email address of the blog owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'id' => new external_value(PARAM_NUMBER, get_string('blogownerid', WEBSERVICE_LANG), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, get_string('blogownerusername', WEBSERVICE_LANG), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'remoteuser' => new external_value(PARAM_RAW, get_string('blogownerremusername', WEBSERVICE_LANG), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'email' => new external_value(PARAM_RAW, get_string('blogowneremail', WEBSERVICE_LANG), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
)
)
)
......@@ -226,60 +225,60 @@ class mahara_blog_external extends external_api {
return new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the user'),
'username' => new external_value(PARAM_RAW, 'Username policy is defined in Mahara security config'),
'firstname' => new external_value(PARAM_NOTAGS, 'The first name(s) of the user'),
'lastname' => new external_value(PARAM_NOTAGS, 'The family name of the user'),
'email' => new external_value(PARAM_TEXT, 'An email address - allow email as root@localhost'),
'auth' => new external_value(PARAM_SAFEDIR, 'Auth plugins include manual, ldap, imap, etc'),
'studentid' => new external_value(PARAM_RAW, 'An arbitrary ID code number perhaps from the institution'),
'institution' => new external_value(PARAM_SAFEDIR, 'Mahara institution'),
'id' => new external_value(PARAM_NUMBER, get_string('blogownerid', WEBSERVICE_LANG)),
'username' => new external_value(PARAM_RAW, get_string('blogownerusername', WEBSERVICE_LANG)),
'firstname' => new external_value(PARAM_NOTAGS, get_string('firstname', WEBSERVICE_LANG)),
'lastname' => new external_value(PARAM_NOTAGS, get_string('lastname', WEBSERVICE_LANG)),
'email' => new external_value(PARAM_TEXT, get_string('blogowneremail', WEBSERVICE_LANG)),
'auth' => new external_value(PARAM_SAFEDIR, get_string('authplugins', WEBSERVICE_LANG)),
'studentid' => new external_value(PARAM_RAW, get_string('studentidinst', WEBSERVICE_LANG)),
'institution' => new external_value(PARAM_SAFEDIR, get_string('institution', WEBSERVICE_LANG)),
'blogs' => new external_single_structure(
array(
'count' => new external_value(PARAM_NUMBER, 'Blog count'),
'ids' => new external_value(PARAM_RAW, 'ids for blogs'),
'count' => new external_value(PARAM_NUMBER, get_string('blogscount', WEBSERVICE_LANG)),
'ids' => new external_value(PARAM_RAW, get_string('blogsids', WEBSERVICE_LANG)),
'data' =>
new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'Blog ID'),
'title' => new external_value(PARAM_RAW, 'Blog title'),
'description' => new external_value(PARAM_RAW, 'Blog description'),
'postcount' => new external_value(PARAM_INTEGER, 'Blogpost count'),
'mtime' => new external_value(PARAM_RAW, 'Blog modification time'),
'ctime' => new external_value(PARAM_RAW, 'Blog creation time'),
'locked' => new external_value(PARAM_BOOL, 'Locked'),
'owner' => new external_value(PARAM_INTEGER, 'Blog owner'),
'author' => new external_value(PARAM_INTEGER, 'Blog author'),
'allowcomments' => new external_value(PARAM_BOOL, 'Allow comments'),
'approvecomments' => new external_value(PARAM_BOOL, 'Approve comments'),
'id' => new external_value(PARAM_NUMBER, get_string('blogid', WEBSERVICE_LANG)),
'title' => new external_value(PARAM_RAW, get_string('blogtitle', WEBSERVICE_LANG)),
'description' => new external_value(PARAM_RAW, get_string('blogdesc', WEBSERVICE_LANG)),
'postcount' => new external_value(PARAM_INTEGER, get_string('blogpostcount', WEBSERVICE_LANG)),
'mtime' => new external_value(PARAM_RAW, get_string('blogmodtime', WEBSERVICE_LANG)),
'ctime' => new external_value(PARAM_RAW, get_string('blogcreatetime', WEBSERVICE_LANG)),
'locked' => new external_value(PARAM_BOOL, get_string('locked', WEBSERVICE_LANG)),
'owner' => new external_value(PARAM_INTEGER, get_string('blogowner', WEBSERVICE_LANG)),
'author' => new external_value(PARAM_INTEGER, get_string('blogauthor', WEBSERVICE_LANG)),
'allowcomments' => new external_value(PARAM_BOOL, get_string('allowcomments', WEBSERVICE_LANG)),
'approvecomments' => new external_value(PARAM_BOOL, get_string('approvecomments', WEBSERVICE_LANG)),
),
'A Blog')
get_string('blog', WEBSERVICE_LANG))
),
'blogposts' => new external_single_structure(
array(
'count' => new external_value(PARAM_NUMBER, 'Blogpost count'),
'ids' => new external_value(PARAM_RAW, 'ids for blogposts'),
'count' => new external_value(PARAM_NUMBER, get_string('blogpostcount', WEBSERVICE_LANG)),
'ids' => new external_value(PARAM_RAW, get_string('blogpostsids', WEBSERVICE_LANG)),
'data' =>
new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'Blogpost ID'),
'title' => new external_value(PARAM_RAW, 'Blogpost title'),
'description' => new external_value(PARAM_RAW, 'Blogpost description'),
'mtime' => new external_value(PARAM_RAW, 'Blogpost modification time'),
'ctime' => new external_value(PARAM_RAW, 'Blogpost creation time'),
'locked' => new external_value(PARAM_BOOL, 'Locked'),
'owner' => new external_value(PARAM_INTEGER, 'Blogpost owner'),
'author' => new external_value(PARAM_INTEGER, 'Blogpost author'),
'allowcomments' => new external_value(PARAM_BOOL, 'Allow comments'),
'approvecomments' => new external_value(PARAM_BOOL, 'Approve comments'),
'blogid' => new external_value(PARAM_INTEGER, 'Parent blog'),
'id' => new external_value(PARAM_NUMBER, get_string('blogpostid', WEBSERVICE_LANG)),
'title' => new external_value(PARAM_RAW, get_string('blogposttitle', WEBSERVICE_LANG)),
'description' => new external_value(PARAM_RAW, get_string('blogpostdesc', WEBSERVICE_LANG)),
'mtime' => new external_value(PARAM_RAW, get_string('blogpostmodtime', WEBSERVICE_LANG)),
'ctime' => new external_value(PARAM_RAW, get_string('blogpostcreatetime', WEBSERVICE_LANG)),
'locked' => new external_value(PARAM_BOOL, get_string('locked', WEBSERVICE_LANG)),
'owner' => new external_value(PARAM_INTEGER, get_string('blogpostowner', WEBSERVICE_LANG)),
'author' => new external_value(PARAM_INTEGER, get_string('blogpostauthor', WEBSERVICE_LANG)),
'allowcomments' => new external_value(PARAM_BOOL, get_string('allowcomments', WEBSERVICE_LANG)),
'approvecomments' => new external_value(PARAM_BOOL, get_string('approvecomments', WEBSERVICE_LANG)),
'blogid' => new external_value(PARAM_INTEGER, get_string('blogofparent', WEBSERVICE_LANG)),
),
'A Blogpost')
get_string('blogpost', WEBSERVICE_LANG))
),
), 'Blogposts')
), 'Blogs'),
), get_string('blogposts', WEBSERVICE_LANG))
), get_string('blogs', WEBSERVICE_LANG)),
)
)
);
......@@ -298,17 +297,17 @@ class mahara_blog_external extends external_api {
'blogposts' => new external_multiple_structure(
new external_single_structure(
array(
'owner' => new external_value(PARAM_INTEGER, 'Journal owner'),
'blogid' => new external_value(PARAM_INTEGER, 'Parent journal'),
'title' => new external_value(PARAM_RAW, 'Journal entry name'),
'description' => new external_value(PARAM_NOTAGS, 'Journal entry description'),
'draft' => new external_value(PARAM_BOOL, 'Journal entry in draft mode', VALUE_DEFAULT, '0'),
'allowcomments' => new external_value(PARAM_BOOL, 'Allow comments', VALUE_DEFAULT, '1'),
'owner' => new external_value(PARAM_INTEGER, get_string('blogowner', WEBSERVICE_LANG)),
'blogid' => new external_value(PARAM_INTEGER, get_string('blogofparent', WEBSERVICE_LANG)),
'title' => new external_value(PARAM_RAW, get_string('blogposttitle', WEBSERVICE_LANG)),
'description' => new external_value(PARAM_NOTAGS, get_string('blogpostdesc', WEBSERVICE_LANG)),
'draft' => new external_value(PARAM_BOOL, get_string('blogpostdraft', WEBSERVICE_LANG), VALUE_DEFAULT, '0'),
'allowcomments' => new external_value(PARAM_BOOL, get_string('allowcomments', WEBSERVICE_LANG), VALUE_DEFAULT, '1'),
'tags' => new external_multiple_structure(
new external_single_structure(
array(
'tag' => new external_value(PARAM_ALPHANUMEXT, 'Tag', VALUE_OPTIONAL),
), 'Tags')
'tag' => new external_value(PARAM_ALPHANUMEXT, get_string('tag', WEBSERVICE_LANG), VALUE_OPTIONAL),
), get_string('tags', WEBSERVICE_LANG))
),
)
)
......@@ -384,8 +383,8 @@ class mahara_blog_external extends external_api {
return new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_INT, 'Journal entry id'),
'title' => new external_value(PARAM_RAW, 'Journal entry name'),
'id' => new external_value(PARAM_INT, get_string('blogpostid', WEBSERVICE_LANG)),
'title' => new external_value(PARAM_RAW, get_string('blogposttitle', WEBSERVICE_LANG)),
)
)
);
......
......@@ -28,7 +28,6 @@ require_once(get_config('docroot') . 'lib/institution.php');
require_once(get_config('docroot') . 'lib/searchlib.php');
global $WEBSERVICE_OAUTH_USER;
/**
* Class container for core Mahara institution related API calls
*/
......@@ -75,12 +74,12 @@ class mahara_institution_external extends external_api {
public static function add_members_parameters() {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG)),
'users' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, 'Username of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'id' => new external_value(PARAM_NUMBER, get_string('favsownerid', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, get_string('favsownerusername', WEBSERVICE_LANG), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
)
)
)
......@@ -153,12 +152,12 @@ class mahara_institution_external extends external_api {
public static function invite_members_parameters() {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG )),
'users' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, 'Username of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'id' => new external_value(PARAM_NUMBER, get_string('favsownerid', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, get_string('favsownerusername', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
)
)
)
......@@ -232,12 +231,12 @@ class mahara_institution_external extends external_api {
public static function remove_members_parameters() {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG )),
'users' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, 'Username of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'id' => new external_value(PARAM_NUMBER, get_string('favsownerid', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, get_string('favsownerusername', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
)
)
)
......@@ -305,12 +304,12 @@ class mahara_institution_external extends external_api {
public static function decline_members_parameters() {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG )),
'users' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, 'Username of the favourites owner', VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'id' => new external_value(PARAM_NUMBER, get_string('favsownerid', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
'username' => new external_value(PARAM_RAW, get_string('favsownerusername', WEBSERVICE_LANG ), VALUE_OPTIONAL, null, NULL_ALLOWED, 'id'),
)
)
)
......@@ -379,7 +378,7 @@ class mahara_institution_external extends external_api {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG )),
)
);
}
......@@ -426,8 +425,8 @@ class mahara_institution_external extends external_api {
return new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the user'),
'username' => new external_value(PARAM_RAW, 'Username policy is defined in Mahara security config'),
'id' => new external_value(PARAM_NUMBER, get_string('userid', WEBSERVICE_LANG)),
'username' => new external_value(PARAM_RAW, get_string('username', WEBSERVICE_LANG)),
)
)
);
......@@ -443,7 +442,7 @@ class mahara_institution_external extends external_api {
return new external_function_parameters(
array(
'institution' => new external_value(PARAM_TEXT, 'Mahara institution'),
'institution' => new external_value(PARAM_TEXT, get_string('institution', WEBSERVICE_LANG )),
)
);
}
......@@ -501,8 +500,8 @@ class mahara_institution_external extends external_api {
return new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_NUMBER, 'ID of the user'),
'username' => new external_value(PARAM_RAW, 'Username policy is defined in Mahara security config'),
'id' => new external_value(PARAM_NUMBER, get_string('userid', WEBSERVICE_LANG )),
'username' => new external_value(PARAM_RAW, get_string('username', WEBSERVICE_LANG )),
)
)
);
......