[Mahara-contributors] [Bug 1361612] [NEW] Email validation after CAS login
Public bug reported: When a user is logged in for the first time through CAS and he doesn't exist in the system, some data is required from him (Name, Last name and e-mail). These bring some problems: A) I think that data should be automatically retrieved from the LDAP folder. B) The validation e-mail never arrives. C) When a validation e-mail doesn't arrive there's not a button for resending it. D) Even if it were, there should ALSO be a button to change your email adress, just in case you misspelled it. ** Affects: mahara Importance: Undecided Status: New ** Tags: cas email user validation -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1361612 Title: Email validation after CAS login Status in Mahara ePortfolio: New Bug description: When a user is logged in for the first time through CAS and he doesn't exist in the system, some data is required from him (Name, Last name and e-mail). These bring some problems: A) I think that data should be automatically retrieved from the LDAP folder. B) The validation e-mail never arrives. C) When a validation e-mail doesn't arrive there's not a button for resending it. D) Even if it were, there should ALSO be a button to change your email adress, just in case you misspelled it. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1361612/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1359109] [NEW] Fail deleting long name groups
Public bug reported: When you delete a group, it concatenates '.deleted.'.time() that is about 19 characters. Hence, if your group name is longer than 108 characters it will throw a DB exception for exceeding the 128 characters field for the group name. To avoid this, I've added the following code to function group_delete($groupid, $shortname=null, $institution=null, $notifymembers=true): //Daniel Parejo $delete_name = $group-name; if (strlen($delete_name) 100) { $delete_name = substr($delete_name, 0, 100) . '(...)'; } //End added code update_record('group', array( 'deleted' = 1, 'name' = $delete_name . '.deleted.' . time(), //modified code 'shortname' = null, 'institution' = null, 'category' = null, 'urlid' = null, ), array( 'id' = $group-id, ) ); db_commit(); This solution is not perfect since it will fail if two groups that are not different in their 101 first characters are tried to be removed in the same time instant. Still, way better than before, though I think a more solid solution should be implemented. ** Affects: mahara Importance: Undecided Status: New ** Tags: db delete group groups ** Description changed: When you delete a group, it concatenates '.deleted.'.time() that is about 19 characters. Hence, if your group name is longer than 108 characters it will throw a DB exception for exceeding the 128 characters field for the group name. To avoid this, I've added the following code to function group_delete($groupid, $shortname=null, $institution=null, $notifymembers=true): //Daniel Parejo - $delete_name = $group-name; - if (strlen($delete_name) 100) { - $delete_name = substr($delete_name, 0, 100) . '(...)'; - } + $delete_name = $group-name; + if (strlen($delete_name) 100) { + $delete_name = substr($delete_name, 0, 100) . '(...)'; + } //End added code - update_record('group', - array( - 'deleted' = 1, - 'name' = $delete_name . '.deleted.' . time(), //modified code - 'shortname' = null, - 'institution' = null, - 'category' = null, - 'urlid' = null, - ), - array( - 'id' = $group-id, - ) - ); - db_commit(); + update_record('group', + array( + 'deleted' = 1, + 'name' = $delete_name . '.deleted.' . time(), //modified code + 'shortname' = null, + 'institution' = null, + 'category' = null, + 'urlid' = null, + ), + array( + 'id' = $group-id, + ) + ); + db_commit(); - - This solution is not perfect since it will fail if two groups that are not different in their 101 first characters are tried to remove in the same time instant. Still, way better than before, though I think a more solid solution should be implemented. + This solution is not perfect since it will fail if two groups that are + not different in their 101 first characters are tried to be removed in + the same time instant. Still, way better than before, though I think a + more solid solution should be implemented. ** Tags added: groups -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1359109 Title: Fail deleting long name groups Status in Mahara ePortfolio: New Bug description: When you delete a group, it concatenates '.deleted.'.time() that is about 19 characters. Hence, if your group name is longer than 108 characters it will throw a DB exception for exceeding the 128 characters field for the group name. To avoid this, I've added the following code to function group_delete($groupid, $shortname=null, $institution=null, $notifymembers=true): //Daniel Parejo $delete_name = $group-name; if (strlen($delete_name) 100) { $delete_name = substr($delete_name, 0, 100) . '(...)'; } //End added code update_record('group', array( 'deleted' = 1, 'name' = $delete_name . '.deleted.' . time(), //modified code 'shortname' = null, 'institution' = null, 'category' = null, 'urlid' = null, ), array( 'id' = $group-id, ) ); db_commit(); This solution is not perfect since it will fail if two groups that are not different in their 101 first characters are tried to be removed in the same time instant. Still, way better than before, though I think a more solid solution should be implemented. To manage notifications
[Mahara-contributors] [Bug 1355761] [NEW] Group_update doesn't create groups
Public bug reported: Mahara version 1.9.1: According to the doc: /** * Update details of an existing group. * * @param array $new New values for the group table. * @param bool $create Create the group if it doesn't exist yet */ function group_update($new, $create=false) the $create boolean determines if Mahra should create the group if the id provided doesn't match any other but everytime it doesnt find one, it directly throws the group_update: group not found I think it's because the following code: if (!empty($new-id)) { $old = get_record_select('group', 'id = ? AND deleted = 0', array($new-id)); } else if (!empty($new-institution) isset($new-shortname) strlen($new-shortname)) { $old = get_record_select( 'group', 'shortname = ? AND institution = ? AND deleted = 0', array($new-shortname, $new-institution) ); if (!$old $create) { return group_create((array)$new); } } if (!$old) { throw new NotFoundException(group_update: group not found); } should look like this: if (!empty($new-id)) { $old = get_record_select('group', 'id = ? AND deleted = 0', array($new-id)); } else if (!empty($new-institution) isset($new-shortname) strlen($new-shortname)) { $old = get_record_select( 'group', 'shortname = ? AND institution = ? AND deleted = 0', array($new-shortname, $new-institution) ); } if (!$old $create) { return group_create((array)$new); } if (!$old) { throw new NotFoundException(group_update: group not found); } with the if (!$old $create) conditional OUT of the previous one. I tried it and it works fine now. Also, I don't know if this is another bug or intentional but, when an id is provided, and create is true, shouldn't it create it with the ID PROVIDED, instead of an arbitrary one? Because right now it gives you an arbitrary one (since that's what group_create() does). ** Affects: mahara Importance: Undecided Status: New ** Tags: db group -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1355761 Title: Group_update doesn't create groups Status in Mahara ePortfolio: New Bug description: Mahara version 1.9.1: According to the doc: /** * Update details of an existing group. * * @param array $new New values for the group table. * @param bool $create Create the group if it doesn't exist yet */ function group_update($new, $create=false) the $create boolean determines if Mahra should create the group if the id provided doesn't match any other but everytime it doesnt find one, it directly throws the group_update: group not found I think it's because the following code: if (!empty($new-id)) { $old = get_record_select('group', 'id = ? AND deleted = 0', array($new-id)); } else if (!empty($new-institution) isset($new-shortname) strlen($new-shortname)) { $old = get_record_select( 'group', 'shortname = ? AND institution = ? AND deleted = 0', array($new-shortname, $new-institution) ); if (!$old $create) { return group_create((array)$new); } } if (!$old) { throw new NotFoundException(group_update: group not found); } should look like this: if (!empty($new-id)) { $old = get_record_select('group', 'id = ? AND deleted = 0', array($new-id)); } else if (!empty($new-institution) isset($new-shortname) strlen($new-shortname)) { $old = get_record_select( 'group', 'shortname = ? AND institution = ? AND deleted = 0', array($new-shortname, $new-institution) ); } if (!$old $create) { return group_create((array)$new); } if (!$old) { throw new NotFoundException(group_update: group not found); } with the if (!$old $create) conditional OUT of the previous one. I tried it and it works fine now. Also, I don't know if this is another bug or intentional but, when an id is provided, and create is true, shouldn't it create it with the ID PROVIDED, instead of an arbitrary one? Because right now it gives you an arbitrary one (since that's what group_create() does). To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1355761/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe :
[Mahara-contributors] [Bug 547387] Re: Can't create two groups with the same name
Using Mahara 1.9.1 I can't create two groups with the same name (via PHP code). Is this the intented behaviour, because I can't find a reason to. -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/547387 Title: Can't create two groups with the same name Status in Mahara ePortfolio: Fix Released Bug description: When you try this, Mahara triggers an exception. It's not being validated properly when trying to add a group, and presumably when editing a group too. What should be the behaviour here? * Allow more than one group with the same name? * Don't allow it, but validate this properly? This bug was imported from eduforge.org, see: https://eduforge.org/tracker/index.php?func=detailaid=1752group_id=176atid=739 To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/547387/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp