Details
-
Type:
New Feature
-
Status:
Development in progress
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9, 1.9.1
-
Fix Version/s: 2.0.8
-
Component/s: Block: Backadel
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
As I understand the situation, folks working with Jeff Churchill developed upload and download course utilities and this Tracker item refers to the download utility which I believe was posted to the forums here by Chad after he did some additional work on it. http://moodle.org/mod/forum/discuss.php?d=96736
As utilities I was wondering whether the upload and delete should maybe be integrated into one package, but one way or the other the bulk delete utility should be added to M&P and someone identified as at least nominal maintainer....
the discussion in the forums is getting way too confusing and it will be helpful if all references to these tools from hereon in point to M&P.
I think both of these in some format are likely candidates for 2.0 inclusion if that has not been accomplished already.
Attachments
-
$i18n.getText("admin.common.words.hide")
- backadel.zip
- 03/Oct/08 9:06 PM
- 98 kB
- Robert Russo
-
- backadel/.DS_Store 6 kB
- __MACOSX/backadel/._.DS_Store 0.1 kB
- backadel/.svn/all-wcprops 3 kB
- backadel/.svn/entries 3 kB
- backadel/.svn/format 0.0 kB
- backadel/.svn/prop-base/add.png.svn-base 0.1 kB
- backadel/.svn/.../delete.png.svn-base 0.1 kB
- backadel/.svn/.../README.jpg.svn-base 0.1 kB
- backadel/.svn/text-base/add.png.svn-base 1.0 kB
- backadel/.svn/.../backup.js.svn-base 2 kB
- backadel/.svn/.../backup.php.svn-base 4 kB
- backadel/.../block_backadel.php.svn-base 4 kB
- backadel/.svn/.../bulk_delete.js.svn-base 0.1 kB
- backadel/.svn/.../bulk_delete.php.svn-base 1 kB
- backadel/.../bulk_delete_commit.php.svn-base 2 kB
- backadel/.../bulk_delete_preview.php.svn-base 2 kB
- backadel/.svn/.../config.php.svn-base 6 kB
- backadel/.svn/.../delete.js.svn-base 1.0 kB
- backadel/.svn/.../delete.php.svn-base 3 kB
- backadel/.svn/.../delete.png.svn-base 1.0 kB
- backadel/.svn/.../failed.js.svn-base 1 kB
- backadel/.svn/.../failed.php.svn-base 3 kB
- backadel/.svn/.../index.js.svn-base 5 kB
- backadel/.svn/.../index.php.svn-base 4 kB
- backadel/.svn/text-base/lib.php.svn-base 6 kB
- backadel/.svn/.../README.jpg.svn-base 8 kB
- backadel/.svn/.../README.txt.svn-base 2 kB
- backadel/.svn/.../results.js.svn-base 1.0 kB
- backadel/.svn/.../results.php.svn-base 3 kB
- backadel/.svn/.../send_job.php.svn-base 3 kB
-
$i18n.getText("admin.common.words.hide")
- Backup_and_Restore.zip
- 26/Jan/11 12:19 AM
- 66 kB
- Robert Russo
-
- backadel/add.png 1.0 kB
- backadel/backup.js 2 kB
- backadel/backup.php 5 kB
- backadel/block_backadel.php 5 kB
- backadel/bulk_delete.js 0.1 kB
- backadel/bulk_delete.php 1 kB
- backadel/bulk_delete_commit.php 2 kB
- backadel/bulk_delete_preview.php 2 kB
- backadel/config.php 5 kB
- backadel/db/install.xml 3 kB
- backadel/db/upgrade.php 2 kB
- backadel/delete.js 1.0 kB
- backadel/delete.php 3 kB
- backadel/delete.png 1.0 kB
- backadel/delete_queries.php 3 kB
- backadel/failed.js 1 kB
- backadel/failed.php 3 kB
- backadel/index.js 5 kB
- backadel/index.php 4 kB
- backadel/lang/en_utf8/block_backadel.php 5 kB
- backadel/lang/.../backadel/backadel.html 0.0 kB
- backadel/lang/.../backadel/backup.html 0.3 kB
- backadel/lang/.../backup_job_sent.html 0.0 kB
- backadel/lang/.../backadel/build_query.html 0.6 kB
- backadel/lang/.../backadel/job_sent.html 0.2 kB
- backadel/lang/.../saved_searches.html 0.2 kB
- backadel/lang/.../search_results.html 0.4 kB
- backadel/large_backups.php 2 kB
- backadel/lib.php 6 kB
- backadel/README.jpg 8 kB
$i18n.getText("admin.common.words.show")- Backup_and_Restore.zip
- 26/Jan/11 12:19 AM
- 66 kB
- Robert Russo
-
$i18n.getText("admin.common.words.hide")
- delete_course_for_1.9-v1.1.zip
- 03/Sep/08 10:53 AM
- 5 kB
- Anthony Borrow
-
- delete_course_for_1.9-v1.1/.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
- delete_course_for_1.9-v1.1/deletecourses.php 7 kB
- __MACOSX/.../._deletecourses.php 0.1 kB
- delete_course_for_1.9-v1.1/README 0.4 kB
- __MACOSX/.../._README 0.1 kB
- delete_course_for_1.9-v1.1/testdeletecourse.txt 0.3 kB
$i18n.getText("admin.common.words.show")- delete_course_for_1.9-v1.1.zip
- 03/Sep/08 10:53 AM
- 5 kB
- Anthony Borrow
-
$i18n.getText("admin.common.words.hide")
- simple_restore.zip
- 03/Oct/08 9:09 PM
- 55 kB
- Robert Russo
-
- simple_restore/.svn/all-wcprops 1 kB
- simple_restore/.svn/entries 1 kB
- simple_restore/.svn/format 0.0 kB
- simple_restore/.svn/.../loading.gif.svn-base 0.1 kB
- simple_restore/.../block_simple_restore.php.svn-base 4 kB
- simple_restore/.svn/.../config.php.svn-base 4 kB
- simple_restore/.../config_form.php.svn-base 6 kB
- simple_restore/.svn/.../list.php.svn-base 9 kB
- simple_restore/.svn/.../loading.gif.svn-base 3 kB
- simple_restore/.svn/.../restore.php.svn-base 6 kB
- simple_restore/.../settings.php.svn-base 0.5 kB
- simple_restore/.svn/.../styles.php.svn-base 3 kB
- simple_restore/block_simple_restore.php 4 kB
- simple_restore/config.php 4 kB
- simple_restore/config_form.php 6 kB
- simple_restore/db/.svn/all-wcprops 0.3 kB
- simple_restore/db/.svn/entries 0.5 kB
- simple_restore/db/.svn/format 0.0 kB
- simple_restore/db/.../access.php.svn-base 1.0 kB
- simple_restore/db/.../install.xml.svn-base 0.9 kB
- simple_restore/db/access.php 1.0 kB
- simple_restore/db/install.xml 0.9 kB
- simple_restore/lang/.svn/all-wcprops 0.1 kB
- simple_restore/lang/.svn/entries 0.3 kB
- simple_restore/lang/.svn/format 0.0 kB
- simple_restore/lang/.../.svn/all-wcprops 0.3 kB
- simple_restore/lang/en_utf8/.svn/entries 0.4 kB
- simple_restore/lang/en_utf8/.svn/format 0.0 kB
- simple_restore/.../block_simple_restore.php.svn-base 1 kB
- simple_restore/.../block_simple_restore.php 1 kB
Issue Links
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Marc - I'm trying to get all the code in one place so we can start pulling it together. The first thing that stood out to me as that it was using the deprecated isadmin function rather than capabilities. Which do you think is more functional, deleting from some text /CSV file or having the ability to filter and select courses similar to how bulk user actions are handled. I would want to verify that the basic methodology used for deleting the courses is consistent with how the courses are deleted individually and/or when deleted by Moodle as a result of a deleted category. Let me know your thoughts. Peace - Anthony
1) I see no reason why we can't have apples AND oranges, especially where use of categories is not available in 1.8
2) I am just acting as an accommodation party here in that I have seen dozens and dozens of posts in the forum on the bulk add and delete course utilities and because of the nature of the forums they actually do more harm than good in some respects.....
3) Robert Russo (http://moodle.org/user/view.php?id=141420&course=5) is the person who has been most active on this in the forum. I posted to him here about this tracker item:
http://moodle.org/mod/forum/discuss.php?d=82932&parent=464301
AT a minimum I think we need to disambiguate among the various offerings referenced in the forum
Here is the backup and delete solution we are using at LSU. We have incorporated basic file upload bulk delete functionality as well.
Features include:
The ability to search for courses with a complex query builder
The ability to save those queries for future use
Backups are completed during the next cron run
Errors are logged
Bulk and other Deletes are done when requested and viewable via a live updating screen
This application can be combined with our simple restore block which limits what instructors can do during restore as well as allows them to access their courses that were backed up by the backadel system.
This is the simple restore block that works with backadel.
They can exist independently of one another or work in conjunction.
Restore options are configurable by the system admin
You can now limit instructor's ability to restore courses WITHOUT users! (great if you are being charged per student)
We use this on 2 systems, one hosted for teaching and one locally for grade disputes. Each has a different setup and allows for single click operation.
We have only used this system with our theme. Please send any visual anomalies in other themes to me so I can fix them.
Please let me know if you have any suggestions to make this better.
Thank you Robert!
Have you discussed with Anthony his questions (see above) vis-a-vis maintaining an M&P page for this package/incorporation of funtionality in Moodle 2?
We would love to maintain it (we have to already for our use, might as well for for the whole community), I am emailing Anthony now.
Robert - Minor issues but things to be improved upon once we get this added to CVS. When testing the backup and delete block, I came across the following issues after creating a query:
1) Notice: Undefined index: type in /home/arborrow/Moodle/code/contrib-605/lib/weblib.php on line 3815
(I would suggest adding type to the $nav array - my guess would be that the type would simply be 'title' as this is admitted not well documented in the build_navigation function. In addition, I have filed MDL-16939 as I think this should be checked for first. Actually, I've checked in a patch from MDL-16939 so this can be considered a recommendation but with the latest Moodle 1.9 and HEAD you should not have a problem.
2) Notice: Undefined index: search_terms in /home/arborrow/Moodle/code/contrib-605/blocks/backadel/results.php on line 61
Skimming the code, should line 60 be:
if (substr($key, 3, 11) == 'search_terms') {
instead of the singular:
if (substr($key, 3, 11) == 'search_term') {
Peace - Anthony
Also on the same page when building a query based on shortname I received:
Warning: Invalid argument supplied for foreach() in /home/arborrow/Moodle/code/contrib-605/blocks/backadel/results.php on line 100
Also for your consideration, when building a query I would be tempted to make the default contains rather than is so if I were looking for History courses I could use something like HS. I think in searching we are more accustomed to finding things that contain the string as opposed to an exact match.
On the page: http://localhost/moodle/contrib-605/blocks/backadel/backup.php after I have a set of course returned it would be could to have a select all/select none option perhaps in the header above the select boxes or below the table.
When defining the navigation links it appears that you need to add $CFG->wwwroot to them otherwise they may be broken links. For example, I changed /blocks/backadel/index.php line 21 to:
'link' => $CFG->wwwroot.'/blocks/backadel',
instead of
'link' => /blocks/backadel',
because I was getting http://localhost/blocks/backadel as the link rather than the intended http://localhost/moodle/contrib-605/blocks/backadel
this applies to:
backup.php
bulk_delete_commit.php
bulk_delete.php
config.php
delete.php
failed.php
index.php
results.php
send_job.php
based on a quick search for:
'link' =>
Peace - Anthony
OK - I just found the select all/none options, my eyes just overlooked them earlier. I notice that after scheduling a back up it claims that it will start with an hour. Technically speaking, it will start with the next cron job and Moodle does not know how often that is. I would think it would be better to say that it will start when the next cron job starts even if a user does not understand what a cron job is.
I just realized that Robert was not watching this issue so I have added him to it. I am marking as resolved after having added the code submitted by Robert to contrib/plugins/blocks/backadel. I need Robert to apply for CVS write access at http://moodle.org/cvs so that I can assign him access to contrib/plugins/blocks/backadel. Let me know if there are any other questions or anything else I can do for this block. Thanks again to Robert and the team at LSU for their fine work on this new block. I've made various suggestions as I was reviewing it. Peace - Anthony
Robert - In addition to uploading the code, I created a component in the tracker and bumped your privileges so that you can manage issues related to the backadel block. Any issues assigned to the Block: Backadel component will automatically be assigned to you. Peace - Anthony
Marc - In order to get the upload and delete blocks together I need to get MDLSITE-411 resolved so that we can package them together. Currently they will be maintained as separate blocks. Let me know if you have any suggestions or ideas how I might better handle this. Peace - Anthony
I forgot about the simple_restore block so will re-open and treat that here as well.
Robert - I noticed that you created a special table to hold the config information; however, you could also use (and I would recommend using) the config_plugins table. That would remove the need for the db path altogether for this block. I would also recommend using it for the backadel block as well. The functions get_config and set_config can be used to get the configuration information. Peace - Anthony
Robert - For some reason I am not seeing anything in the simplified restore. I did not see any installation instructions or a readme. I installed the block, did notifications, went to settings. I am not using any particular directory and have a few zip files in the moodledata path that were created by the backadel block. Any ideas why I am still getting an empty block? Peace - Anthony
Seems to be a role issue. I am logged in as the site administrator and even added myself as a front page administrator which is where I viewing the block from. Let me know what the intended usage is and I'll continue to work on it. Peace - Anthony
Robert - Looking at the deletecourses.php, I am receiving two errors:
Notice: Undefined index: ids in /home/arborrow/Moodle/code/19stable/admin/deletecourses.php on line 143
Notice: Undefined variable: course in /home/arborrow/Moodle/code/19stable/admin/deletecourses.php on line 216
I'm wondering if the deletecourses.php file should not really be in a new folder /admin/course/ or if it might be better simply under /course. I've created MDL-17017 which is related to this issue. I also wonder if we might consider creating a /admin/course/course_bulk_delete option which would make use of filters and have a similar UI to the buk user actions; however, to avoid complicating the UI I would actually recommend that they be placed in /course and create a menu option for bulk course options (delete, display on page, download, etc.).
Peace - Anthony
I've been looking at the wide range of methods to allow bulk deletion of courses today - can anyone explain to me why this should be done as a seperate tool rather than just including the ability to delete selected courses on the course/category.php page?
I understand that the methods in this bug don't require changes to Core files so are easier for people to install, but I'm wondering about just adding this into core on the course/category.php page. (it already has checkboxes to allow moving selected courses into a different category)
what are your thoughts?
in bouncing this idea round with Petr/Tim - I thought it would be a nice idea if we could add an auto-backup feature to the deletion process.
A big problem with course deletion is that it's not easily reversible - it would be nice if the confirmation screen that checks to make sure the user wants to delete the courses had a checkbox that allowed all the courses set for deletion to be backed up before they were deleted. - does the bulk delete tool already have this functionality?
Dan - As I recall, the code Robert submitted from LSU (backadel) does backup and delete. I agree with you that the code for mass deleting courses would best be handled in /course/category.php as part of core. I would also like to see the ability to import courses via CSV in core as that functionality exists for managing users. So for users, courses, and even roles I think that having the ability to bulk upload such things would help integrate Moodle with a variety of SISs. I have created MDL-17017 as a place to pull some of the various solutions that have been shared together and am hoping that this will provide a more long term direction to these functions. Please feel free to watch, vote, and comment on MDL-17017. Peace - Anthony
Well, I would like to say I feel proud to see my work here, AND in high demand. I was one of the original developers of the bulk delete and upload tools for moodle, and we have recently upgraded both of these for 1.9 and to be more efficient. If you would like me to upload them, please let me know.
Ashley,
Please send me (elearning@lsu.edu) your updated code so we can incorporate it into backadel. Thanks for the great work!
I'm afraid I lost track of this issue. I see that we added the backadel code to contrib but was not sure what else (if anything) I needed to do to resolve this issue. Thanks for helping bring me up to speed. Peace - Anthony
Robert - I am trying to move forward on MDL-13114; however, I would like to know if you have done any comparisons between the course management block (http://moodle.org/mod/data/view.php?d=13&rid=1839&filter=1 and is downloadable at http://development.moodlerooms.com/file.php/1/Moodlerooms_Releases/Course_Management_Block_for_1.9/coursemanagementblock19.zip) which has bulk course backup and delete functionality and the backadel block you submitted here. I'm looking for a comparison of features and/or to see if there is a relationship between the two blocks - is one a fork or more developed than the other? Thanks for any information you might be able to provide. I've also sent similar notes to Jason Hardin and Ashley Gooding to see what they might be able to add. Thanks - Anthony
I've been examining the Moodlerooms solution.
Moodlerooms Course Management block allows for bulk restores and bulk deletions based on selecting of courses from a list of all the courses on the system. This could prove problematic for systems with huge numbers of courses to delete.
Our Backup and delete system does not restore courses (although incorporating that feature is a great idea and should be VERY simple now that MR has written the code.
Our system does however, allow for the administrator to easily (no sql necessary) build queries and save those queries to be run at any time. Once a query is run, the admin choses one to all of the courses gathered from the query and backs them up. Only when these courses have been backed up to a specified location will deletions be allowed. You can then select a subset or all of the courses ready to be deleted and mark them for deletion.
We also allow for uploading of a csv for course deletions, bypassing the backup stage if necessary.
We also have the simple restore block which limits how instructors can restore courses.
Robert - I've approved your CVS write request for backadel and simple_restore. I uploaded the simple restore code to CVS and created the Block: Simple restore component in the tracker and made you the component lead so any issues related to it will be assigned to you. Let me know if you need anything else. Peace - Anthony
Hi!
We would like to use backadel in our Moodle instalation (1.9.9.). We have installed backadel.zip but we get these errors:
1) After running the query, when we send backup job, we get this error:
Backup Job SentAyuda con Backup Job Sent (nueva ventana)
Warning: Missing argument 3 for get_fieldset_select(), called in /var/www/moodle19/blocks/backadel/send_job.php on line 34 and defined in /var/www/moodle19/lib/dmllib.php on line 1161
Notice: Undefined variable: select in /var/www/moodle19/lib/dmllib.php on line 1163
Notice: Undefined variable: select in /var/www/moodle19/lib/dmllib.php on line 1166
Your backup job will start within an hour. You will receive an email when all backups are complete.
Notice: Undefined variable: select in /var/www/moodle19/blocks/backadel/send_job.php on line 68
Prueba Sloodle was not scheduled for backup because it is an unresolved failure. Please fix this.
2) After rescheduling the backup, there is no error message, but when performing the cron, we get these debug messages repeated several times:
Processing cron function for backadel....
Backing Up Prueba Sloodle
<br />
<b>Notice</b>: Undefined property: stdClass::$backup_preferences in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2323</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2329</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2330</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2331</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2332</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2350</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/moodle19/backup/backuplib.php</b> on line <b>2350</b><br />
<br />
Any sugestion?
Working on it here, but have you made sure that you set backadel's course backup options and set the backup folder and made sure it is writable by Apache?
Hi Robert!
I have tried these two options:
1) Create a folder under moodledata via ftp and give it 777 permissions
2) Create a folder in a moodle course
Of course, I have filled backup options with /foldername and /5/foldername. Neither of them have worked.
I have installed backadel.zip file in this issue (2008). Is there an updated version somewhere else?
This has been changed in a later version.
please contact me via email at elearning@lsu.edu.
Is the version in CVS the latest version? It mostly seems to date back to 2008, so I'm not clear if it is still maintained.
We've separated this from backadel for Moodle 2 and it is available here: https://github.com/lsuits/bulk_delete.
Our other Moodle 2 plugins are available via https://github.com/lsuits/
Marc - Let's focus on 1.9 onward for this one if that is OK. I know that in 1.9 if you move a bunch of courses to a particular category you can delete the category and it will delete all of the courses. Would you be willing to help me work through this. Ideally I would like to see this as a patch or plugin in CONTRIB. Any suggestions for who would be a good maintainer of the code? Could you attach some of the code here or give me an idea of what the functionality is to look like. Thanks - Anthony