Moodle

course request button is not visible on the choosen category

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Course
  • Labels:
    None
  • Environment:
    apache 2.x , php 5.x , mysql 5.x , moodle 1.9.2
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

setting a course category for the course request button did no affect on the course view page.
i could only turn it on and off with $enablecourserequest variable.

i found that the code in moodle/course/index.php (lines 79-82) was hardly functional since
this page was only visible in a unique situation when it was directly called from the URL or the
navigation link. in all other situation the moodle/course/category.php was called.

so i suggest moving this functionality to category.php page
plus changing it (in the following way) so the button appears only in the right category.
(as defined by the admin)

i added these lines (category.php) after line 504 "print_course_search();"
and before line "print_footer();"

if (isloggedin() and !isguest() and !has_capability('moodle/course:create', $sysctx) and $CFG->enablecourserequests and $CFG->defaultrequestcategory == $id ) { // Print link to request a new course print_single_button('request.php', NULL, get_string('courserequest'), 'get'); }
if (has_capability('moodle/site:approvecourse', $sysctx) and !empty($CFG->enablecourserequests) ) { print_single_button('pending.php',NULL, get_string('coursespending'),'get'); }

i also suggest we remove the lines 79-82 from course/index.php complitly because it displays a request button
on a general page and not in a specific category. as instructed by the admin interface... that this button only shows
on a specific category.

if all request are tunneled to one list that is ok BUT if i (the admin) have to go throw all the categories and look for
new courses... then i think this button should be disabled ?

Issue Links

Activity

Hide
Tim Hunt added a comment -

Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.

Show
Tim Hunt added a comment - Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: