Non-core contributed modules

delete repeated booking

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.8
  • Component/s: Block: Mrbs
  • Labels:
    None
  • Environment:
    Moodle 1.9.5+ (Build: 20090812)
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Did We lose the possibility to delete a repeated booking?
I had to delete the repeated entries one by one...

I'm Using: block_mrbs.php,v 1.10 2009/06/19.

  1. block_mrbs.php
    07/Oct/09 11:44 PM
    22 kB
    Jean-Pierre Pawlak
  1. mrbs.jpg
    95 kB
    07/Oct/09 11:42 PM

Activity

Hide
Anthony Borrow added a comment -

Jean-Pierre - Let's start by ruling out the new line problem. Could you attach your /blocks/mrbs/lang/xx_utf8/block_mrbs.php for the language you are using and having trouble with. Also, it would be nice to have a screen shot of the problem (in other words of the screen where you would have expected the delete series button or link to appear. Peace - Anthony

Show
Anthony Borrow added a comment - Jean-Pierre - Let's start by ruling out the new line problem. Could you attach your /blocks/mrbs/lang/xx_utf8/block_mrbs.php for the language you are using and having trouble with. Also, it would be nice to have a screen shot of the problem (in other words of the screen where you would have expected the delete series button or link to appear. Peace - Anthony
Hide
Jean-Pierre Pawlak added a comment - - edited

Screenshot delete booking.
There is no option 'delete series'.

Show
Jean-Pierre Pawlak added a comment - - edited Screenshot delete booking. There is no option 'delete series'.
Hide
Jean-Pierre Pawlak added a comment - - edited

Let's keep it simple:
I used the file in file /mrbs/lang/en_utf8 for the screenshot.
The dutch language file shows the same delete option.

I compared to last year version
(block_mrbs.php,v 1.4 2008/08/07)

There is a $string['deleteseries'] = 'Delete Series';
in both language files.

Show
Jean-Pierre Pawlak added a comment - - edited Let's keep it simple: I used the file in file /mrbs/lang/en_utf8 for the screenshot. The dutch language file shows the same delete option. I compared to last year version (block_mrbs.php,v 1.4 2008/08/07) There is a $string['deleteseries'] = 'Delete Series'; in both language files.
Hide
jlpicard2 added a comment -

I am having the same problem. There are no options to delete or edit the series once created. I had to go to the extreme of deleting an entire lab to delete all the repeated occurrences. As it is right now, you have to be very careful not to make any mistakes when putting in a repeating schedule.

Moodle 1.9.5+ (Build: 20090826), with the latest version of MRBS block downloaded and installed this week. I am using the English language.

Show
jlpicard2 added a comment - I am having the same problem. There are no options to delete or edit the series once created. I had to go to the extreme of deleting an entire lab to delete all the repeated occurrences. As it is right now, you have to be very careful not to make any mistakes when putting in a repeating schedule. Moodle 1.9.5+ (Build: 20090826), with the latest version of MRBS block downloaded and installed this week. I am using the English language.
Hide
Anthony Borrow added a comment -

Thanks for sharing your experience - I've added Mike Worth so that we can work on getting this working again. Peace - Anthony

Show
Anthony Borrow added a comment - Thanks for sharing your experience - I've added Mike Worth so that we can work on getting this working again. Peace - Anthony
Hide
Anthony Borrow added a comment -

Mike - It looks like you have changed the behavior of what happens when a user clicks on an entry. Previously it was taking folks to a page to view the entry (view_entry.php) and now it takes them directly to edit (edit_entry). I suspect this is more direct; however, it does make it easier for someone to inadvertently change something. I do not recall if this was discussed or not but I wanted to note the change in behavior. Now I will start looking at edit_entry and see why an option for delete series is not provided. Peace - Anthony

Show
Anthony Borrow added a comment - Mike - It looks like you have changed the behavior of what happens when a user clicks on an entry. Previously it was taking folks to a page to view the entry (view_entry.php) and now it takes them directly to edit (edit_entry). I suspect this is more direct; however, it does make it easier for someone to inadvertently change something. I do not recall if this was discussed or not but I wanted to note the change in behavior. Now I will start looking at edit_entry and see why an option for delete series is not provided. Peace - Anthony
Hide
Anthony Borrow added a comment -

Mike - I am going to assign this to you. I took a quick look and noticed that $series was not declared as an optional param at the beginning of edit_entry.php:

$series = optional_param('series', 0, PARAM_INT);

so the current checks of:

if( ! $series )

if($repeat_id)

if($repeat_id || $series )

have no meaning since $series is not defined. Also $repeat_id is not defined as it is in view_entry.php

$repeat_id = $row[11];

so currently the code to create the various links is not going to work. Do you have time to clean that up? If not, re-assign the issue to me.

The rest of this month is a bit crazy for me as I will be traveling tomorrow. Essentially I will not be able to do much until after November. Thanks again for your help in maintaining and moving this code forward.

Peace - Anthony

Show
Anthony Borrow added a comment - Mike - I am going to assign this to you. I took a quick look and noticed that $series was not declared as an optional param at the beginning of edit_entry.php: $series = optional_param('series', 0, PARAM_INT); so the current checks of: if( ! $series ) if($repeat_id) if($repeat_id || $series ) have no meaning since $series is not defined. Also $repeat_id is not defined as it is in view_entry.php $repeat_id = $row[11]; so currently the code to create the various links is not going to work. Do you have time to clean that up? If not, re-assign the issue to me. The rest of this month is a bit crazy for me as I will be traveling tomorrow. Essentially I will not be able to do much until after November. Thanks again for your help in maintaining and moving this code forward. Peace - Anthony
Hide
Anthony Borrow added a comment -

I'm also bumping the priority of this to major since it is a major loss of function.

Show
Anthony Borrow added a comment - I'm also bumping the priority of this to major since it is a major loss of function.
Hide
jlpicard2 added a comment -

This comment on CONTRIB-1528 "MRBS Entry can not be deleted" by Eric S. Wei at 29/Sep/09 12:51 AM seems to be a workaround to get series deleting working again.

http://tracker.moodle.org/browse/CONTRIB-1528?focusedCommentId=74876&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_74876

"I comment out

574 // if($repeat_id)

578 // if($repeat_id || $series )

in edit_entry.php

so the user can do series deleting."

The link to delete series appears whether it is a series or not, but it works. The edit_entry.php in question is under moodle/blocks/mrbs/web. I believe this workaround is crucial to anyone who is trying to use mrbs with repeated items.

Show
jlpicard2 added a comment - This comment on CONTRIB-1528 "MRBS Entry can not be deleted" by Eric S. Wei at 29/Sep/09 12:51 AM seems to be a workaround to get series deleting working again. http://tracker.moodle.org/browse/CONTRIB-1528?focusedCommentId=74876&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_74876 "I comment out 574 // if($repeat_id) 578 // if($repeat_id || $series ) in edit_entry.php so the user can do series deleting." The link to delete series appears whether it is a series or not, but it works. The edit_entry.php in question is under moodle/blocks/mrbs/web. I believe this workaround is crucial to anyone who is trying to use mrbs with repeated items.
Hide
Anthony Borrow added a comment -

Rather than commenting out the checks, let's try to get it working properly again. I'll setup a test instance and see what we can do. Peace - Anthony

Show
Anthony Borrow added a comment - Rather than commenting out the checks, let's try to get it working properly again. I'll setup a test instance and see what we can do. Peace - Anthony
Hide
Anthony Borrow added a comment -

I have cleaned up some of the whitespacing to make a few files more readable. I did not like the logic about how to determine when an entry was part of a series or not. I did not see a reason why $rep_id which comes directly from the mrbs_entry table could not be used. From what I can tell the recently applied patches resolves the issue. Please test thoroughly and let me know if we need to re-open this issue. For now I am marking it as resolved. Peace - Anthony

Show
Anthony Borrow added a comment - I have cleaned up some of the whitespacing to make a few files more readable. I did not like the logic about how to determine when an entry was part of a series or not. I did not see a reason why $rep_id which comes directly from the mrbs_entry table could not be used. From what I can tell the recently applied patches resolves the issue. Please test thoroughly and let me know if we need to re-open this issue. For now I am marking it as resolved. Peace - Anthony
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: