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