Project

General

Profile

Feature #5619

In a course, add a button to see which classes are registered in the course

Added by Hubert Borderiou about 9 years ago. Updated about 9 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
08/10/2012
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hi,
great now, teacher can register classes in a course.
But the is no button to see classes already registered in this course.
You have to look for classe with the red cross in the action column.
And we can have more than 1500 classes in a platform.

Could we add a way to see classes registered in a course ?

May be we could, when clicking on the button [Classes] in a course go to the page were we see classes registered in this course, and have a button to register new course.

See attached for a ... quick ... sample


Files

2012-10-08_1513.png (72.5 KB) 2012-10-08_1513.png Hubert Borderiou, 08/10/2012 15:13

Associated revisions

Revision f603b0d8 (diff)
Added by Julio Montoya about 9 years ago

Adding "classes not added" and "classes added" pages in the course see #5619

Revision f2835072 (diff)
Added by Hubert Borderiou about 9 years ago

Display classes not in a course -ref #5619

Revision 180ecaa6 (diff)
Added by Hubert Borderiou about 9 years ago

Display classes not in a course -ref #5619

History

#1

Updated by Julio Montoya about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya

yeah I knew that, but it was a fast fix for 1.9.2, let me do some changes

#2

Updated by Hubert Borderiou about 9 years ago

no problem

#3

Updated by Julio Montoya about 9 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Julio Montoya)
  • % Done changed from 0 to 50
#4

Updated by Julio Montoya about 9 years ago

code added

#5

Updated by Yoselyn Castillo about 9 years ago

  • Assignee set to Yoselyn Castillo
#6

Updated by Hubert Borderiou about 9 years ago

I go in a course > Users > Classes
As teacher or admin, I see classes registered to the course (with the red cross to unregister the classe, that's ok)
But when I click on the (+) green button, the list of classes not registered to the course is empty.

#7

Updated by Yoselyn Castillo about 9 years ago

it works fine for me tested in stable.chamilo.org
I go in a course > Users > Classes
I see classes registered to the course
But when I click on the (+) green button, the list of classes not registered to the course is shown properly. You can test it in:
http://stable.chamilo.org/main/user/class.php?cidReq=STABLEOPEN&id_session=0&gidReq=0&type=not_registered

#8

Updated by Hubert Borderiou about 9 years ago

There is a classe I don't see in my install, I'll check it and give you my feedback.

#9

Updated by Hubert Borderiou about 9 years ago

Ok, the sql request in usergroup.lib.php > get_usergroup_not_in_course

SELECT DISTINCT u.*
FROM `chamilo19`.`usergroup_rel_course` usergroup
RIGHT JOIN `chamilo19`.`usergroup` u
ON (u.id = usergroup.usergroup_id)
WHERE usergroup.course_id IS NULL

gives classes not registered to any courses of the platform, and what we want is to have classes not registered to a specific course.
I think that the sql request should be someting like that (for example, for course n° 1)

SELECT *
FROM `chamilo19`.`usergroup_rel_course` urc
JOIN `chamilo19`.`usergroup` u
ON (u.id = urc.usergroup_id)
WHERE course_id != '1'

Modifying model.ajax.php
[411] case 'not_registered':
[412] $options['where'] = array(" course_id != ? " => $course_id);

and usergroup.lib.php
[95] public function get_usergroup_not_in_course($options = array()) {
$sql = "SELECT * FROM {$this->usergroup_rel_course_table} urc
JOIN {$this->table} u
ON (u.id = urc.usergroup_id)
";

#11

Updated by Yoselyn Castillo about 9 years ago

I am going to check now

#12

Updated by Yoselyn Castillo about 9 years ago

  • Status changed from Needs testing to Assigned
  • Assignee changed from Yoselyn Castillo to Hubert Borderiou

Well I have made some tests in stable.chamilo.org and these are the reults :
I have inscribed 2 classes to the course "opening course" and I have left 1 class (clase1)without subscribing to any course
I see classes registered to the course "opening course". It works fine
But when I click on the () green button, the list of classes not registered is empty(this is a bug, because there is one class without subscribing)
Later, I have subscribed the class (clase1 which was not subscribed to any course) to other course(curso2)
I click on the (
) green button, to see the list of classes not registered in "opening course" and at this time the class clase1 appeared successfully in the list of not registered classes.
In brief, if one class is not subscribed to any course, it never appears in the list of not registered classes for any course.

#13

Updated by Hubert Borderiou about 9 years ago

Hi, and thanks for your feedback.
Well done, you are right, my sql request is false too.

If one class is not subscribed to any course, it never appears in the list of not registered classes for any course

I work on it and give you my feedback.

#14

Updated by Hubert Borderiou about 9 years ago

  • Status changed from Assigned to Needs testing

Fix sent.
Can you test it ?

(I have registered a new teacher account on stable.chamilo.org, but I don't have the "Create a course" link, so I cannot test it on this platform)

http://code.google.com/p/chamilo/source/detail?r=0625d0b4664c79fda1297320e1a3e2ea1b7f8b48&name=1.9.x&repo=classic

regards,

#15

Updated by Yoselyn Castillo about 9 years ago

  • Status changed from Needs testing to Bug resolved
  • Assignee deleted (Hubert Borderiou)
  • % Done changed from 50 to 100

Yes it works fine now.
I have inscribed 2 classes to the course "opening course" and I have left 1 class (clase1)without subscribing to any course and 1 class (clase5) subscribed to other course
I see classes registered to the course "opening course". It works fine
When I click on the (+) green button, In the list of classes not registered appeared clase1 and clase(5)

Also available in: Atom PDF