Editing Resources WITHOUT Previewing

Editing Resources WITHOUT Previewing

by Timothy Takemoto -
Number of replies: 17
Would you like to be able to edit resources without previewing them?

This was discussed on the forums ages ago. I can't find the post.

Whe the change is minor and the resource large I think that it would be nice to have a "submit and do not preview" button.

What do other moodlers think?

Tim
Average of ratings: -
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by Neil Sambrook -
I would love to be able to disable the preview function full stop as I find it quite frustrating, especially when you are manipulating a lot of files.
In reply to Neil Sambrook

Re: Editing Resources WITHOUT Previewing

by N Hansen -
Am I completely missing something? I have never seen preview of resources in Moodle, even as an option, so I am not quite sure what everyone wants to get rid of.
In reply to N Hansen

Re: Editing Resources WITHOUT Previewing

by Timothy Takemoto -
When I add a link to a file (either already in course files or uplaoded) resource, then when I have specified the file, and whether it opens in a new window or not and then press save changes at the bottom, I find that instead of returnng to the course view page I am shown the resource file either in the same or a new window depending upon my specificaiton.
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by N Hansen -
But that really isn't previewing, since the edited resource has already gone live at that point. I actually like this feature and would be unhappy to see it go away because I always like to make sure the edits are rendered as I expected them to be. The WYSIWYG of the editor is not always 100% WYSIWYG. It also allows you to make sure links you may have made are correct and that images are appearing properly. On more than one occassion when I have edited links and images they were broken and if I hadn't been redirected to the page I would have had to go through an extra click or two to see that.  I think it is good editorial practice to leave it as it is.
In reply to N Hansen

Re: Editing Resources WITHOUT Previewing

by Neil Sambrook -
I disagree. If I want to upload a simple Word file into my course, I already know exactly how it looks and previewing it is a pain in the proverbial, especially if as usual I am using Firefox. Preview is good for you Preview is bad for me A simple solution and good practice is allowing the individual user to choose their own preference. Not everyone uses Moodle the same way after all.
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by Sherry Brown -
Count me as another who would like this option.

While my frustration may not be as high as others, I find loading the resource in a browser is a minor annoyance on Safari and more irritating on Firefox, as it automatically downloads the pdf which was already uploaded to my Moodle.
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by John Ridge -
Can I add my vote for adding a 'submit and do not preview' button.
I also find it annoying for .pdfs that I have just added to be downloaded and when I have made minor changes to large files.

John
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by A. T. Wyatt -
Greetings, Tim!

I think you should file this in the Moodle Tracker as a feature request and give us the number so we can all go vote there!

Would you mind?

atw
In reply to A. T. Wyatt

Re: Editing Resources WITHOUT Previewing

by Timothy Takemoto -
Hi AT, fellow would be non-previewers
Done. Please vote (and perhaps comment) on the New Feature request here
http://tracker.moodle.org/browse/MDL-6826
Tim
In reply to Timothy Takemoto

Re: Editing Resources WITHOUT Previewing

by A. T. Wyatt -
You have my vote!
atw
In reply to A. T. Wyatt

Re: Editing Resources WITHOUT Previewing

by Neil Sambrook -
Vote added.  Fingers crossed.
In reply to Neil Sambrook

Re: Editing Resources WITHOUT Previewing

by Łukasz Leszewski -
Vote added.
no answer so far sad

This previewing is very annoying for almost all my moodle users! Can I add some more votes for them ;)

I found post by Chris West
(http://moodle.org/mod/forum/discuss.php?d=12515#168476)

course/mod.php

line 99...
if (isset($mod->redirect)) {
$SESSION->returnpage = $mod->redirecturl;
} else {
//$SESSION->returnpage = "$CFG->wwwroot/mod/$mod->modulename/view.php?id=$mod->coursemodule";
//changed so that after submitting an update to a resource
// you are taken back to the course page
$SESSION->returnpage = $mod->redirecturl;
}

line 162, same...
if (isset($mod->redirect)) {
$SESSION->returnpage = $mod->redirecturl;
} else {
//$SESSION->returnpage = "$CFG->wwwroot/mod/$mod->modulename/view.php?id=$mod->coursemodule";
//changed so that after submitting a new resource
// you are taken back to the course page
$SESSION->returnpage = $mod->redirecturl;
}
In reply to Łukasz Leszewski

Re: Editing Resources WITHOUT Previewing

by Ben Steeples -
Can anybody confirm that this code works for them?
In reply to Ben Steeples

Re: Editing Resources WITHOUT Previewing

by Jim Audette -
This hack does not seem to work with Moodle 1.8. It did work with version 1.6.
In reply to Ben Steeples

Re: Editing Resources WITHOUT Previewing

by Jim Audette -
I believe that I have found how to change this behavior in Moodle 1.8.2 and 1.9.

For Moodle 1.9:
------------------------------------------------------
course/modedit.php

Line 401 reads:
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$fromform->coursemodule");

Change it to:
redirect("$CFG->wwwroot/course/view.php?id=$fromform->course");


For Moodle 1.8.2
------------------------------------------------------
course/modedit.php

same as above only it is line 273.

I hope that this helps. Please note that this is the first time I have mucked about in the Moodle code and I do not have a strong PHP background. It would be great if someone with more knowledge could confirm this.

Thanks! Long live Moodle!
In reply to Jim Audette

Re: Editing Resources WITHOUT Previewing

by Peter Mahoney -
Just gave that code change a go on Moodle 1.8.2+ and so far so good! Thanks for that.

Peter
In reply to Jim Audette

Re: Editing Resources WITHOUT Previewing

by Jakub Ctvrtnicek -

Dear Jim,

my university has the same issue. I voted for the change of the functionality on the tracker and as well used your solution as temporarily hack on our instance.

So far works fine.

Thanks, cheers, Jakub