Features & Development

Discussion on a problem for a student

Discussion on a problem for a student

by Raghu Gompa -
Number of replies: 35
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?
In reply to Raghu Gompa

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
In reply to Davide Cervone

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.

In this following I answer to your questions:

  • 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.
  • Raghu: I would still keep e-mail notification so that the professor will click on a link provided in the e-mail from the student to directly go to students question - but (s)he would record the answer that is visible only to the student at the particular question along with the question - and the student will get a e-mail notification that professor answered so that the student will go to the question by clicking a link in the notification. The main reason I want this feature is for the students to print out the discussion together with questions and answeres after due date is past so that they will better prepare for other exams, quizzes, etc. This feature should also work without e-mail component for the students, just in case their e-mail account was not working for some reason - it happend to me on several occasions - students reported that they haven't received my e-mail replies (one might wonder whether it is true :) ) More over WeBWorK gives the power of TeX, perl, etc to use mathematical symbols, graphs, etc. in the answer. It would be great if the professor has an option to link the whole discussion to the question so that all students will be able to (see each time they go to question - a discussin button will appear to click to see the discussion - and) print this discussion with their questions/answers after the due date. (I hope my wording is clear enough)

  • 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.



In reply to Davide Cervone

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.
In reply to Lars Jensen

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
In reply to Lars Jensen

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
In reply to Davide Cervone

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
In reply to Raghu Gompa

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

In reply to Davide Cervone

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
In reply to Raghu Gompa

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
In reply to Davide Cervone

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
In reply to Raghu Gompa

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.

E01
E02 (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

In reply to Raghu Gompa

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
In reply to Davide Cervone

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.
In reply to Davide Cervone

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
In reply to Raghu Gompa

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
In reply to Michael Gage

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
In reply to Davide Cervone

Re: Discussion on a problem for a student

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

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).

E01
E02 (1)
E05 (3)5











I am still working on adding more. Thanks. .. Raghu
In reply to Raghu Gompa

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?

Please help me understand this.

.. Raghu
In reply to Raghu Gompa

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
In reply to Davide Cervone

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
In reply to Raghu Gompa

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
In reply to Davide Cervone

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
In reply to Raghu Gompa

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
In reply to Davide Cervone

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?
In reply to Danny Glin

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
In reply to Davide Cervone

Re: Discussion on a problem for a student

by Raghu Gompa -
Davide,

I have been working and improving the discussion.pl. I am wondering whether it is possible to retrieve student's name (next to loginId) and show it with the entry:

My (public) Participation 2011-09-16 00:40 (RD03)
Professor Gompa,
I did not understand problem number 11 and 4 homework. I notice that I became very stressed when I stayed on those two problems almost 20 minutes each. Its so true what you said in class if you dont understand the problem you will have a hard time carrying out the other steps. I hope we can discuss these problems in class tomorrow night.


 

Thanks. .. Raghu

In reply to Raghu Gompa

Re: Discussion on a problem for a student

by Danny Glin -

The error message doesn't show up in your post.

In reply to Danny Glin

Re: Discussion on a problem for a student

by Raghu Gompa -

Here it is:


WeBWorK Error

WeBWorK has encountered a software error while attempting to process this problem. It is likely that there is an error in the problem itself. If you are a student, report this error message to your professor to have it corrected. If you are a professor, please consult the error output below for more information.

Error messages

ERRORS from evaluating PG file:
Error detected while loading [TMPL]/S11Journal/answerDiscussion.pl: PG_macro_file_eval detected error at line 123 of file [PG]/lib/PGloadfiles.pm Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at line 123 of [TMPL]/S11Journal/answerDiscussion.pl, chunk 1. The calling package is PGloadfiles Died within PGloadfiles::compile_file called at line 171 of [PG]/lib/PGloadfiles.pm from within PGloadfiles::loadMacros called at line 670 of [PG]/macros/PG.pl from within main::loadMacros called at line 3 of (eval 30077)

Error details

        Problem1
1. ERROR caught by Translator while processing problem file:S11Journal/answerDiscussionAboutMe.pg
****************
ERRORS from evaluating PG file: 
Error detected while loading [TMPL]/S11Journal/answerDiscussion.pl: PG_macro_file_eval detected error at line 123 of file [PG]/lib/PGloadfiles.pm Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at line 123 of [TMPL]/S11Journal/answerDiscussion.pl, chunk 1. The calling package is PGloadfiles Died within PGloadfiles::compile_file called at line 171 of [PG]/lib/PGloadfiles.pm from within PGloadfiles::loadMacros called at line 670 of [PG]/macros/PG.pl from within main::loadMacros called at line 3 of (eval 30077)
****************
------Input Read 1 DOCUMENT(); # This should be the first executable line in the problem. 2 3 loadMacros( 4 "PG.pl", 5 "PGbasicmacros.pl", 6 #"source.pl", #uncommenting this will display "show source" button if that is permitted 7 "answerDiscussion.pl", 8 "PGcourse.pl", 9 "PGML.pl" 10 ); 11 12 # 13 # List all the students in the course here. Leave out professors or other 14 # ids that you will not want to view. Place this file in the course 15 # templates/macros directory and rename it courseStudentList.pg 16 # 17 18 19 @StudentIds = ( 20 "RA01", 21 "RA02", 22 "RA03", 23 "RA04", 24 "RA05", 25 "RA06", 26 "RA07", 27 "RA08", 28 "RA09", 29 "RA10", 30 "RA11", 31 "RA12", 32 "RA13", 33 "RA14", 34 "RA15", 35 "RA16", 36 "RA17", 37 "RA18", 38 "RA19", 39 "RA20", 40 "RA21", 41 "RA22", 42 "RA23", 43 "RA24", 44 "RA25", 45 "RA26", 46 "RA27", 47 "RA28", 48 "RA29", 49 "RA30", 50 "RA31", 51 "RA32", 52 "RA33", 53 "RA34", 54 "RA35", 55 "RA36", 56 "RA37", 57 "RA38", 58 "RA39", 59 "RA40", 60 "RA41", 61 "RA42", 62 "RA43", 63 "RA44", 64 "RA45", 65 "RC01", 66 "RC02", 67 "RC03", 68 "RC04", 69 "RC05", 70 "RC06", 71 "RC07", 72 "RC08", 73 "RC09", 74 "RC10", 75 "RC11", 76 "RC12", 77 "RC13", 78 "RC14", 79 "RC15", 80 "RC16", 81 "RC17", 82 "RC18", 83 "RC19", 84 "RC20", 85 "RC21", 86 "RC22", 87 "RC23", 88 "RC24", 89 "RC25", 90 "RC26", 91 "RC27", 92 "RC28", 93 "RC29", 94 "RC30", 95 "rgompa", 96 ); 97 98 99 1; 100 #TEXT(beginproblem); 101 102 ############################################## 103 # 104 # This is the master problem for handling discussions. 105 # You should not need to edit it (except possibly to 106 # uncomment the line allowing student edits). 107 # Simply assign the problem to a problem set, 108 # and view the problem as a professor. Enter a 109 # message to start the discussion for the class. 110 # 111 # See the comments in answerDiscussion.pl for 112 # details of how to set up and use the 113 # discussion problem. 114 # 115 ############################################## 116 TEXT(EV2(<<EOT)); 117 $BBOLD About me. (Write about yourself - start with your name, phone number, and email.) 118 $BR This is not available for other students to view. 119 $BR 120 EOT 121 122 $discussion = new Discussion( 123 allowStudentEdits => 1, 124 ); 125 126 if ($displayMode eq 'TeX') { 127 $discussion->Hardcopy; 128 } else { 129 $discussion->Begin; 130 if ($discussion->{action} eq 'View All') { 131 $discussion->ViewAll; 132 } elsif ($discussion->{action} eq 'Show Student Array' && $discussion->{isProfessor}) { 133 $discussion->ShowStudents; 134 } else { 135 $selected = $discussion->selectedEntry; 136 $discussion->ComposeEntry if ($discussion->{inputs}{compose} || !$selected); 137 $discussion->ShowEntry($selected) if $selected; 138 } 139 $SuperProf = "rgompa"; 140 141 if(1) { 142 # $discussion->ViewAll; 143 $discussion->ShowStudents; 144 } 145 $discussion->Middle; 146 $discussion->EntryPanel($selected); 147 $discussion->OptionPanel; 148 $discussion->End; 149 } 150 151 ############################################## 152 153 ENDDOCUMENT(); # This should be the last executable line in the problem. -----

In reply to Raghu Gompa

Re: Discussion on a problem for a student

by Glenn Rice -
First it must be noted that answerDiscussion.pl is a macro that will cease to function starting with PG 2.18. This has been discussed by the development team, and the capability for a PG problem to send email has been removed. Really, sending email is something that a problem should not do. That is something that should be done by the front end (webwork2). In addition that particular macro uses many other things that eventually will no longer be provided to PG problems, like user ids.

The particular error you are seeing is because line 123 is invalid perl code. It is not valid to call defined on an array, as the error says. The line should be changed to
if (!@main::ProfessorIds) {
Remove "defined".
In reply to Glenn Rice

Re: Discussion on a problem for a student

by Raghu Gompa -

Well, I wanted to save this perl program to use in my class.  I made some adjustments like the one you suggested.  Still it has error messages.  This perl does not use sending email. 


I use this for confidential communications between professor and student.  For example:



All discussions in each of these problems are not available for any other students - Only instructor and you have access to this problem set.

1. About me. (Write about yourself - start with your name, phone number, and email.)

2. My Goals. (Write about your goals for this class and your plan to achieve them.)

3. My Journal. (Write about what you learned, what you felt, what you need to do, etc.)

4. My Absents. (Write about what when you were absent, and why, and how you prepared for the following class, etc.)

5. My Grades. (Write about what grade you want to achieve. Write about your grades in test1, test2, etc. ...)

 
In reply to Raghu Gompa

Re: Discussion on a problem for a student

by Glenn Rice -
Sorry, I was confusing this macro with the PGtextevaluators.pl macro. That one sends email.

This macro just has the issue of needing user id's and other user information to function. That is something that will not be available in pg much longer.

Email is a very good way of communicating confidentially with students. Your students can use the "Email Instructor". Do you really need a problem for these things?

If you want a problem, you could just use an essay answer question.  You can provide feedback via instructor comments.  In fact instructor comments can be provided for any problem.  Use the single problem grader for this.  The single problem grader was added to webwork2 version 2.16.  For webwork2 version 2.18, the old manual problem grader will be updated and also available for all problems.  This is just as confidential as the PGtextevaluators.pl macro's approach.
In reply to Glenn Rice

Re: Discussion on a problem for a student

by Raghu Gompa -

Thank you so much for your detailed explanation and your help.  I spent so many hours on modifying .pl and adding several .pg files and reaped benefits before.  I can't list all the features that are just great for my students and me.  I am little sad that I can not use them again.  Just for your information, here is another set of discussions that is public for all students:

WeBWorK assignment number MyParticipation11 is due: 05/08/2011 at 01:59am EDT.

This WeBWorK is voluntary.

All discussions in each of these problems are available for all students to view and respond.

1. Ask questions (and answer) about WeBWorK problems.

2. Formulas and discussion on them.

3. Any discussion about our course.

4. Announcements for group study or (math) parties.

5. Any discussion about anything other than our course.

6. Any announcements about community service.

7. I know some of you want to share some jokes with others. Here is a place where you can share. Go ahead - make us laugh.


In reply to Raghu Gompa

Re: Discussion on a problem for a student

by Glenn Rice -

At this point you can use the answerDiscussion.pl macro.  However, the macro is out of date which results in the errors that you are seeing.  Furthermore, in the future it will stop working entirely.  For webwork2 it should continue to work (barring errors in the code).  However, for webwork3 or anything that uses the standalone renderer it will cease to function.

If you can get the macro working again, a pull request to PG with the fixes would be appreciated.