Annotation of loncom/html/adm/helper/course.initialization.helper, revision 1.3
1.2 bowersj2 1: <helper title="Course Initialization Helper" requiredpriv='opa'>
2:
3: <exec>
4: $helper->{DATA}->{DOM} = $ENV{'course.'.$ENV{'request.course.id'}.'.domain'};
5: $helper->{DATA}->{CRS} = $ENV{'course.'.$ENV{'request.course.id'}.'.num'};
6:
7: $helper->{DATA}->{GETVAL} = sub {
8: my @resultlist = &Apache::lonnet::get('environment', [shift()],
9: $helper->{DATA}->{DOM},
10: $helper->{DATA}->{CRS});
11: return $resultlist[1]; };
12: $helper->{DATA}->{SETVAL} = sub {
13: my $name = shift;
14: my $val = shift;
15: if (&{$helper->{DATA}->{GETVAL}}($name) ne $val) {
16: &Apache::lonnet::put('environment', {$name=>$val},
17: $helper->{DATA}->{DOM},
18: $helper->{DATA}->{CRS});
19: return 1;
20: } else {
21: return 0;
22: }
23: }
24: </exec>
1.1 bowersj2 25:
26: <state name="START" title="Welcome to Your New LON-CAPA Course">
1.3 ! bowersj2 27: <message nextstate="COURSE_DESCRIPTION">
1.2 bowersj2 28: This Helper will help you set up your new LON-CAPA course and choose
1.1 bowersj2 29: which LON-CAPA features will be active in your course. You can
1.2 bowersj2 30: re-visit it later to change settings in your course.
1.1 bowersj2 31:
32: <p><b>FIXME:</b> Figure out some way to detect whether this has been
33: run, and change that paragraph appropriatly.</p>
34:
35: <p>If you have previous experience with coordinating LON-CAPA courses and
1.2 bowersj2 36: prefer not to use the Helper,
37: <a href="/adm/navmaps">click here</a> to leave this Helper.</p>
1.1 bowersj2 38:
1.2 bowersj2 39: <p>All settings which you can change with this Helper can also be changed while the
1.1 bowersj2 40: course is running by going to the PARM screen and clicking on the "Set
41: course environment" button.</p>
42:
43: <p>If you do not have experience coordinating LON-CAPA courses, or if you
1.2 bowersj2 44: prefer the Helper interface, please click <nobr><b>Next -></b></nobr>.</p>
1.1 bowersj2 45: </message>
46: </state>
47:
1.3 ! bowersj2 48: <state name="COURSE_DESCRIPTION">
! 49: <message nextstate="FORBID_DISCUSSION">
! 50: The "Course Description" is the name of the course that will be
! 51: seen by the students. This should have been set up correctly when the
! 52: course was created, but please confirm that it is correct, or change it
! 53: if neccessary. Hit a <nobr>"<b>Next -></b>;"</nobr> to continue.
! 54: </message>
! 55: <string variable='description' size='60' >
! 56: <defaultvalue>
! 57: return &{$helper->{DATA}->{GETVAL}}('description');
! 58: </defaultvalue>
! 59: <finalcode>
! 60: if (&{$helper->{DATA}->{SETVAL}}('description', $element->getValue())) {
! 61: return 'Course description changed to <b>' . $element->getValue() .
! 62: '</b>.';
! 63: }
! 64: </finalcode>
! 65: </string>
! 66: </state>
! 67:
1.1 bowersj2 68: <state name="FORBID_DISCUSSION" title="Discussion Participation">
69: <message nextstate="DISCUSSION_HTML">
1.2 bowersj2 70: LON-CAPA hosts discussions on all resources in a course. By default,
71: all users are allowed to participate in these discussions.
1.1 bowersj2 72:
73: <p>For more information about discussion and the abilities available
74: to you as a course coordinator, such as banning abusive users or
75: hiding discussion postings, please see <b>link</b>.</p>
76:
77: <p>If you do not wish certain classes of users to be able to use the
1.2 bowersj2 78: discussion features, select those classes below. Note your class
79: may not have all of these roles; you may safely ignore roles you
80: do not intend to use. (For instance, "Exam Proctor" is
81: generally useful only for large courses.)</p>
1.1 bowersj2 82:
83: <p><b>Question: Does inability to use discussion mean they simply can't
84: post, or that they can't see the discussion at all?</b></p>
85: </message>
1.2 bowersj2 86: <choices variable="BANNED_DISCUSSION_ROLES" multichoice="1" allowempty='1'>
1.1 bowersj2 87: <choice computer="st"><b>Students</b> - students will not be able to participate in discussions</choice>
88: <choice computer="ta"><b>Teaching Assistants</b> - teaching assistants will not be able to participate in discussions</choice>
89: <choice computer="in"><b>Instructor</b> - instructors will not be able to participate in discussions</choice>
1.2 bowersj2 90: <choice computer="ep"><b>Exam Proctor</b> - exam proctors will not be able to participate in discussions</choice>
91: <defaultvalue>
92: my $denied = &{$helper->{DATA}->{GETVAL}}('pch.roles.denied');
93: $denied =~ s/,/\|\|\|/g;
94: return $denied;
95: </defaultvalue>
96: <finalcode>
97: my $denied = $element->getValue();
98: $denied =~ s/\|\|\|/,/g;
99: if (&{$helper->{DATA}->{SETVAL}}('pch.roles.denied', $denied)) {
100: $denied =~ s/st/ students/;
101: $denied =~ s/in/ instructors/;
102: $denied =~ s/ta/ teaching assistants/;
103: $denied =~ s/ep/ exam proctors/;
104: if ($denied =~ /^[^,]*,[^,]*$/) { # only one comma
105: $denied =~ s/,/ and/g;
106: } else { # add "and" to last comma
107: $denied =~ s/,([^,]*)$/, and\1/;
108: }
109: if ($denied) {
110: $denied = substr($denied, 1) . ' not allowed to participate in discussion.';
111: $denied = ucfirst($denied);
112: } else {
113: $denied = 'Everyone can participate in discussion.';
114: }
115: return $denied;
116: } else {
117: return '';
118: }
119: </finalcode>
1.1 bowersj2 120: </choices>
121: </state>
122:
123: <state name="DISCUSSION_HTML" title="HTML in Discussions">
1.3 ! bowersj2 124: <message nextstate="FEEDBACK_ADDRESSES">
1.1 bowersj2 125: <p>If you like, limited HTML can be allowed in the course discussions.</p>
126: </message>
127: <choices variable="HTML_ALLOWED">
128: <choice computer=""><b>HTML banned</b>: HTML will not be allowed in discussion postings.</choice>
129: <choice computer="yes"><b>HTML allowed</b>: Discussion participants can use limited HTML in their postings.</choice>
1.3 ! bowersj2 130: <defaultvalue>
! 131: return &{$helper->{DATA}->{GETVAL}}('allow_limited_html_in_feedback');
! 132: </defaultvalue>
! 133: <finalcode>
! 134: if (&{$helper->{DATA}->{SETVAL}}('allow_limited_html_in_feedback', $element->getValue())) {
! 135: if ($element->getValue() eq 'yes') {
! 136: return 'Limited HTML allowed in feedback.';
! 137: } else {
! 138: return 'HTML not allowed in feedback.';
! 139: }
! 140: }
! 141: </finalcode>
1.1 bowersj2 142: </choices>
1.2 bowersj2 143: </state>
144:
1.3 ! bowersj2 145: <state name="FEEDBACK_ADDRESSES" title="Feedback Addresses for Course Content">
! 146: <message nextstate="FINAL">
! 147: People in the course can provide feedback about the resources used in
! 148: the course by using the <b>FDBK</b> button while viewing a resource. If
! 149: the user labels the feedback as a "question about course content",
! 150: it is sent to the course coordinator of that course.
! 151:
! 152: <p>If you'd like that feedback to be sent to someone else, such as a
! 153: different instructor, please enter their LON-CAPA address below, in the
! 154: form <b>user:domain</b>, where "user" and "domain"
! 155: are both the LON-CAPA username and LON-CAPA domain, not an email
! 156: address.</p>
! 157: </message>
! 158: <eval>return '<p>Your current LON-CAPA domain is "<b>'
! 159: . $helper->{DATA}->{DOM} .
! 160: '</b>".</p>';
! 161: </eval>
! 162: <string variable='feedback_addresses' size='60' >
! 163: <defaultvalue>
! 164: return &{$helper->{DATA}->{GETVAL}}('comment.email');
! 165: </defaultvalue>
! 166: <finalcode>
! 167: if (&{$helper->{DATA}->{SETVAL}}('comment.email', $element->getValue())) {
! 168: return 'Comment address(es) updated to <b>' . $element->getValue() .
! 169: '</b>.';
! 170: }
! 171: </finalcode>
! 172: </string>
! 173: <message>
! 174: <p><b>Advanced Functionality</b>: If you'd like to redirect different
! 175: section's feedback to different people, you can enter it as follows:</p>
! 176:
! 177: <ul><li>Seperate each entry with a comma.</li>
! 178: <li>To send feedback to a certain address for different sections,
! 179: append the section name or names (seperated by semi-colons)
! 180: in a parenthesized list after the <b>user:domain</b>.</li></ul>
! 181:
! 182: <p>For example,</p>
! 183:
! 184: <p><b>john102:msu(001;002;003),bob293:msu(004;005;006),madeupname:here(007;008;009)</b></p>
! 185:
! 186: <p>will route course feedback to "john102" for sections 1, 2, and 3, to
! 187: "bob293" for 4, 5, and 6, and to "madeupname:here" for
! 188: 7, 8, and 9. Note there is no requirement that the addresses be in any
! 189: particular domain.</p>
! 190: </message>
! 191: </state>
1.2 bowersj2 192:
193: <state name="FINAL" title="Completed">
1.3 ! bowersj2 194: <message>Your course is now set up. Please select the <b>Finish Course
! 195: Initialization</b> button to re-intialize the course with your chosen
! 196: settings. You will be taken to the <b>NAV</b> screen for your course.
! 197:
! 198: <p>Remember that all of these settings can be modified in the <b>PARMS</b>
! 199: screen, by pushing the <b>Course Environment</b> button.</p>
! 200: </message>
! 201: <final restartCourse='1' />
1.1 bowersj2 202: </state>
203: </helper>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>