Skip to content

Commit

Permalink
Change name of string
Browse files Browse the repository at this point in the history
  • Loading branch information
qinxutan committed Mar 29, 2024
1 parent 6b15fc6 commit 898ebc1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class ListStudentsOfClassCommand extends Command {

public static final String COMMAND_WORD = "/class_list_students";
public static final String MESSAGE_EMPTY = "No students found in the specified tutorial class";
public static final String MESSAGE_STUDENT_LIST_EMPTY = "No students found in the specified tutorial class";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": List students of the tutorial class. \n"
+ "Parameters: "
+ PREFIX_MODULECODE + "MODULE CODE "
Expand Down Expand Up @@ -44,11 +44,11 @@ public CommandResult execute(Model model) throws CommandException {
ModuleCode existingModule = model.findModuleFromList(module);
if (existingModule == null || !existingModule.hasTutorialClass(tutorialClass)) {
return new CommandResult(String.format("Module %s or tutorial class %s not found",
module, tutorialClass, MESSAGE_EMPTY));
module, tutorialClass, MESSAGE_STUDENT_LIST_EMPTY));
}
TutorialClass existingTutorialClass = model.findTutorialClassFromList(tutorialClass, module);
if (existingTutorialClass.getStudents().isEmpty()) {
return new CommandResult(MESSAGE_EMPTY);
return new CommandResult(MESSAGE_STUDENT_LIST_EMPTY);
}

StringBuilder result = new StringBuilder();
Expand Down

0 comments on commit 898ebc1

Please sign in to comment.