Moodle
  1. Moodle
  2. MDL-7454

Permitting editing teachers to create courses doesn't work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a bug
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Rank:
      8907

      Description

      Moodle version of Nov. 11, 2006

      Do this:

      1) Go to Users/Permissions/Definte foles and edit the role ot "Teacher".
      2) Click the radio button for "Create courses/Allow" and save
      3) Enter a course and from Admin/Assign Roles, assign a regular user to the role of "Teacher"
      4) Log on as that teacher
      5) Bring up the list of courses

      You will see a button that says "Request a Course" rather than one that says "Create a Course"

        Activity

        Hide
        Dan Poltawski added a comment -

        Hi Thomas,

        I think the reason for this is because you are only assigning that user the role of 'Teacher' at that course context. When creating a course, Moodle will use the permission from the site context.

        If you were to assign the user the teacher role at Site Context (i.e. using 'assign roles' page from the admin menu) the user would be able to create the course.

        I hope that makes some sense, it is quite confusing. I wonder if something could better explain permissions like this in the roles definition page.

        Show
        Dan Poltawski added a comment - Hi Thomas, I think the reason for this is because you are only assigning that user the role of 'Teacher' at that course context. When creating a course, Moodle will use the permission from the site context. If you were to assign the user the teacher role at Site Context (i.e. using 'assign roles' page from the admin menu) the user would be able to create the course. I hope that makes some sense, it is quite confusing. I wonder if something could better explain permissions like this in the roles definition page.
        Hide
        Yu Zhang added a comment -

        Hi,

        Dan is right, this assignment needs to be at site level to take effect. A normal course creator should be assigned at the site level.

        Yu

        Show
        Yu Zhang added a comment - Hi, Dan is right, this assignment needs to be at site level to take effect. A normal course creator should be assigned at the site level. Yu
        Hide
        Thomas Robb added a comment -

        Sorry, but I don't follow the logic. If the role of "Teacher" has been set at the SITE LEVEL so that teachers are given the ability to create courses, then this should work ANYTIME a teacher is assigned to a course, otherwise it makes no sense to assign attributes to a teacher at the site level.

        For example, my school simply wants all (editing) teachers to be able to create other courses, but do nothing else that a creator could do. It does not make sense for the administration to have to set each teacher twice, once to assign him/her the role of "teacher" in each course that the person teaches and then again at the site level.

        All my school admins should have to do is to define "editing teacher" with the additional attribute of "allow - create courses" and that should be it. If this isn't so, please explain why it must no be so.

        Show
        Thomas Robb added a comment - Sorry, but I don't follow the logic. If the role of "Teacher" has been set at the SITE LEVEL so that teachers are given the ability to create courses, then this should work ANYTIME a teacher is assigned to a course, otherwise it makes no sense to assign attributes to a teacher at the site level. For example, my school simply wants all (editing) teachers to be able to create other courses, but do nothing else that a creator could do. It does not make sense for the administration to have to set each teacher twice, once to assign him/her the role of "teacher" in each course that the person teaches and then again at the site level. All my school admins should have to do is to define "editing teacher" with the additional attribute of "allow - create courses" and that should be it. If this isn't so, please explain why it must no be so.
        Hide
        Ray Lawrence added a comment -

        I'm having trouble with this too.

        On my test Moodle I have a user assigned at site level as Course Creator and Teacher - the roles are unmodified.

        Whilst logged in as this user, when I turn editng on at site level the administration block (when expanded) is empty. In 1.6.x this displayed a "Courses" link to http://mysite/moodle/course/index.php.

        I can access http://mysite/moodle/course/index.php by typing the address but how can I get the "Course" link to show as before, alteratively what is the replacement mechanism to allow those allocated as Course Creators to access the Create new course button?

        This site is an upgrade from 1.6.1.

        Show
        Ray Lawrence added a comment - I'm having trouble with this too. On my test Moodle I have a user assigned at site level as Course Creator and Teacher - the roles are unmodified. Whilst logged in as this user, when I turn editng on at site level the administration block (when expanded) is empty. In 1.6.x this displayed a "Courses" link to http://mysite/moodle/course/index.php . I can access http://mysite/moodle/course/index.php by typing the address but how can I get the "Course" link to show as before, alteratively what is the replacement mechanism to allow those allocated as Course Creators to access the Create new course button? This site is an upgrade from 1.6.1.
        Hide
        Yu Zhang added a comment -

        Hi Tom,

        All roles are defined at site level. The fact that roles are defined (capabilities set) at site level has got nothing to do with the actual capabilities. The actual capabilities are resolved based on the context of the role assignments.

        Role assignment are context based. If you assign a user to a teacher role in a course, then he is only the teacher of that course and nothing more. If you assign this user to a teacher role in the site context, then he becomes the teacher of all courses in your site. If you assign the teacher role to a user at the course category context, then he becomes the teacher of all courses in that course category. You can not have this teacher being able to create course and only manage his own courses using one role. This does not make sense because creating courses is really not a course level action, but a site level action.

        To let all your teachers create courses you need to create an additional role with everything set to inherit, but course creation set to allow, and assign your teachers to this role at site level.

        Hi Ray,

        I will check with the block problem.

        Yu

        Show
        Yu Zhang added a comment - Hi Tom, All roles are defined at site level. The fact that roles are defined (capabilities set) at site level has got nothing to do with the actual capabilities. The actual capabilities are resolved based on the context of the role assignments. Role assignment are context based. If you assign a user to a teacher role in a course, then he is only the teacher of that course and nothing more. If you assign this user to a teacher role in the site context, then he becomes the teacher of all courses in your site. If you assign the teacher role to a user at the course category context, then he becomes the teacher of all courses in that course category. You can not have this teacher being able to create course and only manage his own courses using one role. This does not make sense because creating courses is really not a course level action, but a site level action. To let all your teachers create courses you need to create an additional role with everything set to inherit, but course creation set to allow, and assign your teachers to this role at site level. Hi Ray, I will check with the block problem. Yu
        Hide
        Yu Zhang added a comment -

        Hi Ray,

        Just checked the code and with Martin, the old admin block is not supposed to work in the site page, even for admins. But if you just want the course link I think you can just use the course block, where you can follow on the category link and create new courses.

        Cheers,

        Yu

        Show
        Yu Zhang added a comment - Hi Ray, Just checked the code and with Martin, the old admin block is not supposed to work in the site page, even for admins. But if you just want the course link I think you can just use the course block, where you can follow on the category link and create new courses. Cheers, Yu
        Hide
        Ray Lawrence added a comment -

        Hi Yu,

        Thanks for this. I'll try it shortly. If I don't want this block on the site page how does a user with site wide course creator status initiate the creation of a new course i.e. how do they see a creat ne course button?

        (Thom, not trying to hijack this report I think this is all part of the same issue).

        Ray

        Show
        Ray Lawrence added a comment - Hi Yu, Thanks for this. I'll try it shortly. If I don't want this block on the site page how does a user with site wide course creator status initiate the creation of a new course i.e. how do they see a creat ne course button? (Thom, not trying to hijack this report I think this is all part of the same issue). Ray
        Hide
        Martin Dougiamas added a comment -

        Tom, let me try a (weak) analogy.

        Imagine a brick school. You are a teacher in one particular course, in a particular room. If I tell you that you have the power to build new rooms in that room, then it doesn't make sense. Likewise, you can't build courses inside a course.

        If on, the other hand, I give you a role at the SCHOOL of "room builder" then it makes sense that you are empowered to commission new buildings (categories) with new classrooms (courses) on the campus site.

        Show
        Martin Dougiamas added a comment - Tom, let me try a (weak) analogy. Imagine a brick school. You are a teacher in one particular course, in a particular room. If I tell you that you have the power to build new rooms in that room, then it doesn't make sense. Likewise, you can't build courses inside a course. If on, the other hand, I give you a role at the SCHOOL of "room builder" then it makes sense that you are empowered to commission new buildings (categories) with new classrooms (courses) on the campus site.
        Hide
        Martin Dougiamas added a comment -

        Ray, the normal admin_tree block SHOULD show the course creation link ... if it doesn't then that's a bug.

        Show
        Martin Dougiamas added a comment - Ray, the normal admin_tree block SHOULD show the course creation link ... if it doesn't then that's a bug.
        Hide
        Ray Lawrence added a comment -

        OK, I wasn't sure if I was simply missing something. Have double checked, now report MDL-7540

        Show
        Ray Lawrence added a comment - OK, I wasn't sure if I was simply missing something. Have double checked, now report MDL-7540

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: