## Features & Development

### Discussion on a problem for a student

by Raghu Gompa -
Number of replies: 27
I would like to see a discussion button under each question where the students enquiry to the professor and the professors answer and futher discussion would be stored - just like past answers buttons, but it should be accessible to student also.  Will this be possible?

### Re: Discussion on a problem for a student

by Davide Cervone -
One issue to be addressed would be how would the professor and the students know that there are new messages to be viewed? Would the professor have to look at each problem for each student for each problem set to see if there is something for him to respond to? That doesn't seem practical. If you go to mail notification, then I begin to wonder why an email interchange wouldn't be sufficient in the first place. I suppose it would be possible to have something like the "grades" listing, but with numbers of new messages instead, with links to the problems with new messages.

Alternatively, you could go with ONE place for the professor to make comments to the student. I put together an example discussion-style problem as a sample of what might be possible along these lines (it is not a full system, but gives a good idea of what one might look like). The student and professor can carry on a discussion like what you suggest, kind of like a blog for the student.

I can imagine setting up a "problem set" that is named "Blog" and stays open for the full semester and that has only one discussion problem in it. That is where students would look for new messages from the professor, and where the professor looks for new messages from students (there is a professor's interface that allows him or her to see what students have new messages). One of the nice things about this setup is that the student (and the professor) can easily include mathematics using either TeX code or the algebra-style strings that are used to enter answers into WeBWorK.

There is no easy way to link back and forth between specific problems and the blog in the sample I put together, but that sort of thing could be added. The example is at http://omega.math.union.edu/webwork2/UNION-examples if you want to try it out. Read the instructions in the grey boxes for details. (There is also an essay-style answer checker there that you might want to check out as well.)

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Thanks, Davide. I visited UNION-examples. They are great. I would like to use this discussion setting in my classes (jsu-112, jsu-221 - hosted by Univ of Rochestor). I do not know how I can implement this.

• Davide: One issue to be addressed would be how would the professor and the students know that there are new messages to be viewed? Would the professor have to look at each problem for each student for each problem set to see if there is something for him to respond to? That doesn't seem practical. If you go to mail notification, then I begin to wonder why an email interchange wouldn't be sufficient in the first place. I suppose it would be possible to have something like the "grades" listing, but with numbers of new messages instead, with links to the problems with new messages.

• Davide: Alternatively, you could go with ONE place for the professor to make comments to the student. I put together an example discussion-style problem as a sample of what might be possible along these lines (it is not a full system, but gives a good idea of what one might look like). The student and professor can carry on a discussion like what you suggest, kind of like a blog for the student.
• Davide: I can imagine setting up a "problem set" that is named "Blog" and stays open for the full semester and that has only one discussion problem in it. That is where students would look for new messages from the professor, and where the professor looks for new messages from students (there is a professor's interface that allows him or her to see what students have new messages). One of the nice things about this setup is that the student (and the professor) can easily include mathematics using either TeX code or the algebra-style strings that are used to enter answers into WeBWorK.
• Raghu: I like this and I went to UNION-examples to test it. I posted some questions over there. I hope I explained clearly what I visioned. Thanks for your help, Davide.

### Re: Discussion on a problem for a student

by Lars Jensen -
Raghu and Davide,

The idea of putting a "Discussion" button under each problem, and allow students to post a question/comment right under the problem is something I'd like to see as well. The obvious advantage of this system over the present system where students ask questions individually, over email, is (a) that students can respond, and (b) one avoids having to answer the same question several times.

In LON-capa, which has this feature, a student will click the "Discussion" link, and an empty message block appear where the student can write a question/comment. When submitted, the comment is posted immediately under the problem. The instructor, or another student can then post a reply, which then appear below again, etc. LON-capa doesn't have email notification, but it does have a "New activity" page that pops up immediately after login, and announces new posts on the site, and a direct link to the post. This works very well.

Lars.

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Lars, thank you very much for your post and input.  I would like to see the feature you suggested - it would generate discussion among students - a great plus in learning math effectively. .. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
I guess I misunderstood the original request. I thought this was an individual interaction between the student and teacher, not a public forum. My solution, and my suggestions for extensions to WeBWorK for it, are based on that model.

You are asking for the addition of a full bulletin-board system, and while I understand the desire for that, I don't think it is the direction WeBWorK should move in. There are a number of other products, like Moodle, WebCT, and so on, that implement that type of course-management system far better than WeBWorK is ever going to. It would be a mistake for WeBWorK to try to compete in that market.

Instead, the WeBWorK developers are working on ways of integrating WeBWorK into those other more full-featured systems. One of the first examples if this is the WeBWorK-Moodle bridge. This uses WeBWorK for what it's good at (rendering mathematics problems) and Moodle for what it's good at (managing all the other course functions). It seems to me that this is a profitable direction to pursue.

The development team for WeBWorK is quite small, and we need to spend our limited time in the areas where we can make the most difference, which (IMHO) is the mathematical end of things, not the bulletin-board end. At least that's how I see it.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide, I have been using the discussion button in my courses this semester. I liked all the features.

• I am wondering whether it is possible to show the number of old messages and the number of new messages next to student userid in the Student Array.

More over, this student array disappears when actually you view the student message (you act as student). So if you need to go to other student messages, you need to stop acting as the student, then click on Student array button.
• I am wondering whether this can be avoided and Student array appears as long as you are a professor.
Thanks for your attention. .. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
I am wondering whether this can be avoided and Student array appears as long as you are a professor.

This can be done. In fact, you can do it in two ways. First, you could add a line

    $SuperProf = "userid";  to the courseProfessorList.pl file. This user has the Option window all the time (though you still have to press the "Student Options" button, you at least don't have to stop acting). The other way is to edit the answerDiscussion.pl file and look for the line  return unless ($self->{isProfessor} && !$self->{isActing}) ||$self->{isSuperProf};

and replace it by
    return unless $self->{isProfessor} ||$self->{isSuperProf};

This will make all the regular professors get the Options panel on all pages.

I am wondering whether it is possible to show the number of old messages and the number of new messages next to student userid in the Student Array.

The student array currently shows the number of new messages, but not the number of old ones. It would certainly be possible to include the number of old messages, but that would take more space that I didn't think was necessary.

I'm afraid that I'm not planning to do any development on the answerDiscussion library any time soon. As I mentioned above, it was only intended as a proof-of-concept, and not as a production system. I'm pleased that you are able to make use of the system, and am interested in how your experience has gone. Perhaps you could post a message indicating what you thought worked well and what didn't, and what effect you think this has had pedagogically on your course.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide,

Thank you very much for your helpful suggestions. I will incorporate them in my files.

As you suggested, I will post my experiences later (at the end of the semester). So far I have been very pleased with what these discussion features doing for my students. I opened one set (this will stay open until the end of the semester) called MyJournal where students are writing what they have learned, what they want to explore, etc. (they are having little trouble with math codes - I am helping them at this stage with that too). Another set called IntroduceYourself where students are telling us about their math background, weekness, strengths. I would like to make this available to all other students but I guess I cannot the way it was set up.

Thanks again. .. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
It sounds like you are having some good success. I'd love to see the conversations you have had, and wonder if you would be interested in writing up something more formal about it, including some excerpts. A journal like the Journal of On-line Mathematics and its Applications (www.joma.org) might be interested in publishing such a piece.

As for letting the students view each other's messages, as you point out, that is not available under the current model, but it certainly is technically possible. I think it would require a more sophisticated approach. In particular, the flat-file paradigm would need to be changed to a threaded one, and a better "new messages" mechanism would be needed. But it could be done.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Thanks again, Davide, for your helpful suggestions. Yes, I would like to write something formal about how discussions on WeBWorK worked out for us. And yes, I am having very good feeling about these discussions on WeBWorK. I know very little perl. I tweaked a little to add some more features including the one you suggested in your earlier e-mail. (I was able to have student array present all the time to go back and forth between students.) However, doing something to enable all students to see the discussion -- I do not see the road yet. :)
.. Raghu

### Re: Discussion on a problem for a student

by Raghu Gompa -

Dear Davide, I would like to know whether there is a way to save (and retrieve) the discussions (with the associated users) even after the semester (new semester will have new students and new discussions).

Here is an update on the discussion.pl:

1. Student array appears as long as you are a superprof as long as you your viewing the discussion - you can jump between users just by clicking on the userid.
2.  The number of old messages and the number of new messages next to student userid in the Student Array (e.g., rgompa (12) 3 (in pink color) – rgompa has 12 messages already read, 3 messages not read). It shows only the number of old messages if there are no new messages (e.g., rgompa (15) (in green color) – rgompa has 15 messages already read). If there are no messages, there is no number after the username.
 E01E02 (1)E05 (3)5

So far, I have been using this discussion button for IntroduceYourself, MyJournal, MyGoals, and TalkToInstructor (this is used for asking questions and getting answers from the instructor - an alternate for e-mail instructor feature).

Thank you very much for such a nice feature for WeBWorK.

Sincerely, Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
I would like to know whether there is a way to save (and retrieve) the discussions (with the associated users) even after the semester
Well, I suppose it depends on what you mean by that. What form do you want the saved discussion to take? If you want hardcopy, you can use the "View all" button and then print the resulting page. Of course, that only gets you one student at a time. It would be possible to make a more complete hardcopy feature, but there is nothing like that at the moment.

If you mean to have the discussion remain like an active one, then that would be a little harder. The current system relies on the students actually being students in the course. The code would need to be modified to view the data for students who do not have active accounts in the course.

The data are stored in the courses html/tmp/gif directory in a subdirectory named Discussion. If you save that directory and its contents, you will have the data for the discussions, and we could use that the reconstruct the past discussions if we write the code for it. So you should be sure to make a backup of that data after the course is complete.

Depending on how your server is set up, you probably can use the FileManager to do it. Use the "^" button next to the directory menu at the top to move to the main course directory, and then double click the "html" directory, then the "tmp" directory, and finally the "gif" directory. You should see a Discussions directory. Select it and use the "Make Archive" button to create an archive of the discussions in your course (the individual discussions are in subdirectories in case you want to save them separately). You can then download the archive to your personal computer for safe keeping until there is code to let you read them again.

The files in the directories are listed as .png files, but they are really just text files, so you could probably read them using a text editor if you really wanted to see them. They are not encoded.

Anyway, if you could be clearer about what you think the "saved" version of the discussion should be like, we can see what can be done.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide, thank you very much for the detailed information. I am sorry I was not clear on my earlier request. I mean to have the discussion remain like an active ones: | want to be able to save these discussions, for example, as Math112Spring2008Disucssions. Once I click on this button, I should be able to see the student array just as I see during that semester and read the discussions just as before. (I know I did not explain like this before, I apologize.) I now understand the process involved for such a feature. .. Raghu

PS: The files are not in the directory html/tmp/gif/Discussion. I am not sure where they are.

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide, Looks like the data has been stored in/ww/htdocs/tmp/jsu-112/gif/ How do I access this folder?.. Raghu

### Re: Discussion on a problem for a student

by Michael Gage -
Dear Raghu,

You won't be able to access the tmp files on hosted directly, but I've sent you a copy of the discussion file.

Davide, -- I haven't had time to follow the details of this project, but can these files be stored in something other than the tmp directory?

# Location of course HTML files, passed to PG.
$courseDirs{html} = "$courseDirs{root}/html";
$courseURLs{html} = "$webwork_courses_url/\$courseName";

We can modify dangerousMacros.pl if necessary. That file needs a complete overhaul in any case. :-)
so a little hacking won't hurt it for the moment.

In principle everything in the tmp directory can be wiped out and then recreated without any loss of data --
just loss of time as the re-creation takes place -- and I don't think this Discussion directory qualifies. One of the reasons
the tmp files are not in the original standard location on hosted is that the tmp file is not backed up.

I don't think there is any danger in practice for an experiment on hosted,
but long term we should put these files somewhere else.

Looks like a nice project.

Take care,
Mike

### Re: Discussion on a problem for a student

by Davide Cervone -
• Can these files be stored in something other than the tmp directory?
Not without system-level changes (as you suspected). The reason they are stored there is that the only access to writing files that PG has is in order to create images, so the discussion macros take advantage of that. If you look at the contents of the directory, you will see that they all appear to be .png files even though they are text files. This is because I'm using a nasty hack to get write access to files, which is not normally allowed in PG.

I don't think there is any danger in practice for an experiment on hosted, but long term we should put these files somewhere else.
The discussion problem macros were only meant to illustrate some of the possibilities for PG, and were never intended as a production system (as I have said in the past). Certainly a number of improvements would be desirable, and they are only barely adequate as they stand.

You are right that the files should be stored elsewhere, but I wanted a mechanism that could be used without system-level changes. Certainly an improved system would include more appropriate file access, say a top-level directory in the course directory for the discussion data. (Technically, the data probably should be in the MySQL database, but currently there is no method for doing that from PG, and my initial attempts to add one proved fruitless.)

This could be made possible by changes to dangerousMacros.pl, as you suggest, or through a new .pm file in pg/lib, which might be a better approach. I worked out a preliminary specification for a TextFile object that could be used to coordinate file access with appropriate restrictions, and that should make this type of data storage more practical. Note sure when I will get to implement it, though.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Thank you very much, Davide and Mike. .. Raghu

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide,

I was able to modify discussion.pl to include the following features:

1. Student array appears with out links for all students (just to give a summary of number of posts by each user).
2. Study array with links if you are a superprof as long as your viewing the discussion - you can jump between users just by clicking on the userid.
3. View All button shows all the posts for all students. Students can not edit or delete anybody else's posts. However, they can edit their own posts (this can be disallowed).
4. View All button shows all the posts for superProf who can edit or delete anybody else's posts. However, they can edit their own posts (this can be disallowed).
5. The number of old messages and the number of new messages next to student userid in the Student Array (e.g., E05 (3) 5 (in pink color) – E05 has 3 messages already read, 5 messages not read). It shows only the number of old messages if there are no new messages (e.g., E02 (1) (in green color) – E02 has 1 messages already read). If there are no messages, there is no number after the username (e.g., E01 has no posts).
 E01E02 (1)E05 (3)5

I am still working on adding more. Thanks. .. Raghu

### Re: Discussion on a problem for a student

by Raghu Gompa -
Dear Davide,

I noticed that some characters like @ is not showing in the discussions. For example, raghu.gompa@jsums.edu is showing only raghu.gompa.edu. Why?

Another question:
Would it be possible to have hyperlinks in these discussions?

.. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
This was a bug in answerDiscussion.pl, which I have fixed and submitted to the CVS repository. You can get the update from there.

As I recall, you have hand-edited your copy, and so you may want to make this update by hand as well. In that case, you should look for the two lines that include processCommands=>0 and add ,processVariables=>0 right after that (inside the braces) so that variable substitution will be prevented. This is what was causing the loss of @xxx, because that looks like an array variable to perl and it tried to insert the contents of that variable (which was empty).

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Thank you very much, Davide. Your suggestion fixed the problem.

Will you please give me some suggestions how we can include hyperlinks to other websites (for example)?

.. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
There is no current mechanism for doing this. Of course, it would be possible to add one, but one is getting now into the realm of creating a new markup language. One could try to implement something like the Markdown language, for example, but I have no plans to do that at the moment.

Your best bet is just to include the URL as text and have the students cut and past it into the address bar. It is a non-trivial change to add this in properly.

Davide

### Re: Discussion on a problem for a student

by Raghu Gompa -
Thanks, Davide.

I noticed a peculiar thing. One students discussion was posted with a time stamp: 2009-01-32 20:06 (RA38) I suspect that it was posted on 2/2/2009. Can you please give me your thoughts on this? Thanks. .. Raghu

### Re: Discussion on a problem for a student

by Davide Cervone -
It was an error on my part in the conversion of the date to the string form. I've fixed it in the CVS copy.

Davide

### Re: Discussion on a problem for a student

by Danny Glin -
Just curious if any more progress has been made on this, and whether it is something that will continue to be developed.
Any news?

### Re: Discussion on a problem for a student

by Davide Cervone -
I have done nothing new on this for some time. I'm afraid it is not a high priority at the moment. This was basically an experiment to see what was possible, but my impression is that there are other tools that are better suited to this type of communication. As I think I've mentioned in the past, the direction WeBWorK is taking is to become a rendering service that works behind the scenes for other user interfaces, and the development work is going in that direction rather than enhancing the interface for WeBWorK itself. So I don't expect to see much active work on these discussion macros.

Davide