]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes:
authornfreear <nfreear>
Wed, 8 Nov 2006 12:26:17 +0000 (12:26 +0000)
committernfreear <nfreear>
Wed, 8 Nov 2006 12:26:17 +0000 (12:26 +0000)
  - required_param calls - added parameter type.
  - put 'require' first.
  - use @header, added charset.
(Bug MDL-7380 "groups".)

21 files changed:
group/groupui/addgroupstogrouping-xml.php
group/groupui/addmembers-xml.php
group/groupui/createautomaticgrouping-xml.php
group/groupui/creategroup-form.html
group/groupui/creategroup-xml.php
group/groupui/creategrouping-xml.php
group/groupui/deletegroup-xml.php
group/groupui/deletegrouping-xml.php
group/groupui/editgroupingpermissions-xml.php
group/groupui/editgroupingsettings-xml.php
group/groupui/editgroupsettings-xml.php
group/groupui/getgroupingpermissions-xml.php
group/groupui/getgroupings-xml.php
group/groupui/getgroupingsettings-xml.php
group/groupui/getgroupsettings-xml.php
group/groupui/getgroupsingrouping-xml.php
group/groupui/getgroupsnotingrouping-xml.php
group/groupui/getmembers-xml.php
group/groupui/getnonmembers-xml.php
group/groupui/removegroupfromgrouping-xml.php
group/groupui/removemembers-xml.php

index 1aa682cb9387a8cd588002ce3863155cc4fa91f9..df01f5bc32f0c9e4ba20eab367a7fe886d30da54 100644 (file)
@@ -1,18 +1,22 @@
 <?php
-/**********************************************
- * Adds an existing group to a grouping
- **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
+/**
+ * Adds an existing group to a grouping.
+ *
+ * @copyright &copy; 2006 The Open University
+ * @author J.White AT open.ac.uk 
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package groups
+ */
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$courseid   = required_param('courseid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
-$groups = required_param('groups');
-$courseid = required_param('courseid', PARAM_INT);
+$groups     = required_param('groups', PARAM_SEQUENCE); //TODO: check.
 
 require_login($courseid);
        
index 210486472709bbefce803dc9a380d2ec61d8c3d4..2ec1bfaf491dfbc6a3bc6c20857696fd9b5b90ca 100644 (file)
@@ -2,17 +2,17 @@
 /**********************************************
  * Adds users to a group
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
-$groupid = required_param('groupid', PARAM_INT);
-$users = required_param('users');
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
 $courseid = required_param('courseid', PARAM_INT);
+$groupid  = required_param('groupid', PARAM_INT);
+$users    = required_param('users', PARAM_SEQUENCE);
 
 require_login($courseid);
        
index f0ea5a2d632fc8d9ad5107cd8a0da6122d7a1339..7154c80f1bfe23ad51292ada192cc444eae4127d 100644 (file)
@@ -3,30 +3,30 @@
  * Sets up an automatic grouping 
  **********************************************/
  
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
-
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
 require_login($courseid);
 
 groups_seed_random_number_generator();
 
-$courseid     = required_param('courseid', PARAM_INT);
+$courseid = required_param('courseid', PARAM_INT);
 
 $noofstudents   = required_param('noofstudents', PARAM_INT);
 $noofgroups     = required_param('noofgroups', PARAM_INT);
-$distribevenly  = required_param('distribevenly');
-$alphabetical   = required_param('alphabetical');
-$generationtype = required_param('generationtype');
+$distribevenly  = required_param('distribevenly', PARAM_INT); //TODO: PARAM_BOOL ?
+$alphabetical   = required_param('alphabetical', PARAM_INT);
+$generationtype = required_param('generationtype', PARAM_ALPHA);
 
-$groupingsettings->name =required_param('name');
-$groupingsettings->description = required_param('description');
+$groupingsettings->name = required_param('name', PARAM_ALPHANUM);
+$groupingsettings->description = required_param('description', PARAM_ALPHANUM);
 $groupingsettings->prefix = required_param('prefix');
 $groupingsettings->defaultgroupdescription = required_param('defaultgroupdescription');
+
        
 if (confirm_sesskey() and isteacheredit($courseid)) {
        if ($generationtype == 'nogroups') {
index 6df767ec7e35b208e1605edb35d4b2d81cff20fd..34e3dd896526ac06cad2c56f3db8fc0f269b032d 100644 (file)
@@ -1,20 +1,21 @@
 <div id="creategroupform" class="popup">
     <h3><?php print_string('creategroup', 'group'); ?> <span id="selectedgroupingforcreatinggroup"></span></h3>
     <form action="">
-        <p><?php print_string('groupname', 'groups');?></p>
+        <p><label for="newgroupname"><?php print_string('groupname', 'group'); ?></label></p>
         <p><input id="newgroupname" type="text" size="40" value="<?php print_string('defaultgroupname', 'group'); ?>" />
-        <p><?php print_string("groupingdescription", 'groups') ?><br />
+        <p><?php print_string('groupingdescription', 'group'); ?><br />
                     <?php helpbutton("text", get_string("helptext")) ?></p>
         <p><?php print_textarea($usehtmleditor, 5, 45, 200, 400, "newgroupdescription");?></p>
-        <p><?php print_string('enrolmentkey', 'groups') ?></p>
+        <p><?php print_string('enrolmentkey', 'group'); ?></p>
         <p><input type="text" id="newgroupenrolmentkey" size="25" /></p>
         <?php if ($printuploadpicture) {  ?>
-        <p><?php print_string('hidepicture', 'groups') ?></p>
-        <p><?php $options = NULL; $options[0] = get_string("no"); $options[1] = get_string("yes"); 
-                 choose_from_menu ($options, "newgrouphidepicture", $group->hidepicture, "");?>
-                ></p>
+        <p><?php print_string('hidepicture', 'group'); ?></p>
+        <p><?php $options = NULL; $options[0] = get_string("no");
+                 $options[1] = get_string("yes");
+                 $group->hidepicture = 1;  
+                 choose_from_menu ($options, "newgrouphidepicture", isset($group)? $group->hidepicture: 1, '');?></p>
 
-            <p><?php print_string("newpicture", 'groups') ?></p>
+            <p><?php print_string('newpicture', 'group'); ?></p>
             <p><?php upload_print_form_fragment(1,array('newgroupicon'),null,false,null,0,0,false);
                                     helpbutton("picture", get_string("helppicture"));
                                     print_string("maxsize", "", display_size($maxbytes), 'group'); ?>
index 4c9c6a55f54c62c98768e9a957fb912d26e174f5..95b3c86522bcb598cc9c09b094574c897d74b753 100644 (file)
@@ -2,20 +2,22 @@
 /**********************************************
  * Adds a new group to a grouping
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
+
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$courseid   = required_param('courseid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
 
-$groupsettings->name = required_param('groupname');
-$courseid = required_param('courseid', PARAM_INT);
-$groupsettings->description  = required_param('description');
-$groupsettings->enrolmentkey  = required_param('enrolmentkey', PARAM_ALPHANUM);
-$groupsettings->hidepicture = optional_param('hidepicture');
+$groupsettings->name        = required_param('groupname', PARAM_ALPHANUM);
+$groupsettings->description = required_param('description', PARAM_ALPHANUM);
+$groupsettings->enrolmentkey= required_param('enrolmentkey', PARAM_ALPHANUM);
+$groupsettings->hidepicture = optional_param('hidepicture', PARAM_INT);
+
 
 require_login($courseid);
        
index 112983731101631d03cfa494f3f3651fc54d0110..a3f9559c1d6f86ee2d4874ddb4b74dbce77c5483 100644 (file)
@@ -2,18 +2,18 @@
 /**********************************************
  * Adds a new grouping
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
-$courseid= required_param('courseid', PARAM_INT);
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$courseid = required_param('courseid', PARAM_INT);
 
-$groupingsettings->name =required_param('groupingname');
-$groupingsettings->description = required_param('description');
+$groupingsettings->name       = required_param('groupingname', PARAM_ALPHANUM);
+$groupingsettings->description= required_param('description', PARAM_ALPHANUM);
 
 require_login($courseid);
 
index 5b2fa8365091ca9f4dcb59e5257c7ba3dfb89be5..ab58ab02ad45cb9ec175277b0e28f20968487628 100644 (file)
@@ -2,14 +2,15 @@
 /**********************************************
  * Deletes a group
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
-$groupid = required_param('groupid', PARAM_INT);
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$groupid  = required_param('groupid', PARAM_INT);
 $courseid = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
index 058ef49134156aaacb23fcb1230da8611f8fa34c..d2ec1b54a18a4191c48528bef954d36c7f07f191 100644 (file)
@@ -3,15 +3,15 @@
  * Deletes a specified grouping
  **********************************************/
  
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
 $groupingid = required_param('groupingid', PARAM_INT);
-$courseid = required_param('courseid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
        
index d086a54dab16fff037be66fd1bc64a06f5515b05..5bcf2549567a2feb2a3edb173a2bcbcb39dcccf7 100644 (file)
@@ -2,22 +2,23 @@
 /**********************************************
  * Adds a new grouping
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
-$groupingid = required_param('groupingid');
-$courseid = required_param('courseid', PARAM_INT);
 
-$groupingsettings->viewowngroup = required_param('viewowngroup');
-$groupingsettings->viewallgroupsmembers = required_param('viewallgroupsmembers');
-$groupingsettings->viewallgroupsactivities = required_param('viewallgroupsactivities');
-$groupingsettings->teachersgroupmark = required_param('teachersgroupmark');
-$groupingsettings->teachersgroupview = required_param('teachersgroupview');
-$groupingsettings->teachersoverride = required_param('teachersoverride');
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$groupingid = required_param('groupingid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
+
+$groupingsettings->viewowngroup = required_param('viewowngroup', PARAM_INT); //TODO: PARAM_BOOL ??
+$groupingsettings->viewallgroupsmembers = required_param('viewallgroupsmembers', PARAM_INT);
+$groupingsettings->viewallgroupsactivities = required_param('viewallgroupsactivities', PARAM_INT);
+$groupingsettings->teachersgroupmark = required_param('teachersgroupmark', PARAM_INT);
+$groupingsettings->teachersgroupview = required_param('teachersgroupview', PARAM_INT);
+$groupingsettings->teachersoverride = required_param('teachersoverride', PARAM_INT);
 
 require_login($courseid);
        
index 2cbaf8e8efe6120984a90d5d635e8a62724f4691..97a467365979d6a240a25abc2fe65bc924b15eca 100644 (file)
@@ -2,18 +2,19 @@
 /**********************************************
  * Adds a new grouping
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
-$groupingid = required_param('groupingid');
-$courseid = required_param('courseid', PARAM_INT);
 
-$groupingsettings->name =required_param('groupingname');
-$groupingsettings->description = required_param('description');
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$groupingid = required_param('groupingid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
+
+$groupingsettings->name       = required_param('groupingname', PARAM_ALPHANUM);
+$groupingsettings->description= required_param('description', PARAM_ALPHANUM);
 
 require_login($courseid);
        
index 97d848ff4a13c19bdaae2371b08aad7de58f9a35..dff506c302907fa001d00fdea22fadb0e4e4f9c9 100644 (file)
@@ -3,18 +3,19 @@
  * Adds a new grouping
  **********************************************/
  
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
 require_once('../../config.php');
 require_once('../lib/lib.php');
-$groupid = required_param('groupid');
-$groupname = required_param('groupname');
-$description = required_param('description');
-$enrolmentkey = required_param('enrolmentkey');
-$hidepicture = required_param('hidepicture');
-$courseid = required_param('courseid', PARAM_INT);
+
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
+
+$groupid     = required_param('groupid', PARAM_INT);
+$groupname   = required_param('groupname', PARAM_ALPHANUM);
+$description = required_param('description', PARAM_ALPHANUM);
+$enrolmentkey= required_param('enrolmentkey', PARAM_ALPHANUM);
+$hidepicture = required_param('hidepicture', PARAM_INT); //TODO: PARAM_BOOL ??
+$courseid    = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
        
index a9df026f0835d27141707e89b9ed7bda84abad3f..4320343c5d05b37092886a03b8f6fe6d04fde0a9 100644 (file)
@@ -4,15 +4,14 @@
  * them in an XML format
  **********************************************/
  
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$courseid = required_param('courseid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
 
 require_login($courseid);
index 892e618125dd53b360d4ea822a7288863b559689..8a993026bd2378d59209a596019cc95c4abb58e0 100644 (file)
@@ -4,12 +4,12 @@
  * and returns them in an XML format
  **********************************************/
  
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
-require_once("../../config.php");
-require_once("../lib/lib.php");
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
 $courseid = required_param('courseid', PARAM_INT);
 
index 673d616506e1b792300c647969fbc469967c87ea..46af5ef8bafe1420328a2e22a8a09682bdc222c0 100644 (file)
@@ -3,16 +3,15 @@
  * Fetches the settings of a grouping and returns 
  * them in an XML format
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
 require_once('../../config.php');
 require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$courseid = required_param('courseid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
 
 require_login($courseid);
index cafd1626a1469ae2b8fb945f1e782d671c5db92f..86d36b781a3b8baad6a6a3307e18f4f6b089e751 100644 (file)
@@ -3,18 +3,17 @@
  * Fetches the settings of a grouping and returns 
  * them in an XML format
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-
-require_once("../../config.php");
-require_once("../lib/lib.php");
 
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
 $courseid = required_param('courseid', PARAM_INT);
-$groupid = required_param('groupid', PARAM_INT);
+$groupid  = required_param('groupid', PARAM_INT);
+
 require_login($courseid);
        
 if (confirm_sesskey() and isteacheredit($courseid)) {
index dd836422c3e0ffaabf067fecc428c1474136bbc8..60cd230718ac8f63cce03f37c8d16d9190153ba4 100644 (file)
@@ -2,15 +2,16 @@
 /**********************************************
  * Adds an existing group to a grouping
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
-require_once("../../config.php");
-require_once("../lib/lib.php");
+require_once('../../config.php');
+require_once('../lib/lib.php');
+
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
 $groupingid = required_param('groupingid', PARAM_INT);
-$courseid = required_param('courseid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
        
index 24ae334c932ac81bdd76aea6a3315d2167894744..de4c390c75953e9616babbd6f20ba28c810e487d 100644 (file)
@@ -3,15 +3,16 @@
  * Gets the groups not in a grouping for a course
  * and returns them in an XML format
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
-require_once("../lib/lib.php");
-require_once("../../config.php");
+require_once('../lib/lib.php');
+require_once('../../config.php');
+
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$groupingid = required_param('groupingid');
-$courseid = required_param('courseid');
+$groupingid = required_param('groupingid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
        
index 2f3d0c8aa555122961f189b84e98e7acb45c9871..7681d232febca1cc0d0e92248bb39def7641638b 100644 (file)
@@ -3,16 +3,15 @@
  * Gets the members of a group and returns them
  * in an XMl format
  **********************************************/
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
 
-require_once("../../config.php");
-require_once("../lib/lib.php");
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$groupid = required_param('groupid', PARAM_INT);
+$groupid  = required_param('groupid', PARAM_INT);
 $courseid = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
index c7ada79231d0279304e53e39c842751bf13cb19e..ac00e3f399fc9721a73f19bb65c3650c2439663d 100644 (file)
@@ -5,17 +5,17 @@
  * their detailsin an XML format. 
  **********************************************/
 
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
-require_once("../../config.php");
-require_once("../lib/lib.php");
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$groupid = required_param('groupid', PARAM_INT);
+$groupid    = required_param('groupid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
-$courseid = required_param('courseid', PARAM_INT);
-$showall = required_param('showall', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
+$showall    = required_param('showall', PARAM_INT);
 
 require_login($courseid);
        
index 888d945ffd07252622018946df496c098d7e245b..af8d1fae32835c58e9acf3287124662a5eeb4dd0 100644 (file)
@@ -4,16 +4,16 @@
  * (but does not delete the group)
  **********************************************/
 
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
-require_once("../../config.php");
-require_once("../lib/lib.php");
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$groupid = required_param('groupid', PARAM_INT);
+$groupid    = required_param('groupid', PARAM_INT);
 $groupingid = required_param('groupingid', PARAM_INT);
-$courseid = required_param('courseid', PARAM_INT);
+$courseid   = required_param('courseid', PARAM_INT);
 
 require_login($courseid);
        
index eb565fc661b348974044f5863c21a4aea84e3852..5817e14794a69f7ed021de635503e755073399d2 100644 (file)
@@ -1,20 +1,19 @@
 <?php
-
 /**********************************************
  * Takes a groupid and comma-separated list of 
  * userids, and removes each of those userids 
  * from the specified group
  **********************************************/
 
-header("Content-Type: text/xml");
-echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
-echo '<groupsresponse>';
+require_once('../../config.php');
+require_once('../lib/lib.php');
 
-require_once("../../config.php");
-require_once("../lib/lib.php");
+@header('Content-Type: text/xml; charset=utf-8');
+echo '<?xml version="1.0" encoding="utf-8"?>';
+echo '<groupsresponse>';
 
-$groupid = required_param('groupid', PARAM_INT);
-$users = required_param('users');
+$groupid  = required_param('groupid', PARAM_INT);
+$users    = required_param('users', PARAM_SEQUENCE);
 $courseid = required_param('courseid', PARAM_INT);
 
 require_login($courseid);