Skip to content

Commit c95b915

Browse files
committed
Merge branch 'release/2024.2'
2 parents dc764a6 + c007046 commit c95b915

File tree

386 files changed

+12949
-4429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+12949
-4429
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ issue here (not in the title) so as to utilise automatic linking.
2626

2727
<!-- Reference Links -->
2828

29-
[contributor license agreement]: https://www.apereo.org/node/676
29+
[contributor license agreement]: https://www.apereo.org/about/governance/licensing
3030
[commit guidelines]: https://chris.beams.io/posts/git-commit/

.github/workflows/ci.yaml

+20-19
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
build_and_check:
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-22.04
2424
steps:
2525
- uses: actions/checkout@v4
2626

@@ -123,13 +123,13 @@ jobs:
123123
target/*.zip
124124
125125
- name: Save primary artefacts
126-
uses: actions/upload-artifact@v3.1.3
126+
uses: actions/upload-artifact@v4.4.0
127127
with:
128128
name: Artefacts
129129
path: artefacts.tar
130130

131131
build_storybook:
132-
runs-on: ubuntu-latest
132+
runs-on: ubuntu-22.04
133133
steps:
134134
# Using v1 (rather than v2) through-out this workflow due to issue:
135135
# https://github.com/actions/checkout/issues/237
@@ -174,15 +174,15 @@ jobs:
174174
tar cvf storybook.tar storybook-static
175175
176176
- name: Save Static Storybook instance
177-
uses: actions/upload-artifact@v3.1.3
177+
uses: actions/upload-artifact@v4.4.0
178178
with:
179179
name: Storybook
180180
path: react-front-end/storybook.tar
181181

182182
functional_testing:
183183
needs: build_and_check
184184

185-
runs-on: ubuntu-latest
185+
runs-on: ubuntu-22.04
186186

187187
strategy:
188188
matrix:
@@ -213,6 +213,7 @@ jobs:
213213
AUTOTEST_CONFIG: autotest/github-actions.conf
214214
EQ_EXIFTOOL_PATH: /usr/bin/exiftool
215215
OLD_TEST_NEWUI: ${{ matrix.newui }}
216+
MATRIX_ID: ${{ matrix.newui && 'NEWUI' || 'OLDUI' }}-psql_${{ matrix.pgsql-image }}
216217

217218
steps:
218219
- name: Install OS dependencies
@@ -236,7 +237,7 @@ jobs:
236237
node-version-file: '.nvmrc'
237238

238239
- name: Download Artefacts
239-
uses: actions/download-artifact@v3
240+
uses: actions/download-artifact@v4.1.7
240241
with:
241242
path: Artefacts
242243
name: Artefacts
@@ -263,9 +264,9 @@ jobs:
263264
264265
- name: Save Scalacheck results
265266
if: matrix.newui && failure()
266-
uses: actions/upload-artifact@v3.1.3
267+
uses: actions/upload-artifact@v4.4.0
267268
with:
268-
name: ScalacheckReports
269+
name: ScalacheckReports-${{ env.MATRIX_ID }}
269270
path: autotest/Tests/target/test-reports
270271

271272
- name: Run TestNG tests
@@ -274,23 +275,23 @@ jobs:
274275
275276
- name: Save TestNG Reports
276277
if: failure()
277-
uses: actions/upload-artifact@v3.1.3
278+
uses: actions/upload-artifact@v4.4.0
278279
with:
279-
name: TestNGReports-new-${{ matrix.newui }}
280+
name: TestNGReports-${{ env.MATRIX_ID }}
280281
path: autotest/OldTests/target/testng
281282

282283
- name: Save oEQ Logs
283284
if: failure()
284-
uses: actions/upload-artifact@v3.1.3
285+
uses: actions/upload-artifact@v4.4.0
285286
with:
286-
name: oEQLogs-new-${{ matrix.newui }}
287+
name: oEQLogs-${{ env.MATRIX_ID }}
287288
path: autotest/equella-install/logs
288289

289290
- name: Save Screenshots
290291
if: failure()
291-
uses: actions/upload-artifact@v3.1.3
292+
uses: actions/upload-artifact@v4.4.0
292293
with:
293-
name: Screenshots-new-${{ matrix.newui }}
294+
name: Screenshots-${{ env.MATRIX_ID }}
294295
path: autotest/Tests/target/test-reports/screenshots
295296

296297
- name: Generate coverage report
@@ -305,15 +306,15 @@ jobs:
305306
tar cvf coverage_report.tar autotest/target/coverage-report/
306307
307308
- name: Save Coverage Report
308-
uses: actions/upload-artifact@v3.1.3
309+
uses: actions/upload-artifact@v4.4.0
309310
with:
310-
name: CoverageReport-newui-${{ matrix.newui }}
311+
name: CoverageReport-${{ env.MATRIX_ID }}
311312
path: coverage_report.tar
312313

313314
rest-module-testing:
314315
needs: build_and_check
315316

316-
runs-on: ubuntu-latest
317+
runs-on: ubuntu-22.04
317318

318319
services:
319320
postgres:
@@ -356,7 +357,7 @@ jobs:
356357
node-version-file: '.nvmrc'
357358

358359
- name: Download installer
359-
uses: actions/download-artifact@v3
360+
uses: actions/download-artifact@v4.1.7
360361
with:
361362
path: Artefacts
362363
name: Artefacts
@@ -387,7 +388,7 @@ jobs:
387388
388389
- name: Save oEQ logs for REST Module
389390
if: failure()
390-
uses: actions/upload-artifact@v3.1.3
391+
uses: actions/upload-artifact@v4.4.0
391392
with:
392393
name: oEQ-logs-rest-module
393394
path: autotest/equella-install/logs

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include:
22
project: edalex-group/development/oeq/openequella-ci
33
file: build/main.yml
4-
ref: build/pre-2024.2
4+
ref: main

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ When you submit an issue, please take the time to provide as much info as you ca
3131
As per standard Apereo projects: If you wish to contribute to openEQUELLA itself, you should first
3232
subscribe to the openEQUELLA Google Group as outlined above and discuss your contributions with
3333
the other developers. You will also need to sign a
34-
[Contributor License Agreement](https://www.apereo.org/node/676).
34+
[Contributor License Agreement](https://www.apereo.org/about/governance/licensing).
3535

3636
But after that, as per usual GitHub, please first fork the project and then branch off `develop` or a
3737
stable branch (see below) to use a 'feature' branch. Branches should follow the naming convention of:

Installer/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Path.relativeTo
22

33
libraryDependencies ++= Seq(
44
"com.google.guava" % "guava" % "32.1.3-jre",
5-
"commons-codec" % "commons-codec" % "1.16.1",
5+
"commons-codec" % "commons-codec" % "1.17.0",
66
postgresDep,
77
sqlServerDep
88
)

NOTICE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright <2023>, The Apereo Foundation
1+
Copyright <2024>, The Apereo Foundation
22

33
This project includes software developed by The Apereo Foundation.
44
http://www.apereo.org/

Platform/Plugins/com.tle.platform.common/src/com/dytech/devlib/PropBagEx.java

+19
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,25 @@ public Map<String, String> getAttributesForNode(final String path) {
14171417
}
14181418
}
14191419

1420+
/**
1421+
* Sets an attribute on the XML node.
1422+
*
1423+
* <p>For example, if the XML is: {@code <xml> <item/> </xml> } And with `setAttribute("/item",
1424+
* "name", "value")`, the result is: {@code <xml> <item name="value"/> </xml> }
1425+
*
1426+
* @param path The path to the node.
1427+
* @param attribute The name of the attribute.
1428+
* @param value The value of the attribute.
1429+
*/
1430+
public void setAttribute(String path, String attribute, String value) {
1431+
ensureRoot();
1432+
checkNotAttribute(path);
1433+
1434+
final Node node = getNodeHelper(path, false, false);
1435+
Element element = (Element) node;
1436+
element.setAttribute(attribute, value);
1437+
}
1438+
14201439
private void mergeHelper(final Element dst, final Element src) {
14211440
final NodeList oChildNodes = src.getChildNodes();
14221441
boolean bHasElem = false;

Source/Plugins/Core/com.equella.admin/src/com/tle/admin/hierarchy/KeyResourcesTab.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ public String getToolTipText(MouseEvent event) {
279279

280280
@Override
281281
public void load(HierarchyPack pack) {
282-
selectedModel.setEntries(pack.getTopic().getKeyResources());
282+
selectedModel.setEntries(pack.getKeyResources());
283283
}
284284

285285
@Override
286286
public void save(HierarchyPack pack) {
287-
pack.getTopic().setKeyResources(selectedModel.getEntries());
287+
pack.setKeyResources(selectedModel.getEntries());
288288
}
289289

290290
@Override
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Licensed to The Apereo Foundation under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for additional
4+
* 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 compliance
8+
* 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+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package com.tle.common.util
20+
21+
import java.security.SecureRandom
22+
23+
object StringUtils {
24+
25+
private val secureRandom = SecureRandom.getInstanceStrong
26+
27+
/**
28+
* Generates a string of random bytes represented as hexadecimal values.
29+
*
30+
* @param length number of random bytes
31+
* @return a string which is twice the length of `length` with each two characters representing
32+
* one byte
33+
*/
34+
def generateRandomHexString(length: Int): String =
35+
Range(0, length).map(_ => "%02x".format(secureRandom.nextInt(255))).mkString
36+
}

Source/Plugins/Core/com.equella.base/src/com/dytech/edge/web/WebConstants.java

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public final class WebConstants {
3939
public static final String DASHBOARD_PAGE = "home.do";
4040
public static final String DASHBOARD_PAGE_PRIVILEGE = "DASHBOARD_PAGE";
4141

42+
public static final String LOGIN_PAGE = "logon.do";
43+
4244
public static final String SEARCHING_PAGE = "searching.do";
4345
public static final String SEARCH_PAGE_PRIVILEGE = "SEARCH_PAGE";
4446

Source/Plugins/Core/com.equella.base/src/com/tle/beans/hierarchy/HierarchyPack.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020

2121
import com.tle.beans.entity.Schema;
2222
import com.tle.beans.entity.itemdef.ItemDefinition;
23+
import com.tle.beans.item.Item;
2324
import com.tle.common.security.TargetList;
2425
import java.io.Serializable;
2526
import java.util.List;
2627

27-
/** @author Nicholas Read */
2828
public class HierarchyPack implements Serializable {
2929
private static final long serialVersionUID = 1L;
3030

3131
private HierarchyTopic topic;
32+
private List<Item> keyResources;
3233
private TargetList targetList;
3334
private List<ItemDefinition> inheritedItemDefinitions;
3435
private List<Schema> inheritedSchemas;
@@ -61,6 +62,14 @@ public void setTopic(HierarchyTopic topic) {
6162
this.topic = topic;
6263
}
6364

65+
public void setKeyResources(List<Item> keyResources) {
66+
this.keyResources = keyResources;
67+
}
68+
69+
public List<Item> getKeyResources() {
70+
return this.keyResources;
71+
}
72+
6473
public TargetList getTargetList() {
6574
return targetList;
6675
}

Source/Plugins/Core/com.equella.base/src/com/tle/beans/hierarchy/HierarchyTopic.java

-18
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
import com.tle.beans.SchemaScript;
2424
import com.tle.beans.entity.LanguageBundle;
2525
import com.tle.beans.entity.PowerSearch;
26-
import com.tle.beans.item.Item;
2726
import com.tle.common.Check;
2827
import com.tle.common.Check.FieldEquality;
29-
import com.tle.common.DoNotClone;
3028
import com.tle.common.institution.TreeNodeInterface;
3129
import java.io.Serializable;
3230
import java.util.ArrayList;
@@ -96,14 +94,6 @@ public class HierarchyTopic
9694
@Index(name = "hiearchyPowerSearch")
9795
private PowerSearch advancedSearch;
9896

99-
/** ItemId keys. */
100-
@DoNotClone
101-
@ManyToMany(fetch = FetchType.LAZY)
102-
@JoinTable(
103-
joinColumns = {@JoinColumn(name = "hierarchy_topic_id")},
104-
inverseJoinColumns = {@JoinColumn(name = "element")})
105-
private List<Item> keyResources;
106-
10797
private boolean showResults = true;
10898

10999
@Column(length = 100)
@@ -266,14 +256,6 @@ public void setAdvancedSearch(PowerSearch advancedSearch) {
266256
this.advancedSearch = advancedSearch;
267257
}
268258

269-
public List<Item> getKeyResources() {
270-
return keyResources;
271-
}
272-
273-
public void setKeyResources(List<Item> keyResources) {
274-
this.keyResources = keyResources;
275-
}
276-
277259
public List<ItemDefinitionScript> getAdditionalItemDefs() {
278260
return addIdefs;
279261
}

0 commit comments

Comments
 (0)