|
|
|
Environment:
|
apache 2.x , php 5.x , mysql 5.x , moodle 1.9.2
|
|
Issue Links:
|
Duplicate
|
|
This issue duplicates:
|
|
MDL-9854
Course request button is only available when front page display options when logged in includes List of courses
|
|
|
|
|
|
|
|
| Database: |
MySQL
|
| Participants: |
Nadav Kavalerchik and Tim Hunt
|
| Security Level: |
None
|
| Resolved date: |
05/Dec/08
|
| Affected Branches: |
MOODLE_19_STABLE
|
|
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 ?
|
|
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 ? |
Show » |
made changes - 16/Sep/08 06:16 PM
| Field |
Original Value |
New Value |
|
Fix Version/s
|
|
1.9.3
[ 10290
]
|
|
Assignee
|
Eloy Lafuente (stronk7)
[ stronk7
]
|
Tim Hunt
[ timhunt
]
|
made changes - 15/Oct/08 03:00 PM
|
Fix Version/s
|
|
1.9.4
[ 10300
]
|
|
Fix Version/s
|
1.9.3
[ 10290
]
|
|
made changes - 05/Dec/08 05:02 PM
|
Link
|
|
This issue duplicates MDL-9854
[ MDL-9854
]
|
made changes - 05/Dec/08 05:02 PM
|
Fix Version/s
|
1.9.4
[ 10300
]
|
|
|
Resolution
|
|
Duplicate
[ 3
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|