Skip to content

Commit d9d6190

Browse files
committed
Student Scheduling Disclaimer: Data Entry
- added Student Scheduling Disclaimer field on the instructinal offering config level - editable with InstructionalOfferingEditDisclaimer permission using Instructional Offering Configuration or Multiple Class Setup page
1 parent 31d028f commit d9d6190

19 files changed

Lines changed: 281 additions & 14 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Licensed to The Apereo Foundation under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
5+
*
6+
* The Apereo Foundation licenses this file to you under the Apache License,
7+
* Version 2.0 (the "License"); you may not use this file except in
8+
* compliance with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
*
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
*/
20+
21+
alter table instr_offering_config add sched_disclaimer varchar(2000) null;
22+
23+
insert into rights (role_id, value)
24+
select distinct r.role_id, 'InstrOfferingConfigEditDisclaimer'
25+
from roles r, rights g where g.role_id = r.role_id and g.value = 'InstrOfferingConfigEdit';
26+
27+
/*
28+
* Update database version
29+
*/
30+
31+
update application_config set value='275' where name='tmtbl.db.version';
32+
33+
commit;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Licensed to The Apereo Foundation under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
5+
*
6+
* The Apereo Foundation licenses this file to you under the Apache License,
7+
* Version 2.0 (the "License"); you may not use this file except in
8+
* compliance with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
*
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
*/
20+
21+
alter table instr_offering_config add sched_disclaimer varchar2(2000 char);
22+
23+
insert into rights (role_id, value)
24+
select distinct r.role_id, 'InstrOfferingConfigEditDisclaimer'
25+
from roles r, rights g where g.role_id = r.role_id and g.value = 'InstrOfferingConfigEdit';
26+
27+
/*
28+
* Update database version
29+
*/
30+
31+
update application_config set value='275' where name='tmtbl.db.version';
32+
33+
commit;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Licensed to The Apereo Foundation under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
5+
*
6+
* The Apereo Foundation licenses this file to you under the Apache License,
7+
* Version 2.0 (the "License"); you may not use this file except in
8+
* compliance with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
*
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
*/
20+
21+
alter table instr_offering_config add sched_disclaimer varchar(2000);
22+
23+
insert into rights (role_id, value)
24+
select distinct r.role_id, 'InstrOfferingConfigEditDisclaimer'
25+
from roles r, rights g where g.role_id = r.role_id and g.value = 'InstrOfferingConfigEdit';
26+
27+
/*
28+
* Update database version
29+
*/
30+
31+
update application_config set value='275' where name='tmtbl.db.version';
32+
33+
commit;

JavaSource/InstrOfferingConfig.hbm.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@
8585
type="java.lang.Long"
8686
not-null="false"
8787
length="20"/>
88+
89+
<property
90+
name="schedulingDisclaimer"
91+
column="sched_disclaimer"
92+
type="java.lang.String"
93+
not-null="false"
94+
length="2000"/>
8895

8996
<many-to-one
9097
name="classDurationType"

JavaSource/dbupdate.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15730,4 +15730,20 @@
1573015730
<mysql onFail="next">create index idx_student_enrl_student on %SCHEMA%.student_enrl(student_id)</mysql>
1573115731
<pgsql onFail="next">create index idx_student_enrl_student on %SCHEMA%.student_enrl(student_id)</pgsql>
1573215732
</update>
15733+
<update version="275" date="3-Feb-2026" comment="Student Scheduling Disclaimer">
15734+
<mysql>
15735+
alter table %SCHEMA%.instr_offering_config add sched_disclaimer varchar(2000) null
15736+
</mysql>
15737+
<plsql>
15738+
alter table %SCHEMA%.instr_offering_config add sched_disclaimer varchar2(2000 char)
15739+
</plsql>
15740+
<pgsql>
15741+
alter table %SCHEMA%.instr_offering_config add sched_disclaimer varchar(2000)
15742+
</pgsql>
15743+
<sql>
15744+
insert into %SCHEMA%.rights (role_id, value)
15745+
select distinct r.role_id, 'InstrOfferingConfigEditDisclaimer'
15746+
from %SCHEMA%.roles r, %SCHEMA%.rights g where g.role_id = r.role_id and g.value = 'InstrOfferingConfigEdit'
15747+
</sql>
15748+
</update>
1573315749
</dbupdate>

JavaSource/org/unitime/localization/messages/CourseMessages.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6084,4 +6084,7 @@ public interface CourseMessages extends Messages {
60846084

60856085
@DefaultMessage("No Associated Course")
60866086
String itemNoParentCourse();
6087+
6088+
@DefaultMessage("Student Scheduling Disclaimer:")
6089+
String propertySchedulingDisclaimer();
60876090
}

JavaSource/org/unitime/timetable/gwt/client/offerings/InstrOfferingConfigPage.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
import com.google.gwt.user.client.ui.Composite;
6363
import com.google.gwt.user.client.ui.Label;
6464
import com.google.gwt.user.client.ui.ListBox;
65+
import com.google.gwt.user.client.ui.TextArea;
6566
import com.google.gwt.user.client.ui.TextBox;
6667
import com.google.gwt.user.client.ui.Widget;
6768

@@ -311,6 +312,24 @@ public void onValueChange(ValueChangeEvent<String> event) {
311312
});
312313
iLimitRow = iForm.addRow(MESSAGES.propertyConfigurationLimit(), iLimit);
313314

315+
if (iData.isCanEditSchedulingDisclaimer()) {
316+
TextArea disclaimer = new TextArea();
317+
disclaimer.setHeight("66px");
318+
disclaimer.setWidth("100%");
319+
if (iData.hasSchedulingDisclaimer()) disclaimer.setText(iData.getSchedulingDisclaimer());
320+
iForm.addRow(MESSAGES.propertySchedulingDisclaimer(), disclaimer);
321+
disclaimer.addValueChangeHandler(new ValueChangeHandler<String>() {
322+
@Override
323+
public void onValueChange(ValueChangeEvent<String> event) {
324+
iData.setSchedulingDisclaimer(event.getValue());
325+
}
326+
});
327+
} else if (iData.hasSchedulingDisclaimer()) {
328+
Label disclaimer = new Label(iData.getSchedulingDisclaimer());
329+
disclaimer.addStyleName("note");
330+
iForm.addRow(MESSAGES.propertySchedulingDisclaimer(), disclaimer);
331+
}
332+
314333
if (iData.isDisplayCourseLink()) {
315334
CourseDetailsWidget link = new CourseDetailsWidget(true);
316335
link.reload(iData.getCourseId());

JavaSource/org/unitime/timetable/gwt/client/offerings/MultipleClassSetupPage.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import com.google.gwt.user.client.ui.Image;
6262
import com.google.gwt.user.client.ui.Label;
6363
import com.google.gwt.user.client.ui.ListBox;
64+
import com.google.gwt.user.client.ui.TextArea;
6465
import com.google.gwt.user.client.ui.Widget;
6566

6667
/**
@@ -245,6 +246,24 @@ public void onValueChange(ValueChangeEvent<String> event) {
245246
});
246247
iLimitRow = iForm.addRow(MESSAGES.propertyConfigurationLimit(), iLimit);
247248

249+
if (iData.isCanEditSchedulingDisclaimer()) {
250+
TextArea disclaimer = new TextArea();
251+
disclaimer.setHeight("66px");
252+
disclaimer.setWidth("100%");
253+
if (iData.hasSchedulingDisclaimer()) disclaimer.setText(iData.getSchedulingDisclaimer());
254+
iForm.addRow(MESSAGES.propertySchedulingDisclaimer(), disclaimer);
255+
disclaimer.addValueChangeHandler(new ValueChangeHandler<String>() {
256+
@Override
257+
public void onValueChange(ValueChangeEvent<String> event) {
258+
iData.setSchedulingDisclaimer(event.getValue());
259+
}
260+
});
261+
} else if (iData.hasSchedulingDisclaimer()) {
262+
Label disclaimer = new Label(iData.getSchedulingDisclaimer());
263+
disclaimer.addStyleName("note");
264+
iForm.addRow(MESSAGES.propertySchedulingDisclaimer(), disclaimer);
265+
}
266+
248267
P topSubpartLimits = new P("subpart-limits");
249268
P bottomSubpartLimits = new P("subpart-limits");
250269
P topSnapshotLimits = new P("subpart-limits");

JavaSource/org/unitime/timetable/gwt/client/offerings/OfferingDetailPage.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import com.google.gwt.user.client.rpc.AsyncCallback;
5656
import com.google.gwt.user.client.ui.Anchor;
5757
import com.google.gwt.user.client.ui.Composite;
58+
import com.google.gwt.user.client.ui.Label;
5859
import com.google.gwt.user.client.ui.SimplePanel;
5960

6061
public class OfferingDetailPage extends Composite {
@@ -278,6 +279,11 @@ public void onSuccess(final OfferingDetailResponse response) {
278279
for (final OfferingConfigInterface config: response.getConfigs()) {
279280
UniTimeHeaderPanel hp = new UniTimeHeaderPanel(config.getName());
280281
iPanel.addHeaderRow(hp);
282+
if (config.hasSchedulingDisclaimer()) {
283+
Label disclaimer = new Label(config.getSchedulingDisclaimer());
284+
disclaimer.addStyleName("note");
285+
iPanel.addRow(COURSE.propertySchedulingDisclaimer(), disclaimer);
286+
}
281287
iPanel.addRow(new TableWidget(config));
282288
if (config.hasAnchor()) {
283289
Anchor a = new Anchor(); a.setName(config.getAnchor()); a.getElement().setId(config.getAnchor());

JavaSource/org/unitime/timetable/gwt/client/offerings/OfferingsInterface.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public void addConfig(OfferingConfigInterface configuration) {
231231
public static class OfferingConfigInterface extends TableInterface {
232232
private Set<String> iOperations;
233233
private Long iConfigId;
234+
private String iSchedulingDisclaimer;
234235

235236
public Long getConfigId() { return iConfigId; }
236237
public void setConfigId(Long configId) { iConfigId = configId; }
@@ -240,6 +241,10 @@ public void addOperation(String operation) {
240241
if (iOperations == null) iOperations = new HashSet<String>();
241242
iOperations.add(operation);
242243
}
244+
245+
public String getSchedulingDisclaimer() { return iSchedulingDisclaimer; }
246+
public void setSchedulingDisclaimer(String schedulingDisclaimer) { iSchedulingDisclaimer = schedulingDisclaimer; }
247+
public boolean hasSchedulingDisclaimer() { return iSchedulingDisclaimer != null && !iSchedulingDisclaimer.isEmpty(); }
243248
}
244249

245250
public static class SubpartDetailRequest implements GwtRpcRequest<SubpartDetailReponse> {

0 commit comments

Comments
 (0)