Getting into a Course category context when there is only one category

Getting into a Course category context when there is only one category

by John Isner -
Number of replies: 11
Suppose a user has been assigned the role of Course creator in category Foo. What's the BEST way for the user to get into the Foo context in order to create courses?

I use three methods:
  1. Display a category or combo list on the front page after login
  2. Provide a Courses block on the front page
  3. use the magic URL http://mysite/course/index.php?id=2
Methods 2 and 3 will only show categories if there is more than one category. They only show the courses if there is only one category (Miscellaneous). That leaves method 1.

But suppose the admin doesn't want 1? How does the Course creator get to the Miscellaneous category? I have not been able to discover a way, other than assigning Course creator globally.

Unfortunately, I think it is a big mistake to assign Course creator globally, since this will make a user Course creator in Miscellaneous as well as all future categories.

Suggestions?
Average of ratings: -
In reply to John Isner

Re: Getting into a Course category context when there is only one category

by John Isner -
I have been working on this. Here's a magic URL that that will get you to the (single) Miscellaneous category

http://mysite/course/category.php?id=1

There should be a direct way to get to this page through the normal user interface, but there is not (or at least I have not found it). IMO this encourages the proliferation of global roles.
In reply to John Isner

Re: Getting into a Course category context when there is only one category

by Ray Lawrence -
Hi John,

I've had a play with this...

Scenario 1:
If one category only (Misc)
User assigned as CC for Misc
Front page display list of courses only
Click "All courses" button
No "Add new course" button.

Scenario 2:
Two categories
User assigned as CC for Misc
Front page display list of courses only
Click "All courses" button
"Add new course" button present, user can create new course in Misc.

Absence of "Add new course" button in scenario 1 a bug do you thnk?

In reply to Ray Lawrence

Re: Getting into a Course category context when there is only one category

by John Isner -
Hi Ray,
The All courses... link in the Courses block takes you to

http://mysite/course/index.php

which displays the list of ALL courses (with category headings, if there are multiple categories). It would be illogical for there to be an Add course button on this page, because it is not a category-specific page, just a complete listing of all courses. So it is not a bug.

You need to get to a specific category page. When there is only one category, the only successful way I have been able to do this (without showing a Combo list or Category list on the front page) is by using the magic URL

http://mysite/course/category.php?id=1


In reply to John Isner

Re: Getting into a Course category context when there is only one category

by Ray Lawrence -
It would be illogical for there to be an Add course button on this page, because it is not a category-specific page, just a complete listing of all courses.

I don't agree. The user does not need to navigate to a category because, once the new course's settings page is displayed, the category (singular in this example) in which the user has permission to create a course is listed in the "Category" drop-down. Therefore the button does not need to be category specific.
In reply to Ray Lawrence

Re: Getting into a Course category context when there is only one category

by John Isner -
Ray,
You say

once the new course's settings page is displayed ... the category ... is listed in the "Category" drop-down

I agree: once inside the course, he can use the Category drop-down to change the category (assuming he is a Course creator in multiple categories). But how was the course created in the first place? It had to be created in some category. And that requires getting into a specific Category context, something that is not at all obvious how to do, especially when there is only one category.


In reply to John Isner

Re: Getting into a Course category context when there is only one category

by Ray Lawrence -
Hi,

You'd need a "Add new course" button to be able to do that. wink

Scenario 3
On a site with 2 categories, front page display list of courses and the user assigned as CC globally.

At the foot of the list of courses is an "Add new course" button. Click this and you get a new course settings page. The "Category" drop-down is defaulted to
Misc (presumably as the lowest numbered category) but the other category is listed there too, so the course can be created in either.

So, if a user assigned as CC in any category on the site (and not necessarily globally) saw an "Add new course" button at the bottom of any list of courses then all would be well with the world. smile

Back to my original question.... is this a bug. Or perhaps the basis for a feature request? IIRC correctly this was the behaviour before this went off the rails a bit in early 1.7.

All that would remain to do would be to shunt over the "Request course" button (when course requests are enabled, and the user is eligible to make such a request) so that they could request a course where they don't have CC rights.

Off to bed.... sleepy
In reply to Ray Lawrence

Re: Getting into a Course category context when there is only one category

by John Isner -
Ray,
Before we discuss scenario 3, what do you mean by...

You'd need a "Add new course" button to be able to do that

To do what? If you are Course creator in Miscellaneous, there IS a New course button on the page with the magic URL

http://mysite/course/category.php?id=1

See screenshot below. Here is what I did on demo.moodle.org
  1. As Admin, create new user Joe Blow and assign him as Course creator in category Miscellaneous (Site administration -> Courses -> Add/Edit courses -> Miscellaneous -> Assign roles
  2. As Joe Blow, type in the magic URL and bingo! (see screenshot)

Attachment add_a_new_course_button.png
In reply to John Isner

Re: Getting into a Course category context when there is only one category

by Ray Lawrence -
Indeed. But you have to be able to get to the category to see that. This can be problematic in some cases depending on the layout of the front page and requires that that the user knows a "magic" url. I believe this was the thrust of your initial post.

I prefer navigation and access to feature to be transparent e.g. a button rather than knowledge of particular urls.

Therefore if there was a button to add a new course on the front page whenever the user was assigned as a course creator to specific category(s) i.e. not globally there would be no need to consider other any other approach to facilitate this.

If such a button existed it need not be category specific as the category(s) in which courses can be created is already restricted by virtue of the CC role assignment(s) and the required category can be selected from the "Category" drop-down in course settings.

As an "Add new course button" is visible at the bottom of a list of all courses if a user is assigned as a CC globally i.e. not category specific, I wondered if it might be a bug if this was not displayed in the same way when a user is assigned as a CC (but not globally).
In reply to Ray Lawrence

Re: Getting into a Course category context when there is only one category

by John Isner -
Hi Ray,
Now let's talk about your scenario 3. I'll try to put it into my own words.

A Course creator assigned globally sees an Add new course button on the course index page

http://mysite/course/index.php

(this is true even if there is only one category) and can choose the category on the course settings page from the category drop-down. I agree that this is the way it works for global course creators.

Now as I understand it, you think a non-global Course creator should also see an Add new course button on the course index page, and should be able to choose the category on the settings page (of course the drop-down would only display the categories in which the Course creator had been assigned).

I agree. That would be a very good interface!

The current interface is not workable because (a) it requires the CC to get into the category context first before he can create the course and (b) in the worst case, getting into the category context requires a magic URL.

If I were entering a tracker issue, I wouldn't call the current interface a "bug" but I would call it a "much needed improvement."
In reply to John Isner

Re: Getting into a Course category context when there is only one category

by Ray Lawrence -
Great! smile



I think this covers it MDL-12845.
In reply to Ray Lawrence

Re: Getting into a Course category context when there is only one category

by John Isner -
Good, I'm glad you created the issue. I will add some supportive comments smile

I agree that it is a major issue because the current set-up is to encourages the proliferation of global course creators (e.g., see this discussion), and global roles are evil.

Your first proposed solution (adding a Create new course button to the course listing page) would make it somewhat easier for the CC to find the button, but not in all cases. In the worst case, the CC will still need a magic URL

http://mysite/course/index.php

to get to the page with the button. Consider this scenario: front page lists courses and no Courses block

Your second solution is the right one in my opinion. This could be done by adding a Courses link to the Site administration block for Course creators. This would allow course creators to add new courses and new sub-categories within their assigned categories.