Skip to content

Commit 59119b9

Browse files
author
rtschu
committed
rewrote tests to work with previous master merge
1 parent 0c4e2ec commit 59119b9

File tree

4 files changed

+2631
-1098
lines changed

4 files changed

+2631
-1098
lines changed

block_evasys_sync.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ public function get_content() {
8383
if ($ismodeautomated) {
8484
$this->page->requires->js_call_amd('block_evasys_sync/invite_manager', 'init');
8585
} else {
86-
$categoryhasstandardtime = \block_evasys_sync\evasys_synchronizer::get_standard_timemode($this->page->course->category);
8786

8887
// Only use standardtime js if no record exists.
8988
if (!$record) {
9089
$this->page->requires->js_call_amd('block_evasys_sync/standardtime', 'init');
9190
}
9291
}
92+
$categoryhasstandardtime = \block_evasys_sync\evasys_synchronizer::get_standard_timemode($this->page->course->category);
9393
$evasyssynchronizer = new \block_evasys_sync\evasys_synchronizer($this->page->course->id);
9494
try {
9595
$evasyscourses = $evasyssynchronizer->get_courses_from_lsf();

generator.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def get_checks(mode, standardtime, students_state, idnumber_state, mapped_state,
4848
This Function will take the scenario parameters and construct the resulting checks.
4949
:return: The combined checks for the parameters.
5050
"""
51+
if not recordstandardtimemode == "norecordstandardtimemode":
52+
standardtime = 1 if recordstandardtimemode == "recordstandardtimemode" else 0
5153
# If there are no mapped courses the Block not offer the option to "Show surveys"
5254
if (idnumber_state == "none") and (mapped_state == "none"):
5355
return "Then I should see \"Change mapping\"\n And I should not see \"Name:\"\n "
@@ -86,7 +88,8 @@ def get_checks(mode, standardtime, students_state, idnumber_state, mapped_state,
8688
checks += "And I should see \"There are some closed surveys, but all surveys should be open.\"" + "\n"
8789

8890
# if the standardtimemodecheckbox should be present from the start we also want to check that
89-
checks += checks_standardtimemode(standardtime, mode, internal_state, recordstandardtimemode) + "\n"
91+
if not no_valid_mappings:
92+
checks += checks_standardtimemode(standardtime, mode, internal_state, recordstandardtimemode) + "\n"
9093
# if there are no students that are eligible to evaluate we want to output a warning
9194
checks += student_checks[students_state]
9295
checks = checks.replace("\n", "\n ")

0 commit comments

Comments
 (0)