Hello. I am unable to access any of the information I speficially enter using the Classroom module with views. For Instance, what I am looking for is to be able to use the start date and end date and post it as a field in a view. I have 3 node-types that are courses, and I need to separate them on different pages and that is why I am using views. But I am forced to create a new field that will use Date, and ignore the start and end dates that this module asks for upon course creation/modification. This will ask the course creator to enter the Start and End dates twice, now, and I think that is just too repetitive.
Simpler terms: the "Course" creation section, which has the start and end dates, and signup dates, and grade percentages options, should be accessible fields for the rest of Drupal.
Let me know if I missed something please. Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | classroom-1.x-dev-727474-views-integration3.patch | 103.01 KB | wjaspers |
| #7 | classroom-1.x-dev-727474-views-integration2.patch | 21.54 KB | wjaspers |
| #4 | classroom-1.x-dev-727474-views-integration.zip | 5.57 KB | wjaspers |
Comments
Comment #1
imobachgs commentedHi,
Yes, you're right: Classroom lacks views integration. Anyway, we plan to add views integration in version 1.1. I'll keep you informed.
Thank you!
Comment #2
veleiro commentedThats great news. Thank you
Comment #3
wjaspers commentedFigured it out!
I got the Course dates and registration dates exposed, now to add all the other fun stuff.
May be a few weeks before its tested and I post a patch.
EDIT:
> Topic data exposed, sortable, and usable as arguments.
> Course data exposed, sortable, and usable as arguments.
> Notes:
Dates displayed as fields do not yet work with the "ago"/"hence" filters; work otherwise.
Comment #4
wjaspers commentedOk, here it is! Views integration.
Use with caution -- I haven't thoroughly tested it; but I can filter on, access, and display all the data as mentioned above. Views appears to be acting nicely with it thus far.
REQUIRES Views - 2.x or later!
Comment #5
wjaspers commentedOops, forgot to update the tracker.
More views integrations to be posted tomorrow. ;)
Comment #6
imobachgs commentedThank you wjaspers! I'll try to test the patch as soon as possible!
Comment #7
wjaspers commentedOk, this exposes all the major tables, excluding classroom_signup_requests.
NOTES:
Arguments on course ID may require a relationship to be set in order to work properly.
Unit tests have not been run -- although I am able to pull almost all the data I want.
There are NO default views included here.
This CAN ONLY be installed if the first patch has been applied!!!!
Whoops, I forgot to clean the patch header.
Remove the "C:/" up to and excluding "classroom" before applying the patch.
Comment #8
wjaspers commentedAlright, here's the most I can do as of recent.
This will allow correct relations between courses-assignments, courses-registrants(users), courses-resources, assignments-responses, and more.
I've also built and included a Default Views file ... although I can't say they're perfect.
The default views MUST be altered to work properly.
Depending on the content-types you define in your instance of Classroom for "Course", "Assignment", "Resource", and "Response", you absolutely MUST update the Arguments and Filters settings in each included view. Other than that, it should provide a rapid way of setting up your e-learning system.
There should be a better way to relate assignments, resources, and more to courses, but for now, use the included relationships for each view you build.
Notes:
> Added exposure to Views 2.x
> Added Default Views (more are needed, but this covers quite a few)
> Improved the naming of a few course fields in default node displays (NO DB changes were made).
> This does NOT yet include any views or access to views for classroom_forum or classroom_privatemsg
The attached patch will supplement Classroom 1.1.
You will NOT need to use the preceding patches to apply this one.
Hope this helps anyone interested in spring boarding an e-learning system with Classroom.
Comment #9
wjaspers commentedHow I didn't notice this before; but the component setting should be Code -- not User interface.
Comment #10
imobachgs commentedHi wjaspers,
I've got plans to merge your patches into the CVS by this weekend.
Thank you!
Comment #11
wjaspers commentedTheres a problem with topic access to views.
I'll post a patch AFTER I get feedback or a commit from the prior Views integration.
Comment #12
imobachgs commentedHi Will,
I've commited the third patch (comment #8).
Thank you!
Comment #14
imjohnbon commentedHi, sorry if this is a dumb question, I'm a bit new to patching, but which file do I patch with the patch in post #8? classroom.assignments.inc?
Comment #15
wjaspers commentedActually, several files need to be updated. I'm surprised osoh hasn't posted any -dev code. I also see things I could have done much better.
In the patch format I generated, each file is delimited as follows:
The --- indicates the original file, whereas +++ indicates the file to be modified. (Normally, when a patch is generated, two separate filenames are required. I simply changed all the filenames to overwrite the orignals.)
It might be worth ignoring
classroom\classroom.views_default.inc, since I later realized each of the views I had "predefined" were constructed off of "View Panes" (if you're not using Panels in your site).As my learning about Drupal has evolved, I now realize I shouldn't have updated the .info file, but if Views were mission critical--it would make more sense. Token should now be a dependency.
IGNORE this modification, because Views automatically looks for "<module>.views.inc" this file, and this line can slow down your site (not drastically, but enough).
Files that need to be modified:
How to read Patch lines:
- (removes the line)
+ (adds the line)
@@ -4,6 +4,8 @@ (Tells the patch processor what line changes start on, and where it will finish.)
" " (a space) don't modify the line. this is just here to give you context as to where to look to make a change.
The more I look at my patch, the more I realize some of my shortcomings. Unless you're dead-set on using this module, I might suggest ELMS until this is fixed up.
Comment #16
GolDRoger commentedSomeone can pleas attach the module patched please? I'm having some troubles doing this :/