Prevent teachers from changing course name in Moodle 2.6

Prevent teachers from changing course name in Moodle 2.6

Fred Weiss發表於
Number of replies: 5

I would like to be able to Prevent teachers from changing course name in Moodle 2.6.

I realise there is no capability for doing this but was thinking I could change the from on the page which asks do you want to overwrite course configuration from a yes / no selectable to either not selectable or no/no.

I am just struggling to find where this parameter is set.

Like a few others we are trying to maintain a naming convention and don't have the resources to do all individual course restores centrally.

Any assistance appreciated.

評比平均分數: -
In reply to Fred Weiss

Απάντηση: Prevent teachers from changing course name in Moodle 2.6

Andreas Panagiotopoulos發表於
In reply to Andreas Panagiotopoulos

Re: Απάντηση: Prevent teachers from changing course name in Moodle 2.6

Fred Weiss發表於

Thanks Andreas

Yes those capabilities are present except they do not prevent a user with restore capability from changing the course name during a restore.

At the point when it asks 

Overwrite course configuration? Yes/No   (see attached image)

At this point it will overwrite the existing course name with whatever the teacher has entered.  

There is no capability to prevent this and the only way I can think of is to prevent them from changing 

Overwrite course configuration? to Yes

Only issue being I cannot find the file where this is set not being a programmer.

Regards

附件 RestoreOverwriteConfig.png
In reply to Fred Weiss

Re: Απάντηση: Prevent teachers from changing course name in Moodle 2.6

ben reynolds發表於

Fred,

Am I correct in guessing that you are having teachers restore courses? Do they do this often?

I am guessing that social engineering might be a more effective tool. We also have a naming convention. About 5 of us restore courses here, and we just agreed we needed a naming convention because, otherwise, there's no way to upload the students in courses.

I'm pretty sure that if you tell your teachers their students won't get into the classroom, they'll toe the line.

In reply to ben reynolds

Re: Απάντηση: Prevent teachers from changing course name in Moodle 2.6

Susan Mangan發表於
Particularly helpful Moodlers的相片

I wonder if there has been any changes in thought in this area.  I opened a tracker item in 2012 and it wasn't considered a bug.

https://tracker.moodle.org/browse/MDL-34523

Maybe it can be a feature request if enough people want this functionality?  Even though I still think it's buggy as it's deceiving.

I am still faced with problems in this area.  Simple approach is to remove the capability for faculty to restore content but that has negative consequences such as putting more load on me because I then have to do this for them.

I don't think 'restoring content' should have the same capabilities as 'create course' I think it should be the same as 'import content' which does not allow the faculty to modify course settings.  If anything, allowing admins to choose the capabilities would help.

In reply to Susan Mangan

Re: Απάντηση: Prevent teachers from changing course name in Moodle 2.6

Zvonko Martinović發表於

We do this by disabling overwrite in restore class. Here is our diff:

diff --git a/backup/moodle2/restore_course_task.class.php b/backup/moodle2/restore_course_task.class.php
index d32e1e2..bafb742 100644
--- a/backup/moodle2/restore_course_task.class.php
+++ b/backup/moodle2/restore_course_task.class.php
@@ -198,6 +198,10 @@ class restore_course_task extends restore_task {
             $overwrite->set_status(backup_setting::LOCKED_BY_CONFIG);
             $overwrite->set_visibility(backup_setting::HIDDEN);
         }
+        else{
+        	$overwrite->set_status(backup_setting::LOCKED_BY_CONFIG);
+        	$overwrite->set_visibility(backup_setting::HIDDEN);
+        }
         $this->add_setting($overwrite);
 
     }
--
libgit2 0.21.2
It will hide overwrite menu and as it's false by default course settings (like name or short name) will not be changed.

This core is for Moodle 2.9 but we used it on Moodle 2.7 and it should be the same on older Moodle.